Most In-demand Technologies To Upskill Your Career.How To Forward Your Career With Cloud Skills?.In javascript, const is considered to be more powerful than var.Once used to store a variable it can’t be reassigned.In simple words, it is an immutable variable except when used with objects. They both have their own way of storing variables.Ĭonst: The const keyword is mainly used to store that variable who’s value is not going to be changed.Consider an example where you are creating a web application where you want to store a variable whose value is not going to change, then const is definitely the best choice to store that variable. But it had some serious issues, also it was not developers’ favorite so in the ES6 version, we were introduced to const and let keywords which allows us to store variables. Let’s take a look at them one by one.īefore ES6 we mainly made use of the var keyword whenever we wanted to declare a variable. It’s fair to say that with the use of ES6 features we write less and do more, hence the term ‘write less, do more’ definitely suits ES6.ĮS6 introduced several key features like const, let, arrow functions, template literals, default parameters, and a lot more. Javascript ES6 has been around for a few years now, and it allows us to write code in a clever way which basically makes the code more modern and more readable. ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.DevOps Engineering - Planning to Production. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |