Hello. I would like some assessment on my work please.
I’m having issues with replacing the placeholders in the story. I would also like assessment for the rest of the code.
Hello. I would like some assessment on my work please.
I’m having issues with replacing the placeholders in the story. I would also like assessment for the rest of the code.
Hello @weneorlu
you doing great there some little notice here :
you can not change const variable so you declare newStory as const but you kept change it which is not valid
this statment is reversed
newStory.replace(':insertx:', xItem) = newStory;
it should be
newStory = newStory.replace(':insertx:', xItem);
it better to declare the variable before using it so check where did you declared newStory and when you first use it
4)you missed to set newStory to the new value that returned from this call
newStory.replace('94 fahrenheit', temperature);
so it should be
newStory =newStory.replace('94 fahrenheit', temperature);
fix those issue and you will find the rest
hope that help and have a nice day
Thanks a lot for the advice! This was very helpful and I really can’t thank you enough. I’ll get on with it and update you on my progress.
you very welcome and glad to help and waiting to see your progress
I fixed it! Everything is working as it should now. Thanks a lot for your advice and guidance, I really appreciate.
Here’s the link to the updated code:
Silly story generator (codepen.io)
you very welcome and well done
and keep the good work