Change Content - Javascript

Change html element content using pure javascript author(s): Deepu Mohan Puthrote (WarFox)

JavaScript

var person = 'XYZ';
const func1 = function() {

let address = 'Pakistan';
func2();
console.log(`${person} ${address}`);
}
const func2 = function() {

let designation = 'Software Engineer';
let address = 'America'
console.log(`${person} ${designation} ${address}`);
}
func1();
console.log(window.person === person)