9 lines
201 B
JavaScript
9 lines
201 B
JavaScript
function greeting() {
|
|
let message = 'Hello';
|
|
let sayHi = function hi() {
|
|
let message = 'Hi';
|
|
};
|
|
sayHi();
|
|
console.log(message); // Hello as 'Hi' is out of scope
|
|
}
|
|
greeting(); |