Global Scope 2 Sky lesson help please

Hi, I am stuck on part 2 of Global Scope 2 lesson. Lesson link:

Here is my code:

const satellite = ‘The Moon’
const galaxy = ‘The Milky Way’
let stars = ‘North Star’

const myNightSky = () => {
stars =‘Sirius’;
return 'Night Sky ’ + satellite + ', ’ + stars + ', ’ + galaxy;


I get this message regarding my code: Did you create another console.log() statement ‘console.log(myNightSky());’?
Did you log the value of the ‘stars’ value to the console?

I have been asked to:
Outside the function, under the previous console.log() statement, console.log() the value of stars.

You’ll notice that the global variable stars was reassigned to ‘Sirius’. In other words, we unexpectedly changed the value of the global variable, and this could impact our program in ways we do not intend.

Please could someone tell me where I am going wrong on this? Thank you,


Hi, your second log contains a typo. Fix that and try to submit again :slight_smile:

Thank you very much - I was very tired doing this and obviously missed a silly, easily identifiable error! :see_no_evil:

Thank you. I will double check typos in future!


Np, it happens all the time. Happy coding!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.