Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 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
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Brad
@bradtaniguchi
Haha, if I can't figure it out in like 2 mins I will have to say so, cant get too distracted :P
mpmaan
@mpmaan
no problem
here it is
Brad
@bradtaniguchi
Yea that one I haven't done (As I said earlier I only started the new FCC stuff) but that one mixes in some new ES6 stuff I'm not very good at, so I couldn't help you in my allotted 2 minutes unfortunantly haha
mpmaan
@mpmaan
lol..thanks
i have to sleep as well
Brad
@bradtaniguchi
Ill check out the spread-operator one on my lunch break (which is in a few hours) and see if I can figure it out, so if you ask me tomorrow (if you remember, and didn't figure it out) I MIGHT have the solution haha
Or at least be able to point you in the right direction
Moisés Man
@moigithub
a=[1,2,3]
copyOfa=[...a]
mpmaan
@mpmaan
i know how to use spread operator and copy array but don't know how to combine them for this challenge @moigithub
Brad
@bradtaniguchi
@moigithub If you got time/ finished the challenge already some insight would be nice :D
Moisés Man
@moigithub
check the test cases ?
copyMachine([true, false, true], 2) should return[[true, false, true], [true, false, true]]
mpmaan
@mpmaan
lol i did see them..seems kinda easy but i'm stuck
Moisés Man
@moigithub
soo basiclly u need to "push" n copies of that array passed
the loop is already there
mpmaan
@mpmaan
lol i just finished it :sunglasses:
Brad
@bradtaniguchi
hahaha
mpmaan
@mpmaan
i wrote newArr[num - 1] = [...arr]
@moigithub if there is any other way then i'm interested
Moisés Man
@moigithub
push, unshift, assign operator, concat
u can use any of those to add elements to the array
newArr.push([...arr])
newArr.unshift([...arr])
newArr=newArr.concat([...arr])
mpmaan
@mpmaan
i tried push() but i couldn't use spread operator ...this will work numArr.push(arr) but there is no spread operator
thanks @moigithub
Moisés Man
@moigithub
cuz arr contains same reference to the one being passed.. to make a real copy u need to use spread op
Brad
@bradtaniguchi
I feel stupid :P
mpmaan
@mpmaan
there will always be someone superior than you at a given point of time
Moisés Man
@moigithub
arrays and objects holds "memory location pointer"
soo when u do arr1 = arr2 basicly u copying the memory location instead of its values
Brad
@bradtaniguchi
Yea, but I should figured it out yo XD
like this BS: NaN === NaN // false
Mark
@vinarius
or typeof(NaN) //number
Brad
@bradtaniguchi
I ended-up usingNumber.isNaN(whatImChecking)caught me off guard tho
Aita Kane
@aita-kane
hello can someone help me with my dropdown please. I code the menu and and the container and content of my dropdown, but the problem is when I hover on "Mon panier" , I want the dropdown to be visible . Can someone help me with please ? the codepen link : https://codepen.io/akane96/pen/qKxqWE
richRocksCodeBlocks
@richRocksCodeBlocks
@aita-kane Have you seen this example? https://www.w3schools.com/Css/css_dropdowns.asp
Nate Mallison
@NJM8
@bradtaniguchi NaN === NaN // false makes sense if you think about it as it's something that is not a number, you don't know what it is but it isn't a number
try typeof NaN if you really want to mess with your head
Brad
@bradtaniguchi
My head has been messed with enough already today XD
Nate Mallison
@NJM8
lol
Alexander R Bott
@Abott1222
anyone play with webassembly? Is it worth coding the web in python yet? :P
Stephen
@stephepush
@Abott1222 I think we have to wait for someone to invent that wheel (python via web assembly)
unless that already happened. I assume you have to start from scratch? Web Assembly C then Web Assembly python, lol?
This es6 exercise... I dont even think it knows what it's doing:
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
  "use strict";
  // change code below this line
  arr = list; // change this
  // change code above this line
  return arr;
}
const arr = removeFirstTwo(source);
console.log(arr); // should be [3,4,5,6,7,8,9,10]
console.log(source); // should be [1,2,3,4,5,6,7,8,9,10];
abraham anak agung
@padunk
@stephepush you have to remove first two elements in array without mutating the original array. I think you can use .slice for that
Alexander R Bott
@Abott1222
@stephepush haha I know it is early... I just watched this: https://www.youtube.com/watch?v=ITksU31c1WY
Stephen
@stephepush
@padunk I thought the whole point was to not use slice and to instead use destructuring assingments in lieu of something that slice can easily do
@Abott1222 Haven’t watched the video but I look forward to the day that you can make web pages with python… jeesh
anthonygallina1
@anthonygallina1
:)
Simon Cordova
@gbsimon87
var state = {
    currentPlayer: '',
    teamRoster: [
        { name: 'GB', age: 30, location: 'London'},
        { name: 'Maren', age: 36, location: 'London'},
        { name: 'Daniel', age: 31, location: 'Toronto'},
    ]
}
Hey all, was wondering if anyone could offer some insight, I think I'm on the right track using Object.keys and map, but can't quite achieve it.
I've got an object, which one of the keys is an array of objects.
I need to get into one specific key and change the properties there...
For example, I'd like to click a button in the DOM which will increase age for the name 'GB'
mpmaan
@mpmaan
let oldAge = state.teamRoster[0].age ;
state.teamRoster[0].age = oldAge + incrementCount;
this might work