Var vs. Let in JavaScript

In this article, we wil be discussing the long running debate of var vs. let in JavaScript. We will also be discussing why the use of let is increasing in dev communities.

Var vs Let in JavaScript

Introduction

Declaring variables in JavaScript was not a cake walk until 2015 when ECMA 2015 was introduced and hence let and const was introduced and we got rid of var (it still works though!).