Let’s say we have the code:
const satellite = ‘The Moon’;
const galaxy = ‘The Milky Way’;
let stars = ‘North Star’;
const myNightSky = () =>
return 'Night Sky: ’ + satellite + ’ , ’ + stars + ’ , ’ + galaxy;
My main problem is that I fail to understand why myNightSky is able to execute at all. After all, myNightSky does not explicitly include any parameters in the parantheses. Yet, satellite, stars, and galaxy are returned. How is it possible to have a function with no explicitly specified parameters return global variables?