top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is block scoping in Javascript ?

0 votes
374 views
What is block scoping in Javascript ?
posted Apr 25, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Block scope is everything inside a set of braces In Javascript Let is a block scoping.

Example:

if (true) {
let siteName = QueryHome;
document.write(siteName + "is a Q2A Platform")
}

where let scope is only with in the if statement.

answer Apr 25, 2018 by Aarati Mahajan
...