ASI Issues


haha

What's ASI?


https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion
oh i read that so it isn't a bug?
oh wait i didn't say that its a bug

That's what you deserve for programming in languages with semicolons. :~P

What's the problem?
functionReturningOtherFunction(...)( ...)
is quite an obvious JS construct.

So the error message means that addEventListener() doesn't return a function to be called. So there is no way to call
addEventListener(...)( function animate(...))

As the function "animate()" is not anonymous so there is no benefit in IIFE. This way it should works as expected with ASI.

addEventListener(...)
function animate(){....}
animate()

yeah yeah
also the annoying ohnoes tries to bug me with "you cant end a line with =" everytime i do something like this:

var foo=
(function(bazzes){bars(bazzes);bloops("garplies")});

i have my semicolons correct,no ambiguity(unless you dont read the second line and think:"hmm...what is foo eq too?"),no errors!!!it looks like ohnoes wants me to do this:

var foo=(function(bazzes){bars(bazzes);bloops("garplies")});

or

var foo=(
function(bazzes){bars(bazzes);bloops("garplies")});

Solution: always use semicolons.
Also, can you talk with better grammar and spelling?

Okay.
I'm just too lazy in the past 5 days.

I think you talked like that before the last 5 days...

Oh.

I think English is not his first language. If I correctly recall, he's Chinese.

:expressionless:

"Syntactic sugar leads to cancer of the semicolon." --Alan Perlis

I don't think the semicolon is that bad, other than me sometimes forgetting to put it at the end.

You and everyone else, that's part of the problem with it.

But it's not just semicolons; Perlis chose to mention them for the sake of the pun. The very worst thing about C-and-its-progeny syntax is = vs. == (vs. === in the case of Javascript, a self-parody of taking bad syntax to an extreme). With 20-odd levels of precedence in second place.

Okay so I peeked at this topic again,and accidentally clicked google translate and found out that @snapenilk is translated into 鲷鱼 which translates back into snapper
It looks like that google translate knows nothing about syntactic sugar and thinks that it is something sweet(literaly)(句法糖)(which translates back into "grammar sugar")
and the snap developer group sign gets translated into "折断!开发商" which translates back into "Break off!developer".
@dardoro is translated into 达尔多罗 which isnt a good translation