Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
bitgrower
@bitgrower
I don't understand your question @asaki444
cfj2
@cfj2
@bitgrower Thankyou. I will go ponder this.
Garrett
@grrttmrtn

function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for (var i=0; i < multiplyAll.length; i++)
{
for (var j=0; j < multiplyAll[i].length; j++)
{
console.log(multiplyAll[i]*[j]);
}
}
// Only change code above this line
return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);

How much did I screw that up?
bitgrower
@bitgrower
@cfj2 -- you can use a loop -- but right now you are only going thru your loop one time and returning ... which isn't quite what you want ... so you probably don't want to use return in the loop ... because that takes you right out of your function ...

@grrttmrtn -- are you trying to ? :)

first you might want to use the length of arr instead of the length of multiplyAll (the function)

Garrett
@grrttmrtn
Ahh yeah...I started with that and stupidly came back and posted it with the function lol
But anyways, it still doesn't work
bitgrower @bitgrower re-programs @camperbot to recognize thank you
CamperBot
@camperbot
bitgrower sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 1307 | @camperbot | http://www.freecodecamp.com/camperbot
bitgrower
@bitgrower
er ... that is .. thankyou @camperbot
@grrttmrtn -- I know, that's why I said "first" ...
wanna try posting your revised code with cool syntax coloring ? Just follow the below instructions ...
explain format
CamperBot
@camperbot

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Garrett
@grrttmrtn

'function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for (var i=0; i < product.length; i++)
{
for (var j=0; j < product[i].length; j++)
{
console.log(product[i]*[j]);
}
}
// Only change code above this line
return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);'

Still messed up the formatting. One sec
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i=0; i < product.length; i++)
    {
      for (var j=0; j < product[i].length; j++)
        {
          console.log(product[i]*[j]);
        }
    }
    // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
CamperBot
@camperbot
:bulb: to format code use backticks! ``` more info
bitgrower
@bitgrower
you can edit the same message rather than re-posting ... and the backticks are the character to the left of the # 1 key on most keyboards
and ... product isn't an array ... so product.length is kinda meaningless ... you mean arr ?
asaki444
@asaki444
@bitgrower on the link that you sent it would only compare the parameters against i = 0. Why is that?
Garrett
@grrttmrtn
Okay, I changed lengths to arr and left console.log(product[i][j] still having issues with that
bitgrower
@bitgrower
okay ... your loops are still using product.length -- which isn't even valid because numbers do not have length properties, as far as I know ...
@asaki444 -- you'll have to be a whole lot more specific ... I'm sorry ...
@asaki444 -- are you referring to pythontutor.com/javascript.html ?
:point_up: March 3, 2016 6:53 PM @grrttmrtn
asaki444
@asaki444
@bitgrower yes that shite
site*
bitgrower
@bitgrower
you can edit your messages, @asaki444 -- just mouse over to the right, and just to the right of the time 3 dots will show up when you hover over them ... right click, you'll get a context menu, from which you can choose "edit" :)
Garrett
@grrttmrtn
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i=0; i < arr.length; i++)
    {
      for (var j=0; j < arr[i].length; j++)
        {
          console.log(arr[i]*[j]);
        }
    }
    // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
asaki444
@asaki444
@bitgrower thanks for the tip
CamperBot
@camperbot
asaki444 sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 706 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
@asaki -- it doesn't go past i= 0 because your code returns before it iterates to the next number ...
@grrttmrtn -- alright ... now we're starting to cook on all burners ... :)
asaki444
@asaki444
@bitgrower oh! so i should use console.log instead?
bitgrower
@bitgrower
LOL ... @asaki444 -- depends on what you're trying to do ...
Garrett
@grrttmrtn
Typically I've been doing alright with JS...this and the profile lookup are my last ones left, but this is way over my head
asaki444
@asaki444
@bitgrower trying to run the loop to find the match
bitgrower
@bitgrower
nah ... just a little mental adjustment and you'll be thinking ... "that's all that that was??? pfftttt....let me at the next challenge..."
Garrett
@grrttmrtn
console log is only going be what it reads out
it isn't going to fix your loop
bitgrower
@bitgrower
@asaki444 -- console.log is for debugging ... and what @grrttmrtn said ... it's not going to fix your loop ...
so @grrttmrtn .... you know how to address an element of an array, right ?
Garrett
@grrttmrtn
yup, I want to use dot notation
Sorry dot notation would be arr.whatever
but anyways yes arrary[0-X]
bitgrower
@bitgrower
@grrttmrtn -- . notation is for objects ... this is for an array ...