Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 7

Tell us what’s happening:

what and where is the problem

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

const dropdownValues = ["10", "20", "30", "40", "50"];
const numbersArray = dropdownValues.map(dropdown => Number(dropdown));
console.log(numbersArray); 

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 7

provide an image ? if possible so i can look into it :slight_smile:

Hey there,

Please update the message to include your code. The code was too long to be automatically inserted by the help button.

When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

  1. The map should be chained directly onto this array [...document.getElementsByClassName("values-dropdown")]

  2. dropdown is an element, you need to use the value property on it (for the Number() inside map)

  3. The map callback parameter has to be name dropdown

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.