Global Scope II-Need some help


Need some help! Do not know what to do!


what part do you need help with?


The first part. what do they mean by “inside the function, on the very first line of the function”?


//it means within the curly braces of the function.
//The function would be defined as

const name = () => {
//this is the first line;
//this is the second line, etc.;


Thanks Sanjay but I did it this way but it is not working, could you explain why?

const satellite = 'The Moon’
const galaxy = 'The Milky Way’
let stars = 'North Star’
stars = ‘Sirius’;
const myNightSky = () => {stars= ‘Sirius’; return ‘Night Sky:’ satellite + ‘,’ + stars + ‘,’ + galaxy};


you need semicolons after ‘The Moon’ ,‘The Milky Way’, and ‘North Star’. Also on the last line, stars doesn’t have parameters (because it’s a variable), so it doesn’t need the extra parentheses inside the console.log.


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