wwa*_*waw 5 javascript syntax comments
在解析之前,注释是否只是从源代码中删除了,或者它们是否可以算作换行符并破坏某些上下文中的连续性?
'foo'.replace(/f/, 'b') //f->b
.replace(/o/, 'a') //o->a
.replace(/o/, 'r') /*o->r*/ ;
'foo'.replace(/x/, /*matches "x"*/ 'y');
var foo = ( true !== false ) ? // bikeshed
'bar' : /*if they're equal, which they won't be, we'll want 'baz'*/ 'baz';
Run Code Online (Sandbox Code Playgroud)
你知道,因为他们说空白是"安全的"和"无关紧要的"或其他什么,但我们都知道有例外.评论其实是否安全?