Back to Freecodecamp

Step 13

curriculum/challenges/english/blocks/workshop-greeting-bot/66adc82170acb1464bd348eb.md

latest1.3 KB
Original Source

--description--

The last few messages from the bot will focus on the bot's favorite subject.

Start by creating a new variable called favoriteSubject and assign it the string "Computer Science".

--hints--

You should have a variable called favoriteSubject.

js
assert.isNotNull(favoriteSubject);

Your favoriteSubject variable should be a string.

js
assert.isString(favoriteSubject);

You should assign the string "Computer Science" to the favoriteSubject variable.

js
assert.strictEqual(favoriteSubject, "Computer Science");

--seed--

--seed-contents--

js
console.log("Hi there!");
console.log("I am excited to talk to you.");
let bot;
bot = "teacherBot";

let botLocation = "the universe";

console.log("Allow me to introduce myself.");

const botIntroduction = "My name is " + bot + ".";
console.log(botIntroduction);

const botLocationSentence = "I live in " + botLocation + ".";
console.log(botLocationSentence);

bot = "professorBot";

const nicknameIntroduction = "My nickname is " + bot + ".";
console.log(nicknameIntroduction);

bot = "awesomeTeacherBot";

const newNicknameGreeting = "I love my nickname but I wish people would call me " + bot + ".";
console.log(newNicknameGreeting);

--fcc-editable-region--

--fcc-editable-region--