I have some stupid question down below, how to fix the space problem without moving value ‘The Moon’

const satellite = 'The Moon'
const galaxy = 'The Milky Way'
let stars = 'North Star'
//upper is my global variables

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

//Night SkyThe Moon, North Star, The Milky Way


Look at how you interpolated(that’s the word right?) the string. We can’t give you answers but look through it again.


Yes, that’s the word. I don’t think it would be giving up too much to point out the missing space character, here,

'Night Sky '

Being as the code is ES6, we can take advantage of template string syntax

`Night Sky ${satellite}, ${stars}, ${galaxy}`


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