All posts in "variables"

Var, Let, and Const – The Three Variable Horsemen

Published October 15, 2018 in JavaScript , variables - 1 Comment

Variables are a vital piece of our JavaScript code.  They are so important in fact that JavaScript has given us THREE different ways to declare variables. Those three main ways are var, let, and const.  The oldest of which var has been around since the beginning.  It’s our other 2 declarations let and const that have arrived with es6.  Giving us new syntax to declare our variables also gave us more scenarios to take into account with using them. We’re going to dive into some of those differences in this post.

Continue reading…