I am reading but this just is not making sense to me… I am getting the filtered numbers… but the squaring part of the function just does not seem to magically appear through the fog…
Here is my latest code :
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
// change code below this line
let squaredIntegers =realNumberArray.filter(num)=>(num%2===0&&num>0);
squaredIntegers=squaredIntegers.map((num)=>num*num);
// change code above this line
return squaredIntegers;
};
// test your code
const squaredIntegers = squareList(realNumberArray);
console.log(squaredIntegers);
I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
I did see the IsInteger () on I think it was stackflow… there was some reason it was bumped down because of something to do with its methodology or interpolation… I will have to go back and look again…
however, yes ! it would clear some of the typing…