crop_rotate
Run
<!DOCTYPE html> <html> <body> <h1>JavaScript Global Scope</h1> <script> var username= "Ahmed"; function welcome(){ document.write("Welcome " + username); //global variable can access here } //global variable can access here if(username == "Ahmed"){ welcome(); } else { //global variable can access here document.write(username + " Wrong Username" ); } //global variable can access here </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDE+SmF2YVNjcmlwdCBHbG9iYWwgU2NvcGU8L2gxPg0KDQo8c2NyaXB0Pg0KdmFyIHVzZXJuYW1lPSAiQWhtZWQiOw0KDQpmdW5jdGlvbiB3ZWxjb21lKCl7DQogIGRvY3VtZW50LndyaXRlKCJXZWxjb21lICIgKyB1c2VybmFtZSk7DQogIC8vZ2xvYmFsIHZhcmlhYmxlIGNhbiBhY2Nlc3MgaGVyZQ0KfQ0KLy9nbG9iYWwgdmFyaWFibGUgY2FuIGFjY2VzcyBoZXJlDQppZih1c2VybmFtZSA9PSAiQWhtZWQiKXsNCiAgIHdlbGNvbWUoKTsNCn0NCmVsc2UNCnsNCiAgICAvL2dsb2JhbCB2YXJpYWJsZSBjYW4gYWNjZXNzIGhlcmUNCiAgZG9jdW1lbnQud3JpdGUodXNlcm5hbWUgICsgIiBXcm9uZyBVc2VybmFtZSIgKTsNCn0NCg0KLy9nbG9iYWwgdmFyaWFibGUgY2FuIGFjY2VzcyBoZXJlDQo8L3NjcmlwdD4NCg0KPC9ib2R5Pg0KPC9odG1sPg==