I keep ending up with “undefined” at the end of my statement.
Please help me understand what it is that I am doing wrong.
Thank you for all your help! You guys are totally awesome!!
I tried to reassign the variables, assign the variables and I just wasn’t successful in the process. Hopefully, somebody can shed some light on this subject. It is extremely frustrating when I keep getting stuck in the course. My goal is to finish this by the end of the year. Plus, I already achieved my 1st c
Your code so far
let greetingMessage = "Hello! I'm your coding fun fact guide!";
console.log(greetingMessage);
let botName = "nintendoBuff";
console.log(botName);
let botLocation = "marsB";
console.log(botLocation);
let favoriteLanguage = "javaScript"
console.log(favoriteLanguage);
const botIntroduction = "My name is nintendoBuff and I live on marsB." + botIntroduction + ".";
console.log(botIntroduction);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Challenge Information:
Build a JavaScript Trivia Bot - Build a JavaScript Trivia Bot
I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
```let greetingMessage = "Hello! I'm your coding fun fact guide!";
console.log(greetingMessage);
let botName = "nintendoBuff";
console.log(botName);
let botLocation = "marsB";
console.log(botLocation);
let favoriteLanguage = "javaScript";
console.log(favoriteLanguage);
let botIntroduction = "botIntroduction";
console.log("My name is " + botName + " and I live on " + botLocation + ".");
const botIntroduction = "botIntroduction";```
I tried to remove botIntroduction and change it to just console.log or firstSentence, but that didn’t work either. I’ve tried a lot of different codes, but none seem to work.
const botIntroduction = "Hello! I'm your coding fun fact guide!";
console.log(botIntroduction);
let botName = "nintendoBuff";
let botLocation = "marsB";
let favoriteLanguage = "javaScript";
const introSentence = "My name is " + botName + " and I live on " + botLocation + ".";
console.log(introSentence);
const secondSentence = "My favorite programming language is " + favoriteLanguage + ".";
console.log(secondSentence);
let codingFact = "codingFact";
codingFact = codingFact;
console.log("I learned " + favoriteLanguage + " 2 years ago and picked it up pretty fast.");
codingFact = " Learning " + favoriteLanguage + " is a fun tool!";
console.log(codingFact);
codingFact = "Node.js and " + favoriteLanguage + " are kind of confusing at first, then you learn how to write in " + favoriteLanguage + ".";
console.log(codingFact);
let closingSentence = closingSentence;
console.log("It was fun sharing these facts with you. Goodbye! - " + botName + " from " + botLocation + ".");```