Tell us what’s happening:
My code :
console.log(“Inputs: “+inputs.join(”,”))
I also tried : console.log(“Inputs: “+inputs+”,”)
Can someone please explain what is expected please ? I’m out of solutions.
Error : You should log the text "Inputs: " and the inputs array to the console, separated by a comma.
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
console.log("Inputs: "+inputs.join(","))
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 31
dhess
2
Hi @quentinritt94 . Welcome.
You can just do it like this: removed by mod. Console.log() can accept multiple variables or text separated by commas.
Please do not share solution code in the forum
1 Like
If you read the instructions again and look for the order or the elements:
Log the text "Inputs: ", followed by a comma, followed by the inputs array to the console.
First "Inputs: "
Then a comma
Then the inputs array
As @dhess described, you can use this syntax to log multiple elements.
console.log("Some text", variable, var2, "more text");
dhess
5
Oops! I knew that. Must need more coffee.
1 Like
There is no need for a coma, because the console log will add the comas for each element. The line “Then a comma” is confusing.
I would suggest to write it like this:
First "Inputs: "
Then the inputs array
system
Closed
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.