top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is block scoping in Javascript ?

0 votes
14 views
What is block scoping in Javascript ?
posted Apr 25 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social 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 by Aarati Mahajan
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...