The concept of block scope is introduced in ECMAScript 6 with the new keywords _________ and const.

  • let and var
  • block and const
  • scope and let
  • const and var
Block scope in JavaScript is introduced using the let keyword, which allows variables to be declared with block-level scope, while const is used to declare constants. The var keyword does not provide block scope and was used in older versions of JavaScript.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *