variables in fucntions javascript code example
Example 1: javascript functions
function sayHelloTo(to) {
alert(`Hello ${to}`);
}
sayHelloTo('World from Grepper')
Example 2: global scope js
const color = 'blue'
const returnSkyColor = () => {
return color; // blue
};
console.log(returnSkyColor()); // blue