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
Adetunji Adegbite
@twonjee2002
from experience, which is the best way to start learning vue js?
n1zzy
@n1zzy
@twonjee2002 by coding...
Adetunji Adegbite
@twonjee2002
@n1zzy i already code but i use pure javascript and sometimes jquery. I am thinking vue will have some rules that is slightly different from what I am used to so I am asking for best approach from people who went through the same steps.
Norvin Burrus
@ndburrus
@twonjee2002 you may enjoy these: :sparkles:
n1zzy
@n1zzy
@twonjee2002 I don't have any experience with vuejs but I'm very sure that everyone with experience started here: https://vuejs.org/v2/guide/ you wont find better documentation elsewhere...everytime you want to learn something new look for the documentation of that said technology and learn at your own pace...
coderNewby
@coderNewby
@DarrenfJ thanks for the Pm
CamperBot
@camperbot
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2461 | @darrenfj |http://www.freecodecamp.org/darrenfj
Daniel Simeonov
@dbsimeonov
Morning guys ;)
Dhaval Vira
@dhavalveera
Afternoon Daniel
Daniel Simeonov
@dbsimeonov
How are you guys doing, Friday 13th and I'm up from bed really early than the usual. Will see how the code is gonna be :D
n1zzy
@n1zzy
@dbsimeonov are you at work or at home alone?
Daniel Simeonov
@dbsimeonov
Home.. in few hours going on holiday finally :sparkles: well deserved rest
n1zzy
@n1zzy
nice! good for you Daniel! looks like this friday the 13th is going to bring you luck!
Daniel Simeonov
@dbsimeonov
I've decided after the short break I will start the job hunting, so have couple of weeks to rest and after that the serious struggle will start :D
paulsda
@paulsda
Good morning guys
Markus Kiili
@Masd925
@paulsda Morning.
paulsda
@paulsda
What’s everybody doing today?
Fabien SHAN
@X140hu4
Reading :D
Markus Kiili
@Masd925
@paulsda Learning Clojure.
Daniel Simeonov
@dbsimeonov
still trying to decide coffee vs tea :D
paulsda
@paulsda
What are you reading Fabien?
Fabien SHAN
@X140hu4
paulsda
@paulsda
Bookmarked, thanks!
Victor De Los Santos
@rdelosh
hello night owls
Stephen James
@sjames1958gm
@rdelosh Morning :)
n1zzy
@n1zzy
var final_arr = [];
function steamrollArray(arr) {
    arr.some(function(el) {
        if (Array.isArray(el)) {
            steamrollArray(el);
        } else {
            final_arr.push(el);
        }
    });
    console.log(final_arr);
}
am I missing something?
when I run this locally it works
but in FCC it doesn't pass
eeflores
@eeflores
make final_arr local to function
alpox
@alpox
@n1zzy Don't use global variables. That messes things up
eeflores
@eeflores
should the function return the array?
n1zzy
@n1zzy
yes
making the variable local messes up the code...
'cuz if you look at it its recursive
alpox
@alpox
@n1zzy So you have to find another solution.
Like using a closure
And also, you have to return the final array from the function in the end which you did not do yet
Victor De Los Santos
@rdelosh
return the array
the final_arr
n1zzy
@n1zzy
yes ofcourse I returned it...
var final_arr = [];
function steamrollArray(arr) {
    arr.some(function(el) {
        if (Array.isArray(el)) {
            steamrollArray(el);
        } else {
            final_arr.push(el);
        }
    });
    return final_arr;
}
the one with console.log is for my editor so I can see the results
@sjames1958gm hey James do you have any idea what I might be doing wrong here?
Stephen James
@sjames1958gm
@n1zzy For FCC challenges, you cannot use global values, because they are not reset between each function
@n1zzy Looks like someone has mentioned that above
Victor De Los Santos
@rdelosh
might need to do something like
function(){
}
function closure(){
var final_arr = []
function steamrollarray(){
}
}
Stephen James
@sjames1958gm
@n1zzy With recursion you need to collect the values on the return path.
final_array.push(steamRollArray(el))