Learn Recursion by Building a Decimal to Binary Converter - Step 31

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

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

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 @fcc4b6d10c4-b540-4e2 described, you can use this syntax to log multiple elements.

console.log("Some text", variable, var2, "more text");

Oops! I knew that. Must need more coffee.

1 Like