by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 14 22:38
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:37
    @bjorno43 banned @real-action
  • Feb 01 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • May 10 2019 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 27 2019 19:46
    @mstellaluna banned @zhonghuacx
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Apr 01 2019 18:11
    thecodingaviator labeled #31179
  • Apr 01 2019 18:11
    thecodingaviator labeled #31179
  • Apr 01 2019 18:09
    thecodingaviator commented #31179
  • Apr 01 2019 18:09
    thecodingaviator labeled #31182
  • Apr 01 2019 18:09
    thecodingaviator labeled #31182
  • Apr 01 2019 18:07
    thecodingaviator commented #31182
  • Apr 01 2019 18:07
    thecodingaviator labeled #31190
  • Apr 01 2019 18:07
    thecodingaviator labeled #31190
  • Apr 01 2019 18:07
    thecodingaviator commented #31190
  • Apr 01 2019 18:05
    thecodingaviator commented #31157
  • Apr 01 2019 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

Nathan
@terakilobyte
but.. if I may show you something
Suzanne Atkinson
@AdventureBear
sure
a sample of the data we collect
assuming you allow google analytics
which we hope you do for fcc
Suzanne Atkinson
@AdventureBear
can you filter it for me?
Cristián Berríos
@crisberrios
@AdventureBear last time I checked, just Math.ceil was missing. Your code passed the tests for me
Suzanne Atkinson
@AdventureBear
see what i've done specifically? if you do colelct by user, you could then use a smart algorithm to present challenging topics more often.
@crisberrios really?
inside bonfire it did?
Cristián Berríos
@crisberrios
that's right
Nathan
@terakilobyte
no it would be impossible for me to filter it to a user
ip isn’t collected
nor is your username or anything else
Suzanne Atkinson
@AdventureBear
cool.
Nathan
@terakilobyte
ah I see what you are saying
and it would be a cool idea if we had like 4-500 challenges
Suzanne Atkinson
@AdventureBear
:)
maybe for some folks who want it?
Nathan
@terakilobyte
then I could measure time vs average time per category
and serve challenges more often from the category you’re weak in
Suzanne Atkinson
@AdventureBear
I have a language program I use that lets you rate on a scale of 1-5 how well you knew the world. Workds you rate a 1 are relelntlessly presented very 3-4 cards until you at least give it a 2. Then it slows down and includes more new words. words you rate as a 5 hardly ever come back. Like "gracias" I'd rate a 5, but the verb tener I'd give it a 3.
it works well if there are small chunks of new material presented at a time. it'd be awful to just have relentless 1 out of 5 words shown over and over!
Suzanne Atkinson
@AdventureBear
Hot diggidy !! @crisberrios , @terakilobyte , @Sudeepto
  for (i=0; i<rows; i++) {
    //place correct "size" of elements into each new group
    multiArray[i] = arr.slice(i*size, (i+1)*size);
       //counter += 1; 
    }
this worked. rows is the math.ceil function
Cristián Berríos
@crisberrios
nice, you incorporated the slice method :D
you can use pretty much every method of Array in that bonifire
Nathan
@terakilobyte
all of our level 1 challenges are meant to walk you through the mdn
Evan Davis
@davisec52

Could anyone explain where the problem lies with the code sample below? This is code from a problem set in chapter 4 of Eloquent Javascript.

The first instance shows the code presenting an error, and in the second instance it runs without error. I don't see any difference other than the first list has three values and the first has two.


function nth(list, n) {
  if (!list)
    return undefined;
  else if (n == 0)
    return list.value;
  else
    return nth(list.rest, n - 1);
}
nth({value: 1, rest: {value: 2, rest: {value: 4, rest: null}}, 1);
VM140:10 Uncaught SyntaxError: Unexpected token )VM116:777 


function nth(list, n) {
  if (!list)
    return undefined;
  else if (n == 0)
    return list.value;
  else
    return nth(list.rest, n - 1);
}
nth({value: 1, rest: {value: 2, rest: null}}, 1);
2
Nathan
@terakilobyte
I suspect there’s more code than just that
Danny Fritz
@dannyfritz
nah, there are three {'s in the first invocation but only 2 }'s
Evan Davis
@davisec52
@terakilobyte the code is part of a larger problem set. It is the "list" problem in chapter 4. I didn't understand the nth function, so I was trying to look at it more closely.
For some reason, the list with two values works, but the list with three values does not.
Danny Fritz
@dannyfritz
i answered why. :(
Nathan
@terakilobyte
^
Danny Fritz
@dannyfritz
you're missing a } in the first invocation
Evan Davis
@davisec52
@dannyfritz Thank you. I'm sorry, I am just not seeing it.
Nathan
@terakilobyte
jshint.com
Danny Fritz
@dannyfritz
nth({value: 1, rest: {value: 2, rest: {value: 4, rest: null}}, 1);
if you remove all the contents we have nth({{{}}, 1);
Evan Davis
@davisec52
Is that not the same as the working sample?
Danny Fritz
@dannyfritz
nth({value: 1, rest: {value: 2, rest: null}}, 1); becomes nth({{}}, 1);
Evan Davis
@davisec52
Could you show me the extra "{" in the problematic sample?
Danny Fritz
@dannyfritz
it isn't that there is an extra {. It is that there is a missing }
Evan Davis
@davisec52

nth({value: 1, rest: {value: 2, rest: null}}, 1);
nth({value: 1, rest: {value: 2, rest: {value: 4, rest: null}}, 1);
Nathan
@terakilobyte
@davisec52 paste that code into jshint.com
get in the habit
use a linter