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
Victor
@VictorHall
@mitchstewart08 lol i know its bad
@moT01 okay
ill give it another shot
Tom
@moT01
not that bad
it would work
if you had a super computer
maybe
Victor
@VictorHall
@moT01 thanks
CamperBot
@camperbot
victorhall sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:warning: victorhall already gave mot01 points
Tom
@moT01
one way to maybe limit the loops performed would be to start a loop at all the numbers in the range multiplied by each other
i dont think i did that, but pretty sure it would work
wait, maybe not
something along those lines might help
John Nunns
@johnnunns
Any js experts on ?? :)
Tom
@moT01
im no expert, but i can try to help if you want
John Nunns
@johnnunns
@moT01 I'm on the Record Collection problem
And I'm struggling badly
quackidy
@quackidy
Thank you so much @dwquach and @khaduch
CamperBot
@camperbot
quackidy sends brownie points to @dwquach and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 277 | @dwquach |http://www.freecodecamp.com/dwquach
:star2: 2178 | @khaduch |http://www.freecodecamp.com/khaduch
Tom
@moT01
yea, can you be more specific at all? have any code to show?
Ken Haduch
@khaduch
@johnnunns - please post your code. It's not really too difficult once you get going in the right direction.
John Nunns
@johnnunns
function updateRecords(id, prop, value) {
  if(collection.tracks.hasOwnProperty()){
    return collection;
  }else if (collection.tracks.hasOwnProperty === false){
    collection.tracks.push
  }
It's very unfinished, I'm not sure if I'm headed in the right direction
Ken Haduch
@khaduch
@johnnunns - one question - does collection have a tracks property, ever? What kind of properties does collection have - the "first level" of properties. For that matter, what kind of structure is collection?
John Nunns
@johnnunns
I guess what you're telling me is that the tracks property belongs to the id which is the record number. correct?
so if I were going to push, it'd have to be collections.2548.tracks.push()
Ken Haduch
@khaduch
probably that's what I'm telling you, so if you have a collection, and an id, what would you do with that to try and find a tracks property? Your answer is close, but you have to make sure that you understand when you can use dot notation vs. bracket notation to access an object.
John Nunns
@johnnunns
alright. lets rework. Thanks @khaduch. mini lightbulb
CamperBot
@camperbot
johnnunns sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2179 | @khaduch |http://www.freecodecamp.com/khaduch
Tom
@moT01
say @khaduch, how my clock look?
http://codepen.io/moT01/pen/PbrzQo
John Nunns
@johnnunns
@khaduch
function updateRecords(id, prop, value) {
  if(collection["1245"].tracks.hasOwnProperty()){
    return collection;
  }else {
    collection['1245'].tracks.push("Don't know")
  }
Tom
@moT01
@johnnunns use the parameters, they will be different each time
Ken Haduch
@khaduch
@johnnunns - okay, that might work, but remember that you are getting different id values, and those values will be the numbers, so you should be able to use that variable in your data access.
Tom
@moT01
@johnnunns check out the syntax on the .hasownprop method
should be a link on that exercises page
John Nunns
@johnnunns
function updateRecords(id, prop, value) {
  if(collection["1245"].tracks.hasOwnProperty(prop)){
    return collection;
  }else {
    collection['1245'].tracks.push("Don't know");
  }
better?
Tom
@moT01
check out kens last message
1245 won't be 1245 every time
John Nunns
@johnnunns
why won't it always be 1245?? @moT01
Ken Haduch
@khaduch
@johnnunns - first things first - you HAVE TO USE THE id - there is no way to make it work otherwise! Check the test cases that will be run to validate your solution.
Tom
@moT01
if you hit the runtests button, you will see the different tests you need to pass
Ken Haduch
@khaduch
@moT01 - Pomodoro... Why did you decide to wrap from 1 to 99 when decrementing the session count? And break count. I don't think it's a bad idea, just a surprise.
John Nunns
@johnnunns
I know I have different tests, I just want to make sure I'm on the right track before I start the others. @moT01 @khaduch am I not using the id when i write 1245?
Tom
@moT01
no, @johnnunns you need to use the parameter sent to the function
youre using AN id, but not always the right one
Ken Haduch
@khaduch
@johnnunns - you are using an ID value that is in the data, that might be true, but you should just use the variable id because when you call the function, as they have one sample call at the bottom of the edit window, that value will be avaiable in the id variable and you'll be using it in the way that will be a general-purpose solution. But, for the sake of argument, you are using one of the values. So let's move on to the next thing. If you have this construct: collection["1245"] - what does that allow you to access within the data?