1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
const answer = 42; // line comment
const moarAnswer = (7*4)/(2/3)
/*
(•_•)
<) )╯Multi
/ \
\(•_•)
( (> Line
/ \
(•_•)
<) )> Comment
/ \
*/
const singleQuotedString = 'i\'m trying to escape';
const doubleQuotedString = "this is also \"escaped\"";
const templateString = `the answer is ${answer}. This is a backtick: \``;
const regex = /you can ignore\/[/]skip me, it's cool/;
if ( a / b ) /foo/;
function calc (data) {
for (i = 0; i < num; i++)
something = item[i] / total * 100
for (i = 0; i < 4; i++) {
something = Math.round(totals[i] / total * 100)
}
}
|