You can wrap the above code sample with 
\`\`\` JavaScript
{ your code here } 
\`\`\`

``` JavaScript
{
    var: "then you will have a nice looking code block, something like this"
}
```