I think it is better to use single quotes in javascript examples: $ is a common symbol in js code, and $variables are interpolated by shell when double quotes are used. And because it is better to use single quotes in js examples it is better to use them elsewhere as well, to be consistent.