Anthony Alaribe
1 min readAug 27, 2018

--

a and b are globals (or in the scope above depending on the context), so you still can’t access them via this.a + this.b. So the result will be NaN and not 8

But console.log(a + b + c + d ); will work, since a and b are declared (in the outer scope), but this.a and this.b are not declared

--

--

Anthony Alaribe
Anthony Alaribe

Written by Anthony Alaribe

I help solve business challenges using technology. Golang and Web optimisation (PWA, service workers, progressive enhancement)

No responses yet