JavaScript var, let, and const

Introduction

The keywords let and const were introduced in ES6 to provide better variable scoping and safety compared to var.