2/2. Inside the function b(), a local variable 'a' is declared that overrides the global 'a', and is initially undefined.
console.log(a) is called again within the function b(), which logs the local variable 'a', as undefined in scope context.
@cerebrocerberus 1/2. The first part of the code, console.log(a) is "undefined".
This is because console.log(a) is called before any variable declarations, so at this point, a is undefined in the global scope.
A message from the future.
Wednesday, January 25, 2023.
This could be a glitch from @WhatsApp API but I ain't sure of the actual cause... December 4, 2022.
A message from the future.
Wednesday, January 25, 2023.
This could be a glitch from @WhatsApp API but I ain't sure of the actual cause... December 4, 2022.