blob: 4dbf0670a219e4bcff714e47793e055af3694c0c [file] [log] [blame]
40 columns |
>>> Inline after keyword.
var /* comment */ x;
<<<
var /* comment */ x;
>>> Trailing line comment.
var x; // comment
<<<
var x; // comment
>>> Inside multiple variable declaration list.
var x /* comment */, y;
<<<
var x /* comment */, y;
>>> Always place newline after multi-line block comment.
/*
*/ var i = value;
<<<
/*
*/
var i = value;
>>> Prefer block-like splitting for empty lists with comments.
var variableName = [ /* some long comment */ ];
<<<
var variableName = [
/* some long comment */
];
>>> Line comment before `=`.
var variable // comment
= value;
<<<
### This looks weird, but users don't usually put comments here.
var variable // comment
=
value;
>>> Line comment after `=`.
var variable = // comment
value;
<<<
var variable = // comment
value;
>>> Line comment after value.
var variable = value // comment
;
<<<
### Weird, but users rarely write this.
var variable =
value // comment
;
>>> Line comment after semicolon.
var variable = value; // comment
<<<
var variable = value; // comment