Please login to start chat

ICT Solutions 2020-04-26 12:50:48
Category : JavaScript Tutorials

JavaScript Variables

/*var a = "I am Thet Naing Win.";
let b = "I am from Myanmar.";
const c = "I currently stay in Yangon.";

document.write(a);
document.write(b);
document.write(c);

const a = "I am Thet Naing Win.";
const a = "Who are you?";
document.write(a);
*/

var tnwGlobal = "I am TNW Global."; // global variable

function tnwOne(){
var tnwLocal = "I am TNW Local."; //local variable
document.getElementById("global").innerHTML = tnwGlobal;
document.getElementById("local").innerHTML = tnwLocal;
}

function tnwTwo(){
document.getElementById("global").innerHTML = tnwGlobal;
document.getElementById("local").innerHTML = tnwLocal; //local variable declared in tnwOne
}

To see video in YouTube.

Comments:

No comment to show.

Available Services
Download Android Application