This post not have any adsense because we set adsense: false on markdown front-matter. (see developer tools)

Code Block Shortcode

Using code block shortcode from official hexo

Plain code

1
alert('Hello World!');

Specifying the language

1
[rectangle setX: 10 y: 10 width: 20 height: 20];

Adding a caption to the code block

Array.map
1
array.map(callback[, thisArg])

Adding a caption and a URL

_.compactUnderscore.js
1
2
_.compact([0, 1, false, 2, '', 3]);
=> [1, 2, 3]