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
llamatarianism
@llamatarianism
@wannabecoding ubuntu 14.04
Alejandro Tejada
@wannabecoding
looks nice
never ventured into linux
wiki Record Collection
CamperBot
@camperbot

:point_right: checkpoint record collection [wiki]

Checkpoint: Record Collection

Instructions

You are given a JSON object representing (a small part of) your record collection. Each album is identified by a unique id number and has several properties. Not all albums have complete information.

Write a function which takes an id, a property (prop), and a value.

For the given id in collection:

If value is non-blank (value !== ""), then update or set the value for the prop.

If the prop is "tracks" and value is non-blank, push the value onto the end of the tracks array.

If value is blank, delete that prop.

Always return the entire collection object.

Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.

:pencil: read more about checkpoint record collection on the FCC Wiki

Justin
@daemedeor
@llamatarianism basically the first test for whatever reason (not really parsing it in my mind) will not pass, so change will get stuck maybe at the last time
you can possibly also check for i
llamatarianism
@llamatarianism
@daemedeor you mean change > worthArr[i]?
Justin
@daemedeor
@llamatarianism the entire first test
since both have to pass
you can add another check to the while loop to make sure i > 0 as well
i’m not really going to make sure its right or wrong
llamatarianism
@llamatarianism
@daemedeor I still don't see the problem though. if neither test passes, i is reduced by 1, so it checks if change is greater than 20, then 10, then 5, etc
Justin
@daemedeor
@llamatarianism yea but then what happens at 1 and it still never passes that test?
and change doesn’t get decremented enough
llamatarianism
@llamatarianism
@daemedeor good point
Justin
@daemedeor
change will go -1, -2, etc.
buonarfcc
@buonarfcc

I have modified with quote function phoneticLookup(lookup) {
var result = "";

// Setup

// Only change code below this line
lookup = {
'alpha': result ="Adams",
'bravo': result ="Boston",
'charlie':result ="Chicago",
'delta': result ="Denver",
'echo': result ="Easy",
'foxtrot': result ="Frank"

};
return result; // Only change code above this line
}
// Change this value to test
var bum = lookup("charlie");
//console.log(result);
phoneticLookup(bum);
//console.log(phoneticLookup.charlie); I got lookup is not defined?

Justin
@daemedeor
uhhh @buonarfcc i think you’re changing the wrong thing, you need to change the lines from lookup = {} to result… in fact now you’re changing the value of lookup
Rithvik Vibhu
@rithvikvibhu
@buonarfcc get the lookup object to key: value
var alpha = {
  1:"Z",
  2:"Y",
  3:"X",
  4:"W",
  ...
  24:"C",
  25:"B",
  26:"A"
};
@buonarfcc you will also need to quote the key, since they arent integers
Justin
@daemedeor
@rithvikvibhu he can leave them as integers
Rithvik Vibhu
@rithvikvibhu
@daemedeor the tests require them: phoneticLookup("alpha")
buonarfcc
@buonarfcc

@rithvikvibhu function phoneticLookup(lookup) {
var result = "";

// Setup

// Only change code below this line
lookup = {
'alpha': result ='Adams',
'bravo': result ='Boston',
'charlie':result ='Chicago',
'delta': result ='Denver',
'echo': result ='Easy',
'foxtrot': result ='Frank'

};
return result; // Only change code above this line
}
// Change this value to test
var bum = lookup("charlie");
//console.log(result);
phoneticLookup(bum); I still got : lookup is not defined?

Justin
@daemedeor
@rithvikvibhu you don’t technically…. have to put strings in quotes in objects for keys
i don’t do that because its type intensive :smile:
Trilok reddy
@Trilokreddy007
hi can any one help me understanding Generate Random Fractions with JavaScript
Justin
@daemedeor
4 extra button presses
llamatarianism
@llamatarianism
@daemedeor you're correct, that was the problem
@daemedeor thanks
CamperBot
@camperbot
llamatarianism sends brownie points to @daemedeor :sparkles: :thumbsup: :sparkles:
:star: 204 | @daemedeor | http://www.freecodecamp.com/daemedeor
Trilok reddy
@Trilokreddy007

function myFunction() {

// Only change code below this line.

return math.random()*myFunction;

// Only change code above this line.
}
it only says math is not defined

Justin
@daemedeor
Math.random()
;)
math isn’t defined
Elbert Cortez
@trip16661

$(document).ready(function() {
var api = "http://www.stands4.com/services/v2/quotes.php?uid=5004&tokenid=LQT1R9DoNwzUYS1O";
var apiAuthor = "&searchtype=AUTHOR&query=";
  var authorInput;
  $("#submit").on("click", function() {
    authorInput = $("#autor").val();



  });
});
Why is authorInput shows as undefined? D:
Malcolm
@noinkling
@buonarfcc you shouldn't be assigning result on every line in your object, and you shouldn't be naming your object the same as the argument
Justin
@daemedeor
@trip16661 because you misspelled author?
#autor is probably on the page as #author
i’m guessing cause everything else is spelled right
Rithvik Vibhu
@rithvikvibhu
@buonarfcc What we want is key: value;. In this case, key = alpha and so on and value is Adams. So it would look something like 'alpha': 'Adams'
The lookup object can then then be used in the return statement as lookup["alpha"]
We get the key in a variable (lookup), hence lookup[lookup]
Elbert Cortez
@trip16661
yes pretty much
im straight up retarded
ahahahahahaha im so dumb >_<
Trilok reddy
@Trilokreddy007
@ @daemedeor thanks
CamperBot
@camperbot
trilokreddy007 sends brownie points to @daemedeor :sparkles: :thumbsup: :sparkles:
:star: 205 | @daemedeor | http://www.freecodecamp.com/daemedeor
Elbert Cortez
@trip16661
i spent like 20 min looking all over the internet trying to find why xDD
random-x
@random-x
happens to the best of us, @Trilokreddy007 :D