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@moigithub 16:39
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
function inter (int) {
return Number.isInteger(realNumberArray);
};
const a = realNumberArray.filter(inter);
const squaredIntegers = a.map(val => Math.pow(val, 2));
return squaredIntegers;
};
now yes, but it's still the same
now
@AlbertoGiambone Number.isInteger(realNumberArray);
the argument passed is..wrong. The usage of isInteger
is Number.isInteger(num)
so for example
Number.isInteger(1.2) //false
Number.isInteger(3) //true
You're passing array instead, also you should look up documentation of .filter()
and what parameters the callback function takes.
Hello... can anyone help me understand why my image isn't displaying for my Twitch Viewer app?
I actually completed this challenge about a year ago and it was working fine, but when I checked on it last week, I noticed the stream logo/image was not displaying. Everything else does, but not the image. I can't figure out why. I thought that perhaps the link to the image was broken, but I created another pen to test it, and it worked perfectly fine.
Can anyone please help me figure out what's wrong?