Question #147680

What is the main difference between var and let keywords in JavaScript?


Options:

Explanation:
The var and let keywords are both used for variable declaration in JavaScript. But, the main difference between them is that var defines function scoped variable while let defines block-scoped variable.
Tags: JavaScript

Question Screenshot

Question Screenshot
For best sharing results, download the image first and then attach it to your social media post.

Test Your Knowledge

Want to practice more questions like this? Take a quiz in this category!

Take a Quiz

Share This Question