Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

Tell us what’s happening:

I have tried for 2 days now to get tests 8, 14, and 15 to pass. Can someone please advise as to what I am missing?

Your code so far

console.log ("Hello! I'm your coding fun fact guide!");
let botName = "Java ";
let botLocation = "the computer";
let favoriteLanguage = "JavaScript";
console.log("My name is " + botName + "and I live on " + botLocation + "."); // logged to console for TC 8
console.log ("My favorite programming language is " + favoriteLanguage + ".");
let codingFact;
codingFact = "I like to learn " + favoriteLanguage + "."; // fact #1
console.log (codingFact);
codingFact = "I like to use comments in " + favoriteLanguage + "."; // fact #2
console.log(codingFact);
codingFact = "freeCodeCamp offers a curriculum to learn " + favoriteLanguage + " for free" + "."; // fact #3
console.log(codingFact);
console.log("It was fun sharing these facts with you. Goodbye! - " + botName + "from " + botLocation + ".");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0

Challenge Information:

Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot

I just fixed #14. Still no luck on 8 and 15

make sure you are not missing spaces in the string (don’t put the space in botName)

extra space

extra space

Without the extra spaces, I end up with run on sentences. How would I go about fixing that? Removing the spaces does not fix .

8. You should log to the console "My name is (botName) and I live on (botLocation)." and add the variables to the string.
15. You should log to the console "It was fun sharing these facts with you. Goodbye! - (botName) from (botLocation)." and add the values of the variables.

Ok, I did find the 1 extra space to resolve 8, but I do not see any extra spaces in 15

Can you copy and paste the output of that sentence here?

step 14 - The correct use: console.log(),
there shouldn´t be extra spaces, even if it works. Please check your console.log() calls.

step 15 - Please look at the last line in the console. Do you see there something not correctly displayed?

Thanks everyone for the help. I finally figured it out and passed that lab.

2 Likes