Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 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
markclynch
@markclynch
10 years ago I'm pretty sure it was all about floats
float / clear
Bjorn
@bjorno43
True, lol
markclynch
@markclynch
I haven't coded in 20 years
and when I did it was only C++
I looked at Javascript briefly, but thought nah that's for losers who can't code for realz
Bjorn
@bjorno43
Well if you know C++, todays languages should be quite the breeze, haha
markclynch
@markclynch
I "knew" it sorta, theoretically.
I never used it a day in my life, learned it in Comp Scie
then got into finance instead
They are easier to learn.
but I'm not sure they're tougher to master
Bjorn
@bjorno43
Oh ok. I only did C++ once. I was running a private World of Warcraft server and that was made in C++. So I started messing around with that
Next gigi hadid💁
@1Droka_twitter
WHAT i completed 11 of 1408 coding challenges :ok_woman:
markclynch
@markclynch
I'd like to re-learn C++ at some point and help my cryptocurrency's main dev doing stuff, but it's gonna take a lot
Bjorn
@bjorno43
@1Droka_twitter There you go :smile: Brace yourself though. It'll get progressively harder
markclynch
@markclynch
yeah, it'll start getting really annoying, get used to coming to this chat room :)
Bjorn
@bjorno43
I've dropped C++ after that. Picked up C# and finished my master in software engineering with it last year
markclynch
@markclynch
@bjorno43 You like C# that much better?
Bjorn
@bjorno43
@markclynch It's a lot easier than C++ and OOP. So ye, I definitely prefer it
AlbertoGiambone
@AlbertoGiambone

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?

alpox
@alpox
@AlbertoGiambone You forgot the () to call the function isInteger --> int.isInteger()
AlbertoGiambone
@AlbertoGiambone
if I put () this is the message: int.isInteger is not a function. (In 'int.isInteger()', 'int.isInteger' is undefined)
@alpox if I put () this is the message: int.isInteger is not a function. (In 'int.isInteger()', 'int.isInteger' is undefined)
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.