What is the difference between const, let, var?


#1

I don’t know where I want to use const , let, var


#2

ES6 introduces const and let that are block scoped, while var is function scoped. Use const for non reassignable variables, else use let, no real needs for var anymore when using Ember (and ES6).

also see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let


#3

In Ember itself, and in all of my personal projects I use the Liberal let strategy as discussed in: http://madhatted.com/2016/1/25/let-it-be.