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

Tell us what’s happening:

updateUI shold be a function, i need help with this code

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const updateUI = ("", "") => {};

// User Editable Region

Your browser information:

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

Challenge Information:

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

The function parameter should be array

You can give the array parameter a default value

(someParam = [])


Example:

const fn = (numbers = [1, 2, 3]) => {
  return numbers.map((number) => number * 2);
};

console.log(fn()); // [2, 4, 6]
console.log(fn([2, 4, 8])); // [ 4, 8, 16 ]
3 Likes