Arrow function followed by divide or syntax error?

Gareth Heyes gareth.heyes at portswigger.net
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.

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

Cheers
Gareth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170523/af1b319f/attachment.html>


More information about the es-discuss mailing list