Putting JavaScript code into MarkDown pages
/This is another of my posts to remind myself how to do something that I’m sure I’ll forget. It’s useful if you want to embed JavaScript (or perhaps any) code into a web page. If you use MarkDown to format the text you can mark the code by enclosing it in the sequences ```j and ```. In other words.
```j
var fred =99;
var jim = 100;
```
.. would be rendered as:
var fred =99;
var jim = 100;
Admittedly, this doesn’t look that different to the original, but if you remember that the line breaks in your text are properly respected so that it looks how it should. Remember to use the back single quote (it is on the top left hand corner of your PC keyboard) .