Is there anyway to change the value of global variable in function and access the changed value of global variable outside the function in javascript or nodejs...
var x=8;
function changed(x)
{
x=10;
}
console.log(x);
The actual output is 8 but i want the value of x is 10. is it possible in javascript or nodejs