Tell us what’s happening:
I have some trouble to understand chaining methods. I totally gets what asked here : we need to use the filter method to check the number that are Number, but using the opposite of the method isNaN()
, using a !
.
I just can’t figure out how to articulate that
Your code so far
const calculate = () => {
const value = document.querySelector("#numbers").value;
const array = value.split(/,\s*/g);
const numbers = array.map(el => Number(el));
const filtered = numbers.filter((el) => !Number.isNan(el));
}
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 Advanced Array Methods by Building a Statistics Calculator - Step 7