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
CamperBot
@camperbot
exaland sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Hammad
@newnewb
@exaland you killed @camperbot !
Calat
@latimercaleb
I have a CS degree too. I also work in a non-coding role. That's why I came back to FCC to continue my training
Pawan0987
@Pawan0987
where can i get answer of freecodecamp challenge
Stephen James
@sjames1958gm
@Pawan0987 If you are looking for an answer you should be able to google and find the answer - the FCC forum might even have a place.
If you are wanting to get help solving a challenge, then ask your questions here
piratecoder
@jvondarke
Figure it out
Gulsvi
@gulsvi
@jvondarke Maybe they have and want to see how others have done it?
piratecoder
@jvondarke
@gulsvi ok so why are you tagging me in this
Gulsvi
@gulsvi
@jvondarke We usually tag people here to let them know who we're talking to. 16,955 people here.
piratecoder
@jvondarke
@gulsvi yea no shit
German Gamboa Gonzalez
@germangamboa95

function dropElements(arr, func) {
  var flag = false;
  arr = arr.filter(item => {
    if(flag){
      return true;
    }
    flag = func(item);

  });
  return arr;
}

dropElements([1, 2, 3], function(n) {return n < 3; });
What do you guys think of that solution? I already compared it to the other ones. I guess my main question is if using filter() makes it easier to understand.
Nate Mallison
@NJM8
@germangamboa95 which challenge is this?
I think you could make it much simple. You don't have to pass a function through to filter to set a flag. That's what filter is for.
function dropElements(arr) {
  return arr.filter(item => item < 3);
}

dropElements([1, 2, 3]);
unless you are trying to make a function with a custom filter feature.
German Gamboa Gonzalez
@germangamboa95
The drop it challenge. And it is a custom filter feature in the sense that after the first time it returns 'true' it must continue to return true even if the condition is false. There are simpler ways to do it. It was just my first instinct to go with that. @NJM8
abraham anak agung
@padunk
@germangamboa95 did you passed the challenge?
Nate Mallison
@NJM8
Yeah I guess my suggestion doesn't help at all. :smile:
German Gamboa Gonzalez
@germangamboa95
Yes! I mean I accidentally deleted my return statement inside the filter function while copypasting.
@NJM8 Thanks anyways lol
CamperBot
@camperbot
germangamboa95 sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @njm8 |http://www.freecodecamp.org/njm8
mbsyaswanth
@mbsyaswanth
https://codepen.io/mbs-yaswanth/pen/NyVezZ -why isnt the animation smooth. please tell me how to fix the animation. click on catlog to see the animation.
Nate Mallison
@NJM8
@mbsyaswanth It's because you are using margin to change the location of the boxes.
Sliding the boxes by changing the margin requires the browser to recalculate the position of each box many times over the duration of the animation
that makes a lot of work so things slow down
Andre Morise
@AndreMorise
Hello all, I'm trying to figure out how I can use justify-content: center with my flex children without having to set position-absolute on the parent
I left a comment in the html. Any help is appreciated. If doing this without position: absolute is not possible, is there a way to still make the "test" div appear below the photo?
mbsyaswanth
@mbsyaswanth
@NJM8 then what do i do?
Nate Mallison
@NJM8
@mbsyaswanth I think keyframes are great for more complex animations, I would just do transitions with a custom class: http://webdesignerwall.com/tutorials/easy-css-animation-transition-transforms
Nate Mallison
@NJM8
@AndreMorise You just want the test div to be below the picture?
Andre Morise
@AndreMorise
@NJM8 Yes I do. Trying to get some content below all of that but the position: absolute I had to use is conflicting with that.
mbsyaswanth
@mbsyaswanth
@NJM8 , then please tell me what transition to add. something cool, all the boxes should move and position into actual place after few seconds.
Daniel Slatkin
@DSlatkin
@AndreMorise You've set html and body to 100% but you haven't set #main to 100%
Calat
@latimercaleb
Can you force FCC to recognize es6?
Daniel Slatkin
@DSlatkin
Since header is flexing in the column direction, it's only as tall as its parent container #main... If you also set main to 100% height, you can take off position:absolute from header and set height: 100% on header as well
Ken Haduch
@khaduch
@latimercaleb - where are you trying to use it - in the challenges? You can add a // jshint esversion:6 at the top of your editor and see if that solves it for you.
Daniel Slatkin
@DSlatkin
Then justify-content:center works to center everything? Unless you want to only vertically center header and keep test underneath that (I've just realized)
Andre Morise
@AndreMorise
@DSlatkin OF COURSE! Life saver. Thank you!
CamperBot
@camperbot
andremorise sends brownie points to @dslatkin :sparkles: :thumbsup: :sparkles:
:cookie: 115 | @dslatkin |http://www.freecodecamp.org/dslatkin
Daniel Slatkin
@DSlatkin
:) I'm a newbie to this stuff but just started using flexbox and ran into similar things with height! So hopefully my advice works.
Nate Mallison
@NJM8
@AndreMorise Did it work? I was looking at the code for the tester, seems like they want it to be top left but my CSS skills leave something to be desired
Andre Morise
@AndreMorise
@NJM8 @DSlatkin Yeah it worked, adding a height to #main.
added*
Calat
@latimercaleb
Thanks @khaduch
CamperBot
@camperbot
latimercaleb sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles: