Javascript#

Block Highlighting#

Language highlighting can be enabled with PyMdown and Pygments by adding a supported programming language name directly after the first ``` grouping in a Markdown code block:

let score1 = 2;
let score2 = 5;
let averageScore = (score1 + score2) / 2.0
console.log(averageScore)

Block Markdown#

```javascript
let score1 = 2;
let score2 = 5;
let averageScore = (score1 + score2) / 2.0
console.log(averageScore)
```

Script adapted from Austin Asoluka's "How to Use Variables and Data Types in JavaScript – Explained With Code Examples"

Inline Hilighting#

Inline highlighting can be added by prefixing the code snippet with three colons and the name of the supported programming language:

```:::LANGUAGE some code snippet```
or
`:::LANGUAGE some code snippet`

Example:

The console.log() function can be used to print content to the console: console.log("Hello World").

Inline Markdown#

The `:::javascript console.log()` function can be used to print content to the console:
```:::javascript console.log("Hello World")```.