const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
function inter (int) {
return int.isInteger;
};
const squaredIntegers = realNumberArray.filter(inter);
I don't know why this don't return an array of Int...
someone can help me?
isInteger
exists only on the Number
constructor
function inter (int) {
return Number.isInteger(); /// u not passing anything to that function
};
const a = realNumberArray.filter(inter);
u can check syntaxis /examples here