tagtree / expert-es6 Goto Github PK
View Code? Open in Web Editor NEWContains the markdown used on the course at http://tagtree.io/courses/expert-es6
License: GNU Affero General Public License v3.0
Contains the markdown used on the course at http://tagtree.io/courses/expert-es6
License: GNU Affero General Public License v3.0
On the Expert ES6 course part 10, the example can template string when saying "hi name".
When destructuring objects, if the intended name of your variable is the same name as the object property name, you can use a simplified syntax...
let {firstName, lastName, message} = args;
This is not only possible, some folks think that this is the good style and recommend not using the more flexible syntax because it doesn't read well and requires the reader to think about syntax instead of just reading the intent of the code.
I think the course should mention this.
I think maybe const
should be in the same section as var.
In the Exercise the usage of var
is enforced. Very challenging to use destructuring here ;)
In the following example:
function sayHello(){
this.name = 'hendrik';
setTimeout(function(){
console.log('hello ' + this.name);
}, 1500);
}
sayHello();
Nested function passed in setTimeout has access to name
property. Since sayHello()
has window
as its execution context, it implicitly assigns name
property to window
, which is again the execution context of the nested function.
The example might be modified like this:
var person = {
sayHello: function(){
this.name = 'hendrik';
setTimeout(function(){
console.log('hello ' + this.name);
}, 1500);
}
}
person.sayHello();
Above code will not error out as there is no operation being performed on this.name
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.