General question but I am working on Unit 4 Lesson 3 Level 6. Here are the given directions and code:
console.log(“How many days have you been alive?”);
// Add code here. There are 365 days in a year. Use \n to add spaces to your output.
console.log(“I have been alive " + (age * 365) + " days!”);
First, the comments say to use the \n to add spaces to your output. /n should create a new line and not spaces. Second, the \n has the odd behavior seen below for the output:
"I have been alive 5840 days!
As you see, the second set of quotation marks are placed on the next line. I don’t understand why that behavior is happening. the \n should only elicit a “carriage return”. If I add another line under this, this is what it looks like:
"How many months have you been alive?
"I have been alive 192 months!
What is happening here? I’ve tried using single quotes and concatenating + ‘\n’.