Ask coding questions

← Back to all posts
Need help not sure what I am doing wrong
NathanCenter (1)

Hello I am having trouble trying to complete this assignment.
It is with JavaScript objects

I am not sure why my code is wrong with it has the same output as the answer. If anyone can help that would be great!

Answered by Coder100 (12435) [earned 5 cycles]
View Answer
Commentshotnewtop
Coder100 (12435)

lol you had an extra space:

 return`${votingLocation.manager} manages  ${votingLocation.name} at ${votingLocation.address.street.number} ${votingLocation.address.street.name} in ${votingLocation.address.city}, ${votingLocation.address.state}.`;
                                          ^

Corrected code?

 return`${votingLocation.manager} manages the ${votingLocation.name} at ${votingLocation.address.street.number} ${votingLocation.address.street.name} in ${votingLocation.address.city}, ${votingLocation.address.state}.`;
xxpertHacker (649)

@Coder100 Damn, I was writing to point out the double space, but by the time I'm done, you had already done it five minutes before me...

xxpertHacker (649)

It also asks you in part 1 not to modify the original object, do you think that would affect anything?

Also, after "manages", where you previously had the "the," there is still an extra space:

manages  ${

Double-space right there, should be fine if you remove it.

retronbv (103)

There is a extra ‘the’ in your answer

NathanCenter (1)

@retronbv I did add the 'the' buts its still wrong

retronbv (103)

At the end the period is outside of quote @NathanCenter