ga-wdi-boston / ember-object

Explore the Ember Object Model, and leverage it to do some basic binding through computed properties.
Other
1 stars 112 forks source link

Update JS code snippets to use ES2015 #4

Closed GA-MEB closed 8 years ago

GA-MEB commented 8 years ago

Replacing var with let and const, primarily.

jrhorn424 commented 8 years ago

Also, use arrow functions where they make sense. Remember, they change this to lexical scope, so it can break things. I'm still figuring this out. I usually try an arrow function, and if I get an error, try a normal function.

GA-MEB commented 8 years ago

It should be noted (though not necessarily in the repo itself) that this requires Chrome 49+ or Microsoft Edge 14+. Firefox doesn't fully support let or const yet on any version.

http://kangax.github.io/compat-table/es6/

GA-MEB commented 8 years ago

Doing this has introduced a new issue - running scripts by pasting them into the console is awkward. We should try to find a better way to handle this.