by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
• Create your own community
##### Activity
• May 14 22:39
@bjorno43 banned @minitechtips_twitter
• May 14 22:38
@bjorno43 banned @real-action
• Feb 01 00:27
@bjorno43 banned @Ndoua
• Jan 07 03:10
@bjorno43 banned @doctor-sam
• Aug 17 2019 09:32
User @bjorno43 unbanned @linkin-park
• Jun 20 2019 21:19
@bjorno43 banned @shenerd140
• Apr 25 2019 17:13
@mstellaluna banned @cmal
• Jan 08 2019 22:05
@mstellaluna banned @dertiuss323
• Nov 07 2018 04:42
User @texas2010 unbanned @ows-ali
• Nov 02 2018 16:25
@texas2010 banned @ows-ali
• Oct 12 2018 05:50
@bjorno43 banned @NACH74
• Oct 05 2018 23:02
@mstellaluna banned @JomoPipi
• Sep 16 2018 12:21
@bjorno43 banned @yash-kedia
• Sep 16 2018 12:16
@bjorno43 banned @vnikifirov
• Sep 05 2018 08:12
User @bjorno43 unbanned @androuino
• Sep 05 2018 07:38
@bjorno43 banned @androuino
• Aug 23 2018 16:57
User @bjorno43 unbanned @rahuldkjain
• Aug 23 2018 16:23
@bjorno43 banned @rahuldkjain
• Jul 29 2018 14:13
User @bjorno43 unbanned @jkyereh
• Jul 29 2018 01:00
@bjorno43 banned @jkyereh
alpox
@alpox
@AlbertoGiambone Right, i'm still half asleep it seems :D
AlbertoGiambone
@AlbertoGiambone
@alpox ;)
alpox
@alpox
The function is Number.isInteger(int)
The function isInteger exists only on the Number constructor
AlbertoGiambone
@AlbertoGiambone
@alpox ok, now this is the output: squaredIntegers should be [16, 1764, 36]
alpox
@alpox
Until now your output should be [4, 42, 6]
You still have to square them
Mandeep Sharma
@mandeephub
Can any one tell how to test web app
AlbertoGiambone
@AlbertoGiambone
@alpox ok, I wrote this:
function inter (int) {
return Number.isInteger();
};
const squaredIntegers = Math.pow(realNumberArray.filter(inter), 2);
but off course is not working ;)
alpox
@alpox
@AlbertoGiambone Yea you cannot set an array to the power of 2 :D
You have to target each number
So what you are looking for is the method .map
AlbertoGiambone
@AlbertoGiambone
@alpox thanks!
alpox
@alpox
@AlbertoGiambone np
hellhound123
@hellhound123
Hey guys, I'm trying to get radio buttons working on my survey form, but my input labels seem to be affected by my focus selectors that I used before. How can I get them to be below the title? I don't really want to use a <p> or heading element, or is that the only way? Here's the pen: https://codepen.io/Pixel123/pen/NzByep
AlbertoGiambone
@AlbertoGiambone
I need to square one array, I try to use " const squaredIntegers = a.map(Math.pow(a, 2));
"
but is non working..
Aditya
@ezioda004
@AlbertoGiambone .map() takes a callback function, so it should be const squaredIntegers = a.map(val => Math.pow(val, 2));
AlbertoGiambone
@AlbertoGiambone
@ezioda004 this don't return the square of the array
Aditya
@ezioda004
@AlbertoGiambone Seems to be working
const a = [2, 3, 4];
const squaredIntegers = a.map(val => Math.pow(val, 2));
console.log(squaredIntegers) // [4, 9, 16]
AlbertoGiambone
@AlbertoGiambone
@ezioda004 ahhh ok,
but in FCC don't
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
const squareList = (arr) => {
"use strict";
// change code below this line
function inter (int) {
return Number.isInteger();
};
const a = realNumberArray.filter(inter);
const squaredIntegers = a.map(val => Math.pow(val, 2));
// change code above this line
return squaredIntegers;
};
Moisés Man
@moigithub
@AlbertoGiambone seems like isInteger function missing something
which value u testing ?
AlbertoGiambone
@AlbertoGiambone
@moigithub const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
Moisés Man
@moigithub
function inter (int) {
return Number.isInteger();  /// u not passing anything to that function
};
const a = realNumberArray.filter(inter);
u can check syntaxis /examples here
http://mdn.io/isinteger
https://www.w3schools.com/jsref/jsref_isinteger.asp
AlbertoGiambone
@AlbertoGiambone

@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

Aditya
@ezioda004

@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.

AlbertoGiambone
@AlbertoGiambone
@ezioda004 ahhh ok thank's
German Gamboa Gonzalez
@germangamboa95
@padunk Yeah those have been giving my a hard time. I am going to throw CSS grid in there instead of using Materialize's grid since it still uses floats and that might be the cause of that.
@developer4eto thanks
Pixxel123
@Pixxel123
Still struggling with my earlier pen, is there any way to only select certain <labels>? I've tried putting all the ones I want to have the same effect in a class, but it's still affecting a few that I don't want to be affected
Pixxel123
@Pixxel123
I've figured it out, just had to add different classes to them, and change the focus selector to the relevant class instead of pointing at the label tag!
Kent Saeteurn
@sansae

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?

Ryan Williams
@Ryanwfile

The first challenge in SASS says to create a variable and assign it to the color property of the .blog-post class and h2 element, after doing this and getting the desired results on the screen the challenge says I need to "Your .blog-post element should have a </code>color</code> of red.
Your h2 elements should have a </code>color</code> of red."

Not sure what to do to make this work, here is the code

<style type='text/sass'>
$text-color:red; .blog-post, h2 { color:$text-color;
}
</style>
Daniel Feldman
@Feldbot
Hi, I'm working on the Simon app and trying to toggle a class with jQuery toggleClass. If you turn the game on and hit Strict mode, you will see that the class is being toggled on and off, but nothing is actually happening to my indicator above the button, which should turn red or black alternately when the button is clicked. I have a general .red-indicator css class that has a red background-color, but it isn't being applied. Any ideas why this isn't working?
Tom
@moT01
@Feldbot the properties you put on the id are taking precedence
add !important to your red indicator and it will work - background-color: rgb(255,0,0) !important;
Daniel Feldman
@Feldbot
@moT01 I tried changing div#strict_indicator to a class, and changing the order of .red-indicator in the css and it still didn't work.
Tom
@moT01
try removing the div from the selector
Daniel Feldman
@Feldbot
@moT01 Huh... removing div did the trick. Why did that work?
Tom
@moT01
selectors give value to what properties get applied
for instance you had div#strict_indicator
that has two selectors
which gives more value
than just #strict_indicator
so we lowered the value by removing the div which let the .red_indicator not get overridden
Moisés Man
@moigithub
"css specificity"
Tom
@moT01
something like that - adding !important makes it have the most value I think - so it's a good way to test if your properties are getting overridden by other properties
Daniel Feldman
@Feldbot
@moT01 I think I am still confused with some of the basics of css selector specificity. I thought by writing div#strict_indicator, I was just targeting one selector with an ID applied to it. How/when does it become two selectors? How do you check the value?
@moT01 I guess I was also under the impression that in writing my CSS it was good to use compound selectors by way of legible semantics, that one could more clearly see what the selection applied to that general, shorter selectors.
Tom
@moT01
im not sure if there's a way to check the value on the fly, but you could look it up - you used two selectors to target one element