Coder Social home page Coder Social logo

Comments (6)

neugierige avatar neugierige commented on August 12, 2024

@raq929 says: this used to be run without webpack, and now it is. That may be the cause of the issue.

from js-function-context-this.

neugierige avatar neugierige commented on August 12, 2024

UPDATE: firstName and lastName needs to be changed to vars in order for lines 42 and 45 to produce Peter Ally

from js-function-context-this.

jrhorn424 avatar jrhorn424 commented on August 12, 2024

@raq929 says: this used to be run without webpack, and now it is. That may be the cause of the issue.

Not likely.

UPDATE: firstName and lastName needs to be changed to vars in order for lines 42 and 45 to produce Peter Ally

That seems like an appropriate fix, but not the right solution, if that makes sense.

To put it another way, if that's an actual fix, then the example should be reworked to use let and const appropriately.

from js-function-context-this.

raq929 avatar raq929 commented on August 12, 2024

Agreed. (This issue is weird because we were figuring it out in real time.)
So, basically, this example needs to be reworked. It was not a webpack issue, it was an updating to ES6 issue. And now the expected results in the file are not the actual results.

from js-function-context-this.

raq929 avatar raq929 commented on August 12, 2024

http://www.2ality.com/2015/02/es6-scoping.html

from js-function-context-this.

raq929 avatar raq929 commented on August 12, 2024

We have now updated all examples to ES6, so this is out of date.

from js-function-context-this.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.