NIELIT O Level Exam

What is the difference between let, const, and var when declaring variables in JavaScript?

What is the difference between let, const, and var when declaring variables in JavaScript?

जावास्क्रिप्ट में वेरिएबल घोषित करते समय let, constऔर var के बीच क्या अंतर है?

A. let and const are block-scoped, while var is function-scoped

B. var and let are block-scoped, while const is function-scoped

C. const and var are block-scoped, while let is function-scoped

D. They are all function-scoped




Correct Answer is :

A. let and const are block-scoped, while var is function-scoped



CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad