Nicolas Mesa

Dad, husband, geek

Var vs Let vs Const

Hi there! In this post, we’re going to talk about javascript. We’ll start by looking at some examples of var, let and const variable declarations and their properties. Then we’re going to go through my recommendations of when to use each one. var var is the original way to do variable declaration in javascript. Here’s an example of how you can declare a variable using var: var myVariable = 10; var is function-scoped Variables defined using var are function scoped. Read more →