Arrow function followed by divide or syntax error?

Gareth Heyes gareth.heyes at
Tue May 23 14:34:32 UTC 2017

Hi all

I'd like to discuss this:-

x=x=>{}/alert(1)/+alert(2)// alerts on edge, syntax error on other browsers

So on Edge it results in two alerts but every other browser it's a syntax
error. Personally I think Edge is right here because it's a function
expression so why can't you use divide after.

/alert(1)/+alert(2)//alerts twice on edge, once on other browsers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list