Javascript has a special variable called this, which points to the current execution context. The execution context is the environment a function or method is executed in. The value of this isn’t determined until run time. Since the same method or function can be executed in different contexts in the same program, the value of…
Category: Launch School
Closures ahead
In Javascript, when variables are defined in an outer scope, they’re accessible in any inner scope. When a function is defined, it forms a new scope. Variables defined in the outer scope are accessible inside, but not the reverse – variables defined in the inner scope are not visible outside it: Function scopes can be…
JS prototypes
In Javascript, objects store key/value pairs. The keys can be strings or symbols and values can be anything. A key with a function for a value is called a method. A value can also be another object. Key/value pairs in objects are called properties. An object can be used as the template for another object….
Since last post
Lots of things have happened since the last post. The ones that are relevant for here are that instead of continuing with freecodecamp, I signed up for Launch School. After spending over a year on it, I’m most of the way through the main courses. I’m almost ready to start the last one. Having a…