Understanding var, let, and const in JavaScript (A Beginner’s Guide)

When I first started learning JavaScript, one thing that confused me was why there were three different ways to declare a variable: var…