These are chat archives for FreeCodeCamp/Help

11th
Jan 2016
micahkid
@micahkid
Jan 11 2016 00:00
yes^
so it would start var lookup = {
"alpha": "Adams"...
don't forget commas
& you would return with - return lookup[val]
they really didn't explain in well in their example, especially how you would return that information
that's why that article helped explain it to me
it well*
Doandes Razvan
@Fuzyon
Jan 11 2016 00:03
yeah, i spent a lot of time on that waypoint
it's all good, at least we learn how to google things
Sujit Karki
@Swoozeki
Jan 11 2016 00:04
20 more waypoints to go on JavaScript
Feels like I've been doing this forever
micahkid
@micahkid
Jan 11 2016 00:05
@Fuzyon definitely, but now i'm stuck on the next haha
so it goes...
tommy
@tommygebru
Jan 11 2016 00:06
@Fuzyon @micahkid i see the light now!
yep it worked @Fuzyon thanks @micahkid thanks
micahkid
@micahkid
Jan 11 2016 00:06
@tommygebru glad you figured that one out!
CamperBot
@camperbot
Jan 11 2016 00:07
tommygebru sends brownie points to @fuzyon and @micahkid :sparkles: :thumbsup: :sparkles:
:star: 213 | @micahkid | http://www.freecodecamp.com/micahkid
:star: 109 | @fuzyon | http://www.freecodecamp.com/fuzyon
micahkid
@micahkid
Jan 11 2016 00:08
now if you figure out this next one let me know >_<
i'll give all the upboats
tommy
@tommygebru
Jan 11 2016 00:10
most definetly! can you help explain the instructions for Waypoint: Accessing Objects Properties with Variables Incomplete
http://www.freecodecamp.com/challenges/waypoint-accessing-objects-properties-with-variables
duan walker
@duanwalker
Jan 11 2016 00:10
bf sorted union
Nicole F.
@gitasong
Jan 11 2016 00:10

In order for the computer to compare two different data types (for example, numbers and strings), it must convert one type to another. Once it does, however:

[insert table here]

CamperBot
@camperbot
Jan 11 2016 00:11

:fire:Bonfire: Sorted Union :link:

function unite(arr1, arr2, arr3) {
  return arr1;
}

unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);

Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.

more info:  bf details | bf links | hint

Nicole F.
@gitasong
Jan 11 2016 00:11

*Once it does, however, it can compare terms as follows:

[insert table here]

micahkid
@micahkid
Jan 11 2016 00:13
@tommygebru okay so you're only changing two variables - playNumber & player
@tommygebru 'playerNumber should be a number' & they want you to lookup player # 16
so var playerNumber = 16; @tommygebru
now you have playerNumber assigned
you use that in the player variable
along with your testObj variable
using brackets
so testObj[playerNumber]
Tony Miri
@TonyMiri
Jan 11 2016 00:17
What am I missing here?
// Setup
var collection = {
    2548: {
      album: "Slippery When Wet",
      artist: "Bon Jovi",
      tracks: [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    2468: {
      album: "1999",
      artist: "Prince",
      tracks: [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    1245: {
      artist: "Robert Palmer",
      tracks: [ ]
    },
    5439: {
      album: "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function update(id, prop, value) {
  if(value !== "") {
    collection[id][prop] = value;
  } else if(prop == "tracks" && value !== "") {
    collection[id][prop].push(value);
  } else {
    delete collection[id][prop];
  }


  return collection;
}

// Alter values below to test your code
update(5439, "artist", "ABBA");
my else if isn't working
Simon
@simonshum
Jan 11 2016 00:18
can anyone give me a few pointers for checkpoint: counting cards?
tommy
@tommygebru
Jan 11 2016 00:18
@micahkid thanks :smile:
micahkid
@micahkid
Jan 11 2016 00:19
var playerNumber = 16; // Change this Line
var player = testObj[playerNumber]; // Change this Line
@tommygebru did that work?
tommy
@tommygebru
Jan 11 2016 00:20
@micahkid yes
micahkid
@micahkid
Jan 11 2016 00:20
@tommygebru nice
Ashley
@atan77
Jan 11 2016 00:22
@FatTone225 you have two value !== "" tests
micahkid
@micahkid
Jan 11 2016 00:22
still can't figure out Testing Objects for Properties
Tony Miri
@TonyMiri
Jan 11 2016 00:22
@atan77 Yeah I was just looking at that. If I switch the first and the second one it should work right?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:23
@simonshum Remember that case statements allow 'falling through.'
Ashley
@atan77
Jan 11 2016 00:23
@FatTone225 give it a go
Doandes Razvan
@Fuzyon
Jan 11 2016 00:23
@Fattone225 you need to switch the second with the first one
micahkid
@micahkid
Jan 11 2016 00:23

// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
}
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return "Not Found";
}

// Test your code by modifying these values
checkObj("gift");

Tony Miri
@TonyMiri
Jan 11 2016 00:24
@atan77 Yeah it worked. Thanks.
CamperBot
@camperbot
Jan 11 2016 00:24
fattone225 sends brownie points to @atan77 :sparkles: :thumbsup: :sparkles:
:star: 419 | @atan77 | http://www.freecodecamp.com/atan77
micahkid
@micahkid
Jan 11 2016 00:24
I'm sure I f'd that up some how
tommy
@tommygebru
Jan 11 2016 00:24
if true return string else return not found
Simon
@simonshum
Jan 11 2016 00:25
@DevPoetsSociety so am i worrying about addition of cards? or am i just changing the case based on 1 card count
micahkid
@micahkid
Jan 11 2016 00:26
I'm getting syntax error: illegal return @tommygebru
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:26
@simonshum The cards alter the count (it's a rolling total)
@simonshum So, eval the card, alter the count, and return the bet advice.
tommy
@tommygebru
Jan 11 2016 00:28
@micahkid an extra }
micahkid
@micahkid
Jan 11 2016 00:29
@tommygebru i'm not even sure if that statements are right
tommy
@tommygebru
Jan 11 2016 00:30
@micahkid yeah looks like my earlier code
micahkid
@micahkid
Jan 11 2016 00:31
@tommygebru I haven't found anything relating to it searching yet...
i'm gonna take a break soon I think :P
Enraemichele
@Enraemichele
Jan 11 2016 00:32
How do you find a remainder in Javascript? I keep trying to use % because that's what it says, but the checkmarks below say "I need to use the % operator" when I already have.
Andrew Kumlin
@Kumlin
Jan 11 2016 00:33
I'm having a problem completing this waypoint, when I run the code I'm told I have a TypeError and that it cannot read '1' of undefined. I've tried a lot of different combinations and don't understand why this one doesn't work.
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

var secondTree = myPlants.trees[1]; // Change this line
Nahum T
@nahomtefera
Jan 11 2016 00:33
Hey guys I have problem trying to solve the exercise Checkpoint: Record Collection
// Setup
var collection = {
    2548: {
      album: "Slippery When Wet",
      artist: "Bon Jovi",
      tracks: [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    2468: {
      album: "1999",
      artist: "Prince",
      tracks: [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    1245: {
      artist: "Robert Palmer",
      tracks: [ ]
    },
    5439: {
      album: "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function update(id, prop, value) {


  return collection;
}

// Alter values below to test your code
update(5439, "artist", "ABBA");
tommy
@tommygebru
Jan 11 2016 00:34
@micahkid of course breaks are necessary
Nahum T
@nahomtefera
Jan 11 2016 00:34
@Kumlin I thinks its myPlants[1].list[1]
Doandes Razvan
@Fuzyon
Jan 11 2016 00:34
@nahomtefera just a tip, start with the second instruction and then with the first
tommy
@tommygebru
Jan 11 2016 00:35
@Kumlin your are trying to access trees but it is already a value and not an array
Simon
@simonshum
Jan 11 2016 00:35

@DevPoetsSociety am i on the right track?
var count = 0;

function cc(card) {
// Only change code below this line

switch (card) {
case 2;
case 3;
case 4;
case 5;
case 6;
var count = count + 1;
break;
case 7;
case 8;
case 9;
var count = count + 0;
break;
case 10;
case 'J';
case 'Q';
case 'K';
case 'A';
var count = count - 1;
break;
}

if (value > 0) {
return count + "Bet";
} else if ( value <= 0 ) {
return count + "Hold";
}

// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(4); cc('5'); cc('6');

Andrew Kumlin
@Kumlin
Jan 11 2016 00:35
var secondTree = myPlants[1].list[1];
I just figured it out after asking, I feel dumb. It's because it's an array within an array not an array in an object....
Nahum T
@nahomtefera
Jan 11 2016 00:35
@Fuzyon Thanks, I will try that :)
CamperBot
@camperbot
Jan 11 2016 00:35
nahomtefera sends brownie points to @fuzyon :sparkles: :thumbsup: :sparkles:
:star: 110 | @fuzyon | http://www.freecodecamp.com/fuzyon
Andrew Kumlin
@Kumlin
Jan 11 2016 00:36
@nahomtefera @tommygebru Thanks for your help anyways!
CamperBot
@camperbot
Jan 11 2016 00:36
kumlin sends brownie points to @nahomtefera and @tommygebru :sparkles: :thumbsup: :sparkles:
:star: 232 | @tommygebru | http://www.freecodecamp.com/tommygebru
:star: 247 | @nahomtefera | http://www.freecodecamp.com/nahomtefera
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:36
@simonshum That's the idea. You can ignore Cases where it doesn't alter the count
Doandes Razvan
@Fuzyon
Jan 11 2016 00:36
@simonshum I think you need to add card values to every case
i mean, not card values
ugh, I don't know how to explain it :D
Simon
@simonshum
Jan 11 2016 00:37
@Fuzyon @DevPoetsSociety i am confused, but this isn't uncommon
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:38
@simonshum You need a space between the count and "Bet" etc.
Dylan
@Steers91
Jan 11 2016 00:39
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d) {
  console.log(c + d);
}
myFunction(1, 2);
I'm getting a RangeError: Maximum call stack size exceeded, anyone know why?
From this waypoint "Waypoint: Passing Values to Functions with Arguments"
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:41
@Steers91 Try refreshing the page
Dylan
@Steers91
Jan 11 2016 00:41
@DevPoetsSociety Ok that worked, I was so confused I was like nothing about this shouldn't work lol
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:42
It happens sometimes :)
Dylan
@Steers91
Jan 11 2016 00:42
Thank you @DevPoetsSociety
CamperBot
@camperbot
Jan 11 2016 00:42
steers91 sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
Simon
@simonshum
Jan 11 2016 00:42
@Fuzyon @DevPoetsSociety , looks like that did it. Thanks a bunch!
CamperBot
@camperbot
Jan 11 2016 00:42
simonshum sends brownie points to @fuzyon and @devpoetssociety :sparkles: :thumbsup: :sparkles:
:star: 325 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
:star: 111 | @fuzyon | http://www.freecodecamp.com/fuzyon
:star: 326 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
Jelani Thompson
@JelaniThompson
Jan 11 2016 00:42
Hey there, if anyone's available to help with this question it would be greatly appreciated! https://stackoverflow.com/questions/34712543/cant-access-class-with-jquery
Sujit Karki
@Swoozeki
Jan 11 2016 00:43
waypoint classes getting increasingly confusing...
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 00:44
Just take your time and read the pages they point you at. If you have trouble with them, try the ones at w3schools. They can be clearer for newbies.
Xavier Artot
@xavierartot
Jan 11 2016 00:46
HI
Checkpoint: Stand in Line is a problem for me:
Andrew Kumlin
@Kumlin
Jan 11 2016 00:47
I keep forgetting that if you're going to edit a JSON using variables that is needs to be in bracket notation.
Xavier Artot
@xavierartot
Jan 11 2016 00:47

```// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
// Your code here
arr.push(item);
var i =arr.shift(item);

return i; // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));
```

I don't understand this question?
Sujit Karki
@Swoozeki
Jan 11 2016 00:48
^That should be correct
Xavier Artot
@xavierartot
Jan 11 2016 00:49
me ?
mine?
Sujit Karki
@Swoozeki
Jan 11 2016 00:49
yeah
Xavier Artot
@xavierartot
Jan 11 2016 00:49
nothing works?
Sujit Karki
@Swoozeki
Jan 11 2016 00:49
ohh, actually, found the problem, wait
you need to arr.shift() the first element in myArr
Xavier Artot
@xavierartot
Jan 11 2016 00:50
` var i =arr[0];
Sujit Karki
@Swoozeki
Jan 11 2016 00:50
for that, you don't need to put anything inside shift();
Brian
@sludge256
Jan 11 2016 00:50
shift will return the first element of the array as well as removing it
Xavier Artot
@xavierartot
Jan 11 2016 00:51
because in an index tab?
if I do: var i =arr[0]; then unShift the array
?
it still doesn't work
Sujit Karki
@Swoozeki
Jan 11 2016 00:52
arr.shift(); will remove the first element. That's all you need to do. Then return that removed value
Xavier Artot
@xavierartot
Jan 11 2016 00:53

```function queue(arr, item) {
// Your code here
arr.push(item);
arr.shift();

return i; // Change this line
}```

?
Sujit Karki
@Swoozeki
Jan 11 2016 00:54
var i=arr.shift();
or you could just return arr.shift();
arr.push(item);
var i =arr.shift();
return i;
Xavier Artot
@xavierartot
Jan 11 2016 00:55
still doesn't work
function queue(arr, item) {
  // Your code here
  arr.push(item);
  i =arr.shift();

  return i;  // Change this line
}
Sujit Karki
@Swoozeki
Jan 11 2016 00:55
you should make the "i" variable before initializing it.
var i=arr.shift();
Xavier Artot
@xavierartot
Jan 11 2016 00:56
the variable are global in the case I don't have any code, is not a big deal?
i = global varable in the windows scope?
and still doesn't work
with var i
in the function scope
Sujit Karki
@Swoozeki
Jan 11 2016 00:57
arr.push(item);
return arr.shift();
all you need is that^
tommy
@tommygebru
Jan 11 2016 00:58
@xavierartot remove i for someething else or arr= myArr
matthew3454
@matthew3454
Jan 11 2016 00:58
Y
Xavier Artot
@xavierartot
Jan 11 2016 00:58
function queue(arr, item) {
  // Your code here
arr.push(item);
return arr.shift();
}
you mean assign a variable in for the shift?
I thing is bug with this new waypoint
Sujit Karki
@Swoozeki
Jan 11 2016 01:00
^that code didn't work for you?
Xavier Artot
@xavierartot
Jan 11 2016 01:01
yes
Sujit Karki
@Swoozeki
Jan 11 2016 01:01
otherwise, refresh the page and submit again
Xavier Artot
@xavierartot
Jan 11 2016 01:01
not working
It work after a refresh, weird
Sujit Karki
@Swoozeki
Jan 11 2016 01:01
aha
Xavier Artot
@xavierartot
Jan 11 2016 01:02
:(
I spent hour on this
thanks guys
Swoozeki :+1:
Sujit Karki
@Swoozeki
Jan 11 2016 01:02
You learnt a lesson that sometimes you just have to turn it off and then on again
Xavier Artot
@xavierartot
Jan 11 2016 01:03
wep
I almost hang myself
:)
Sujit Karki
@Swoozeki
Jan 11 2016 01:03
continue hanging in there
I'm hanging not too far from you
Xavier Artot
@xavierartot
Jan 11 2016 01:04
cool
Adam Snetiker
@ajsnetiker
Jan 11 2016 01:04
@xavierartot Try this, it’s from memory but I think this is what I did (without the comments):
arr.push(item); \\adds item to end of array
var removed = arr.shift(); \\removes first element in array and stores it
return removed;
Xavier Artot
@xavierartot
Jan 11 2016 01:05
function queue(arr, item) {
  // Your code here
  arr.push(item);
  i =arr.shift();

  return i;  // Change this line
}
my code was good it just from the refresh page the problem
but thanks
Harrison
@GoMagikarp
Jan 11 2016 01:06
Hey, I'm having some trouble with the Basic JS Waypoint 33.
Not sure if its a bug or me
Adam Snetiker
@ajsnetiker
Jan 11 2016 01:06
col, ive never run into that
ah yours is the same thing but you used i
Harrison
@GoMagikarp
Jan 11 2016 01:06

// Setup
var myStr = "Jello World";

// Only change code below this line
myStr = "Hello World";
myStr[0] = "H"; // Fix Me

Rachel
@rcmoldovan
Jan 11 2016 01:06

Hey guys, I'm stuck on something easy! I'm on this one:Waypoint: Increment a Number with Javascript
You can easily increment or add one to a variable with the ++ operator.

i++;

is the equivalent of

i = i + 1;

Note
The entire line becomes i++;, eliminating the need for the equal sign.

Instructions
Change the code to use the ++ operator on myVar.

Xavier Artot
@xavierartot
Jan 11 2016 01:07
that's mean I have to use another environment
more consistent
Rachel
@rcmoldovan
Jan 11 2016 01:07

but my code looks like this: var myVar = 86;

// Only change code below this line
myVar = i++;

Tony Miri
@TonyMiri
Jan 11 2016 01:07

Hey guys. Is there an acceptable syntax in JavaScript that would allow me to write shorter true/false checks in an if() statement? For instance if I want to check multiple cases within the same if() statement I have to keep using the OR operator.

if(a !== 0 || a !== b || a !== c ) etc..

is there a shorter syntax to check all three cases at once?

Sujit Karki
@Swoozeki
Jan 11 2016 01:08
@GoMagikarp get rid of myStr[0]="H";
Andrew Kumlin
@Kumlin
Jan 11 2016 01:08
@rcmoldovan What code have you written
Harrison
@GoMagikarp
Jan 11 2016 01:08
@rcmoldovan myVar++;
Brian Daub
@briandaub
Jan 11 2016 01:08
@GoMagikarp you cannot change the contents of myStr[0]
you have to change the whole string
Andrew Kumlin
@Kumlin
Jan 11 2016 01:08
@rcmoldovan nvm I missed what you had typed lol sorry
Xavier Artot
@xavierartot
Jan 11 2016 01:09
@FatTone225 sound good and you respect the data typw
typw
Rachel
@rcmoldovan
Jan 11 2016 01:09
I have written: myVar = i++;
Xavier Artot
@xavierartot
Jan 11 2016 01:09
it depend what do you want to do
?
Brian Daub
@briandaub
Jan 11 2016 01:09
so just myStr = “Hello World”;
Harrison
@GoMagikarp
Jan 11 2016 01:09
Thanks @briandaub
CamperBot
@camperbot
Jan 11 2016 01:09
gomagikarp sends brownie points to @briandaub :sparkles: :thumbsup: :sparkles:
:star: 332 | @briandaub | http://www.freecodecamp.com/briandaub
Harrison
@GoMagikarp
Jan 11 2016 01:10
and @Swoozeki
Xavier Artot
@xavierartot
Jan 11 2016 01:10
FatTone32
you can use a loop for for that
or a while
Harrison
@GoMagikarp
Jan 11 2016 01:10
new to this brownie biz.... thanks @Swoozeki
CamperBot
@camperbot
Jan 11 2016 01:10
gomagikarp sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 215 | @swoozeki | http://www.freecodecamp.com/swoozeki
Xavier Artot
@xavierartot
Jan 11 2016 01:10
is more appropriate
Rachel
@rcmoldovan
Jan 11 2016 01:10
@GoMagikarp ahhh that worked! Didn't realize I needed to change the "i" completely! Fantastic!
Tony Miri
@TonyMiri
Jan 11 2016 01:11
@xavierartot I'm just wondering if some syntax like
if(a !== 0, b, c)
does that exist?
Xavier Artot
@xavierartot
Jan 11 2016 01:11
no
if is not a function
you have to use an operator
Andrew Kumlin
@Kumlin
Jan 11 2016 01:11
@FatTone225 That would be convenient if it did work like that !
Xavier Artot
@xavierartot
Jan 11 2016 01:12
id going to crash?
Tony Miri
@TonyMiri
Jan 11 2016 01:12
@xavierartot I don't think you're understanding what I mean. @Kumlin So I take it that there is no shorter way.
Xavier Artot
@xavierartot
Jan 11 2016 01:12
if can be separate by the comma
I never seen that
Andrew Kumlin
@Kumlin
Jan 11 2016 01:12
@FatTone225 I tried this earlier today and it didn't work. There may be a way to correctly implement that but you're better of using a switch
Wait no disregard
Xavier Artot
@xavierartot
Jan 11 2016 01:13
if( you have to use an operator to separate and not a comma)
Jelani Thompson
@JelaniThompson
Jan 11 2016 01:13
Hey guys so I have this
//Set time dynamically
let setTime = function(minutes, seconds) {
    minutes = time.setMinutes(minutes);
    seconds = time.setSeconds(seconds);
}

//Default value for minutes and seconds (25)
setTime(25, 0);

console.log(setTime.minutes);
Does anyone know why setTime.minutes might be returning as undefined?
Am I accessing the argument correctly>
?*
tommy
@tommygebru
Jan 11 2016 01:15
has anyone had any luck with this Waypoint: Testing Objects for Properties
http://www.freecodecamp.com/challenges/waypoint-testing-objects-for-properties#
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:16
@tommygebru Yup. Just remember .hasOwnProperty returns a boolean.
Sujit Karki
@Swoozeki
Jan 11 2016 01:16
Can somebody tell me what the difference and where to apply each type of brackets in a JSON object? [] and {}
tommy
@tommygebru
Jan 11 2016 01:17
yes it is an automatic response but I cannot get the console to read
Andrew Kumlin
@Kumlin
Jan 11 2016 01:17
@FatTone225 @xavierartot Why commas are actual operators in if statements For example if (true, false) would evaluate to false even though it checks both of them.
Herman Fassett
@HermanFassett
Jan 11 2016 01:17
@Swoozeki {} is for the object, [] can be for arrays in an object...
Sujit Karki
@Swoozeki
Jan 11 2016 01:18
^okay, I'll try to make sense of that
tommy
@tommygebru
Jan 11 2016 01:18
@HermanFassett :+1:
Elifaz Filho
@Elifaz
Jan 11 2016 01:19
@JelaniThompson I think that although your setTime function is also an object, it can’t be called like that, that’s why is returning undefined, because the property minutes doesn’t exist, I meant it does exist as an argument..which is also a property but it won’t ever show up this way.
Sujit Karki
@Swoozeki
Jan 11 2016 01:19
so, this [{},{}] is basically an array of objects?
tommy
@tommygebru
Jan 11 2016 01:19
@Swoozeki yes
Xavier Artot
@xavierartot
Jan 11 2016 01:19
Kumlin :clap:
really interissing
Elifaz Filho
@Elifaz
Jan 11 2016 01:20
@JelaniThompson show the remainder of your code so we can take a look at it.
Sujit Karki
@Swoozeki
Jan 11 2016 01:20
@tommygebru @HermanFassett thank you
CamperBot
@camperbot
Jan 11 2016 01:20
swoozeki sends brownie points to @tommygebru and @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 1326 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
:star: 233 | @tommygebru | http://www.freecodecamp.com/tommygebru
Kumlin :+1:
Jelani Thompson
@JelaniThompson
Jan 11 2016 01:21
Here's my entire file
tommy
@tommygebru
Jan 11 2016 01:21
@DevPoetsSociety here is my code that i keep coming back to ....
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here

myObj.hasOwnProperty("gift");
myObj.hasOwnProperty("pet");
myObj.hasOwnProperty("bed");

}

// Test your code by modifying these values
checkObj("gift");
Brian
@sludge256
Jan 11 2016 01:22
You'll want to use the function's parameter
Andrew Kumlin
@Kumlin
Jan 11 2016 01:22
@xavierartot Google sleuthing at its finest haha
Sujit Karki
@Swoozeki
Jan 11 2016 01:23
@tommygebru the .hasOwnProperty() method return a boolean true or false. So, use that boolean in an if statement to do something with it
micahkid
@micahkid
Jan 11 2016 01:24
@tommygebru figure this out yet? ha i'm back to take a crack at it again...
Xavier Artot
@xavierartot
Jan 11 2016 01:24
so that's mean I can do if(i !== 2, 4,6)
jdubdigi
@jdubdigi
Jan 11 2016 01:25
@MDAWebDev Hi, I added two else if conditions to calculate the scores for an eagle, and submitted my correct code below. Even grumpy cat approves!
micahkid
@micahkid
Jan 11 2016 01:25
function checkObj(checkProp) {
}
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
}
else {
return "Not Found";
}
^ my last attempt at...
Xavier Artot
@xavierartot
Jan 11 2016 01:26
i!==4, i!==6 return true
Chris Durden
@PatchRhythm
Jan 11 2016 01:26
would anyone care to elaborate on Checkpoint: Word Blanks?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:26
@micahkid That's not working?
micahkid
@micahkid
Jan 11 2016 01:26
¯_(ツ)_/¯
jdubdigi
@jdubdigi
Jan 11 2016 01:26

@MDAWebDev function golfScore(par, strokes) {
// Only change code below this line

if (strokes === 1) {
return ("Hole-in-one!");
} else if (strokes - par === -2) {
return ("Eagle");
} else if (strokes - par === -3) {
return ("Eagle");
} else if (strokes - par === -1) {
return ("Birdie");
} else if(strokes - par === 0) {
return ("Par");
} else if (strokes - par === 1) {
return ("Bogey");
} else if (strokes - par === 2) {
return ("Double Bogey");
} else if (strokes - par >= 3) {
return ("Go Home!");
} else {

return "golfScore";
// Only change code above this line
}
}
// Change these values to test
golfScore(5, 2);

Sujit Karki
@Swoozeki
Jan 11 2016 01:26
@micahkid that should work
tommy
@tommygebru
Jan 11 2016 01:26
@micahkid @Swoozeki right and this passes and executes the first true statement
micahkid
@micahkid
Jan 11 2016 01:26
@Swoozeki keep getting syntext error for illegal return
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:27
@PatchRhythm What's up with it?
Chris Durden
@PatchRhythm
Jan 11 2016 01:27
i'm not sure what is supposed be done.
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:27
@jdubdigi Good candidate for a Switch
Sujit Karki
@Swoozeki
Jan 11 2016 01:27
function checkObj(checkProp) {
} //this bracket closes the function. That's why
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
}
else {
return "Not Found";
}
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:28
People: format please:
help format
CamperBot
@camperbot
Jan 11 2016 01:28

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

Sujit Karki
@Swoozeki
Jan 11 2016 01:28
move that bracket to after return "Not Found"
Elifaz Filho
@Elifaz
Jan 11 2016 01:28

so I am trying to place my tweet button and it will simply not move, and when it does
the anchor tag will not work, here is what I did

// Grabbed the button code from the twitter developer helper 
 <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Quote%20of%20the%20day: " data-size="large"></a>

I added a new class on top of the button to be able to manage it’s position:

      <div class="twitter”>
          // <a> element in here:
      </div>

CSS:

.twitter {
  position: absolute;
  padding-top: 0.7em;
  padding-left: 55em;
}

So the button will go to where I want, but the anchor tag won’t work anymore, unless I get rid of the div, how can I fix that?

Sujit Karki
@Swoozeki
Jan 11 2016 01:30
^ try .twitter a{} instead?
Elifaz Filho
@Elifaz
Jan 11 2016 01:30
@Swoozeki good point. let me try
micahkid
@micahkid
Jan 11 2016 01:30
@Swoozeki thanks! you rock
CamperBot
@camperbot
Jan 11 2016 01:30
micahkid sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 217 | @swoozeki | http://www.freecodecamp.com/swoozeki
micahkid
@micahkid
Jan 11 2016 01:30
that was the issue
Sujit Karki
@Swoozeki
Jan 11 2016 01:30
no problem
Elifaz Filho
@Elifaz
Jan 11 2016 01:30
@Swoozeki nope
@Swoozeki actually it will move the anchor tag which is being housed by the js code, I didn’t put in here because I thought it wouldn’t make a difference, but here it is:
// Adding tweet button
window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };

  return t;
}(document, "script", "twitter-wjs"));
micahkid
@micahkid
Jan 11 2016 01:32
@DevPoetsSociety thanks for your help I think you're the one that helped with that earlier
CamperBot
@camperbot
Jan 11 2016 01:32
micahkid sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
Elifaz Filho
@Elifaz
Jan 11 2016 01:32
I really have no idea of why the anchor tag would stop working if I have a div wrapped above it
CamperBot
@camperbot
Jan 11 2016 01:32
:star: 328 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:33
@micahkid o/
Tony Miri
@TonyMiri
Jan 11 2016 01:34
function rot13(str) { // LBH QVQ VG!

  var decoded = "";

  for (i = 0; i < str.length; i++) {
   if(str.charCodeAt(i) > 100){
     decoded += str.charAt(i);
    } else if (str.charCodeAt(i) - 13 >= 65) {
      decoded += String.fromCharCode(str.charCodeAt(i) - 13);
    } else {
      decoded += String.fromCharCode(str.charCodeAt(i) + 13);
    }
  }

  return decoded;
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
Anyone able to tell me why my punctuation and spaces aren't displaying properly?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:35
Change 100 to 90
Tony Miri
@TonyMiri
Jan 11 2016 01:36
Still no good. My thinking was that all the punctuation and spaces are in the 2000 range in unicode and so would be handled by the first statement. Or am I wrong about that?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:36
Probably easiest to check if it's in the capitals range (65-90) and pass everything else
Tony Miri
@TonyMiri
Jan 11 2016 01:36
All of my spaces are turning into dashes
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:37
You're treating everything below 100 as a character. Spaces are really low. Check the 65-90 range first, pass everything else.
Ray
@rbjr
Jan 11 2016 01:44
help Waypoint: Accessing Objects Properties with Variables
CamperBot
@camperbot
Jan 11 2016 01:44

:point_right: waypoint accessing objects properties with variables [wiki]

Waypoint: Accessing Objects Properties with Variables

Another use of bracket notation on objects is to use a variable to access a property. This can be very useful for iterating through lists of the object properties or for doing the lookup.

Here is an example of using a variable to access a property:

var someProp = "propName";
var myObj = {
  propName: "Some Value"
}

myObj[someProp]; // "Some Value"
Note that we do not use quotes around the variable name when using it to access the property because we are using the value of the variable, not the name
:pencil: read more about waypoint accessing objects properties with variables on the FCC Wiki

Alexander Køpke
@alexanderkopke
Jan 11 2016 01:45
I had a similar problem.. it turned into - instead of space
Tony Miri
@TonyMiri
Jan 11 2016 01:45
@DevPoetsSociety Got it. Thanks. Would you mind giving me one more pointer maybe on how I can clean up those if statements though. Seems like they are pretty unruly.
function rot13(str) { // LBH QVQ VG!

  var decoded = "";

  for (i = 0; i < str.length; i++) {
   if (str.charCodeAt(i) - 13 >= 65 && str.charCodeAt(i) < 91) {
        decoded += String.fromCharCode(str.charCodeAt(i) - 13);
    } else if (str.charCodeAt(i) <= 91 && str.charCodeAt(i) >= 65) {
        decoded += String.fromCharCode(str.charCodeAt(i) + 13);
    } else {
        decoded += str.charAt(i);
    }
  }

  return decoded;
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
CamperBot
@camperbot
Jan 11 2016 01:45
fattone225 sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
:star: 329 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
Christian
@Neralizer
Jan 11 2016 01:47
I'm stuck on waypoint 54ish of Javascript, called Stand in Line
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:48
@FatTone225 Well, you can grab everything from 65-90(inclusive) and up it by 13, then test if it's above 90 and minus it 26. Everything else will pass through.
Arnaldy Medina
@amedina1570
Jan 11 2016 01:48
can anyone help me with the Checkpoint: Record Collection, I'm stuck when I have to update the JSON object
Christian
@Neralizer
Jan 11 2016 01:48
It's requesting that I add an element onto the back of a queue, which i did using the push command, and then remove the first element of the array, which i did using the shift command
but then it wants me to return the element that was removed, and i have no idea what to have it return. should it be an argument?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:48
@Neralizer Did you return the shifted object?
You can return a shift
Christian
@Neralizer
Jan 11 2016 01:49
i have myArr.shift(arr);
so would i just return arr;?
Erland Lami
@Texber
Jan 11 2016 01:50
Please help anyone, I'm on Multiple Identical Options in Switch Satements Waypoint
function myTest(val) {
  var answer = "";
  // Only change code below this line
  switch (val){
    case 1:
    case 2:
    case 3:
      return = "Low";
      break;


  }
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:50
You can return myArr.Shif(arr), @Neralizer
Erland Lami
@Texber
Jan 11 2016 01:50

these are my instructions: Write a switch statement to set answer for the following ranges:
1-3 - "Low"
4-6 - "Mid"
7-9 - "High"

Note

You will need to have a case statement for each number in the range.

DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:50
Although it would just be .shif()
micahkid
@micahkid
Jan 11 2016 01:51
keep making cases @Texber
tommy
@tommygebru
Jan 11 2016 01:51
@Swoozeki @DevPoetsSociety @micahkid many thanks!
CamperBot
@camperbot
Jan 11 2016 01:51
tommygebru sends brownie points to @swoozeki and @devpoetssociety and @micahkid :sparkles: :thumbsup: :sparkles:
:star: 330 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
:star: 215 | @micahkid | http://www.freecodecamp.com/micahkid
:star: 218 | @swoozeki | http://www.freecodecamp.com/swoozeki
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:51
@Texber Remember how cases can 'fall through.'
Erland Lami
@Texber
Jan 11 2016 01:52
@DevPoetsSociety I'm not sure... you mean when you don't input break;?
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:52
Right. That lets several cases have the same solution.
micahkid
@micahkid
Jan 11 2016 01:52
continue making the cases after your break
Erland Lami
@Texber
Jan 11 2016 01:53
function myTest(val) {
  var answer = "";
  // Only change code below this line
  switch (val){
    case 1:
    case 2:
    case 3:
      return = "Low";
      break;
    case 4:
    case 5:
    case 6:
      return = "Mid";
      break;
      case 7:
    case 8:
    case 9:
      return = "High";
  }


  // Only change code above this line  
  return answer;  
}

// Change this value to test
myTest(1);
it's giving me error on the returns
Christian
@Neralizer
Jan 11 2016 01:54
still nothing. how do you take a screenshot of your code?
Elifaz Filho
@Elifaz
Jan 11 2016 01:54
@Texber return does not receive equal operators
micahkid
@micahkid
Jan 11 2016 01:54
change your returns to answer
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:54
@Neralizer You don't. You format it like so:
help format
Help format
CamperBot
@camperbot
Jan 11 2016 01:54

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

Christian
@Neralizer
Jan 11 2016 01:54
<paste your code here>
haha nope
<paste your code here>
Erland Lami
@Texber
Jan 11 2016 01:55
function myTest(val) {
  var answer = "";
  // Only change code below this line
  switch (val){
    case 1:
    case 2:
    case 3:
      result = "Low";
      break;
    case 4:
    case 5:
    case 6:
      result = "Mid";
      break;
      case 7:
    case 8:
    case 9:
      result = "High";
  }


  // Only change code above this line  
  return answer;  
}

// Change this value to test
myTest(1);
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:55
These: ``` then shift-return, then paste @Neralizer
Nikolajs Korolkovs
@NickEU
Jan 11 2016 01:55
@Texber u're returning answer, not result?
Erland Lami
@Texber
Jan 11 2016 01:55
like this? I'm not getting past it this way
Christian
@Neralizer
Jan 11 2016 01:55

'''

<paste your code here>

CamperBot
@camperbot
Jan 11 2016 01:55
:bulb: to format code use backticks! ``` more info
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:55
@Texber result should be answer. Look at what it's returning.
Elifaz Filho
@Elifaz
Jan 11 2016 01:56
@Texber at the bottom of your function you have return answer; so your case have to place output to the answer instead of result.
micahkid
@micahkid
Jan 11 2016 01:56
^
Christian
@Neralizer
Jan 11 2016 01:56

'''
// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
myArr.push(item);
myArr.shift(arr);

return item; // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));

CamperBot
@camperbot
Jan 11 2016 01:56
:bulb: to format code use backticks! ``` more info
Erland Lami
@Texber
Jan 11 2016 01:56
I'm so confused lol
Christian
@Neralizer
Jan 11 2016 01:56
well, kind of got it
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:56
@Neralizer Backtics not apostrophes. Usually the key under escape.
Christian
@Neralizer
Jan 11 2016 01:57

```
// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
myArr.push(item);
myArr.shift(arr);

return item; // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));

Tony Miri
@TonyMiri
Jan 11 2016 01:57
@Texber what is the value of your answer variable?
Christian
@Neralizer
Jan 11 2016 01:58
<// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  myArr.push(item);
  myArr.shift(arr);

  return item;  // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));
>
Elifaz Filho
@Elifaz
Jan 11 2016 01:58
@Texber it’s ok, you almost got it, in your case statement, you have result = whatever… but at the bottom of your page you have return answer which at this point is empty, so on your case you must make sure that answer is equal to the output;
Erland Lami
@Texber
Jan 11 2016 01:58
@FatTone225 I'm not sure
Christian
@Neralizer
Jan 11 2016 01:58
alright!
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:58
@Neralizer \o/
@Neralizer You have to shift ONTO something.
You can just do it to return
Tony Miri
@TonyMiri
Jan 11 2016 01:59
@Texber You define answer at the top of the function. Does anything in your function alter that value?
Christian
@Neralizer
Jan 11 2016 01:59
didn't I shift onto the arr argument?
or can i not shift onto an argument
Erland Lami
@Texber
Jan 11 2016 01:59
I didn't change anything on top of the code
I started on switch (cal)....
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 01:59
@Neralizer You don't want to. Just move that shift to the return line
Erland Lami
@Texber
Jan 11 2016 01:59
switch (val)..
Tony Miri
@TonyMiri
Jan 11 2016 02:00
@Texber Right. So you've got.
var answer = "";
Christian
@Neralizer
Jan 11 2016 02:00
bingo. okay i got it. so why did I want to put that into the return line?
Tony Miri
@TonyMiri
Jan 11 2016 02:00
So your answer variable has been defined as an empty string.
Erland Lami
@Texber
Jan 11 2016 02:00
@FatTone225 yes and I'm not clear what I should put there
Elifaz Filho
@Elifaz
Jan 11 2016 02:01
@Texber exactly, you haven’t changed and the case statement is not changing as well, make sure your answer is equal to the case evaluation. Right now in your code you have result = whatever.. but result doesn’t exist anywhere, answer does, in another words, make sure your result is replaced by answer so at the end of your function answer will have a value for each call
Nikolajs Korolkovs
@NickEU
Jan 11 2016 02:01
@Neralizer also your function doesn't know that myArr exists, you can only see arr and item
Tony Miri
@TonyMiri
Jan 11 2016 02:01
@Texber You don't need to put anything there. BUT you might want to try to change that value somehow inside of your function.
DFC302
@DFC302
Jan 11 2016 02:01

can anyone help me with this? What am i doing wrong?

"Italicize the text in your target4 button by adding HTML tags.
Make sure the text is otherwise unchanged.
Do not alter any other text."

Tony Miri
@TonyMiri
Jan 11 2016 02:01
Because that is the value you are returning at the bottom of your function.
Erland Lami
@Texber
Jan 11 2016 02:02
I got it guys, thanks so much
DFC302
@DFC302
Jan 11 2016 02:02
my code is $("#target4").html("<i>target4</i>")
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:02
@DFC302 Post your code. Be sure to format it like so:
help format
CamperBot
@camperbot
Jan 11 2016 02:02

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

Erland Lami
@Texber
Jan 11 2016 02:02
I understand now the connection between the return answer; at the bottom and the lines 8, 13, and 18
Christian
@Neralizer
Jan 11 2016 02:02
I think I get it.thanks!
Erland Lami
@Texber
Jan 11 2016 02:03
thanks @Elifaz for your detailed response
CamperBot
@camperbot
Jan 11 2016 02:03
texber sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 308 | @elifaz | http://www.freecodecamp.com/elifaz
Elifaz Filho
@Elifaz
Jan 11 2016 02:03
@Texber glad to help out. Thanks FatTone225
CamperBot
@camperbot
Jan 11 2016 02:03
elifaz sends brownie points to @texber :sparkles: :thumbsup: :sparkles:
:star: 197 | @texber | http://www.freecodecamp.com/texber
matthew3454
@matthew3454
Jan 11 2016 02:03
Can someone help me with a quick question?
Erland Lami
@Texber
Jan 11 2016 02:03
thanks @FatTone225
CamperBot
@camperbot
Jan 11 2016 02:03
texber sends brownie points to @fattone225 :sparkles: :thumbsup: :sparkles:
:star: 294 | @fattone225 | http://www.freecodecamp.com/fattone225
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:03
Shoot @matthew3454
Tony Miri
@TonyMiri
Jan 11 2016 02:04
No problem
matthew3454
@matthew3454
Jan 11 2016 02:04
Your div element should have the class container-fluid.
Make sure each of your div elements has a closing tag.
Make sure you have nested all HTML elements in .container-fluid.

<div class="container-fluid"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"></div>

<style>

the last command I have not fulfilled
In other words I don't know how to nest all HTML elements in .container-fluid.
Elifaz Filho
@Elifaz
Jan 11 2016 02:06
for whoever interested, adding the tweet button on your zipline, I struggled a lot with changing the properties of the button, and I found that instead of creating a div wrapping your <a> anchor tag around it will eliminate the href call imediately, so instead you should call the class that comes with the tweet tag and change it’s MARGIN because the padding is strict somehow.
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:06
That just means they should all be in <div ... @matthew3454
Wendy Huang
@gutentag1026
Jan 11 2016 02:06
hello everybody, what's the answer to Waypoint: Assignment with a Returned Value?
Javascript
DFC302
@DFC302
Jan 11 2016 02:07

$("#target4").html("<i>target4</i>")
```js

did I do this right? lol

its asking me to Italicize the text in your target4 button by adding HTML tags.
Make sure the text is otherwise unchanged.

matthew3454
@matthew3454
Jan 11 2016 02:07
okay @DevPoetsSociety thank you!
CamperBot
@camperbot
Jan 11 2016 02:07
matthew3454 sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:07
@gutentag1026 Post your code and we'll help.
CamperBot
@camperbot
Jan 11 2016 02:07
:star: 331 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
Wendy Huang
@gutentag1026
Jan 11 2016 02:07

// Setup
var processed = 0;

function process(num) {
return (num + 3) / 5;
}

// Only change code below this line
var processd = process(7);

Elifaz Filho
@Elifaz
Jan 11 2016 02:07
@gutentag1026 we help out people to discover the answer for themselves, show what you’ve got and we will go from there.
Wendy Huang
@gutentag1026
Jan 11 2016 02:08
Instructions
Call the process function with an argument of 7 and assign its return value to the variable processed.
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:08
@gutentag1026 What's that one called?
Wendy Huang
@gutentag1026
Jan 11 2016 02:08
Assignment with a Returned Value
Elifaz Filho
@Elifaz
Jan 11 2016 02:09
@gutentag1026 your variable, is misspelled

// Setup
var processed = 0;

function process(num) {
return (num + 3) / 5;
}

// Only change code below this line
var processed = process(7);

Elifaz Filho
@Elifaz
Jan 11 2016 02:09
@gutentag1026 you don’t have to create a variable twice, you can just call it as processed instead of var processed at the end of your block
Wendy Huang
@gutentag1026
Jan 11 2016 02:10
processed = process(7);????
Elifaz Filho
@Elifaz
Jan 11 2016 02:10
there you go @gutentag1026
micahkid
@micahkid
Jan 11 2016 02:10
myStorage.car.inside["glove box"];
var gloveBoxContents = "";
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:11
@gutentag1026 Right. That way you're calling the function. The other way you were creating a variable.
micahkid
@micahkid
Jan 11 2016 02:11
not letting me access contents of "glove box" (JSON object)
matthew3454
@matthew3454
Jan 11 2016 02:11
I must have misunderstood you. Sorry. What does it mean the have all HTML elements nested in .container fluid ?
Wendy Huang
@gutentag1026
Jan 11 2016 02:11
o yes,thanks so much
DFC302
@DFC302
Jan 11 2016 02:11

Can someone help? Its asking me to italicize my text in my target 4 button by adding html tags, but then make sure the text is otherwise unchanged.

my code is as follows

$("#target4").html("<i>target4</i>");

Elifaz Filho
@Elifaz
Jan 11 2016 02:12
@gutentag1026 glad to help..
smk319
@smk319
Jan 11 2016 02:15
could someone help me with the waypoint local scope and functions? I'm fine at creating the var myVar and assigning it a value, but I'm lost as to how to prevent it from being a global variable
Elifaz Filho
@Elifaz
Jan 11 2016 02:15

@matthew3454 basically you have all of the elements inside <html> right? That means that the elements within a tag are it’s child elements, and also it’s nested elements. By the exercise asking you to nest all of the elements after <html> with the class=“container-fluid” it means that you must create a <div> and set it’s class=“container-fluid” and make this div a child of <html> and a parent of the rest of the elements.

// Edit 1
Usually within an <html> tag you have the <head> and <body> I’m assuming that this exercise doesn’t have such differentiation, work out your code and show us so we can go from there

Sujit Karki
@Swoozeki
Jan 11 2016 02:15
<testing...>
DFC302
@DFC302
Jan 11 2016 02:16
nvm got it
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:16
@smk319 Post your code. Make sure it's formatted. Hit the m button to the right of your text input for directions.
Sujit Karki
@Swoozeki
Jan 11 2016 02:17
```js
Testing...
testing
matthew3454
@matthew3454
Jan 11 2016 02:17
I see I will try that. Thank you for you're thorough explanation @Elifaz @Elifaz
CamperBot
@camperbot
Jan 11 2016 02:17
matthew3454 sends brownie points to @elifaz and @elifaz :sparkles: :thumbsup: :sparkles:
:star: 309 | @elifaz | http://www.freecodecamp.com/elifaz
:star: 309 | @elifaz | http://www.freecodecamp.com/elifaz
matthew3454
@matthew3454
Jan 11 2016 02:18
you
r
Elifaz Filho
@Elifaz
Jan 11 2016 02:18
@matthew3454 sounds good, I made an edit 1 in there, nothing major, still same concept
Sachin S
@sachin234s
Jan 11 2016 02:18
Can anyone help me with escape sequence in strings ?
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:19
@Swoozeki Nearly there. ``` needs its own line
Sujit Karki
@Swoozeki
Jan 11 2016 02:19
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];
How would I retrieve the second tree from that variable?
Elifaz Filho
@Elifaz
Jan 11 2016 02:19
@sachin234s show us what you got so far
@Swoozeki basically in here you have one array with 2 objects within, and each object has 2 properties in which one property (the first) have a string as it’s value and the (second) has another array. Show us what you have and we will go from there
Leonardo Ceschin
@leoceschin
Jan 11 2016 02:21

hey guys i nedd help on Waypoint: Nested Loops
i can return the first result but the other return NaN. why?
this is my code:

function multiplyAll(arr) {
var product = 1;
// Only change code below this line
myArray = [arr];

for (i = 0; i < myArray.length; i++){
for (j = 0; j < myArray[i].length; j++){
product *= myArray[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]]);

Elifaz Filho
@Elifaz
Jan 11 2016 02:21

hey guys i nedd help on Waypoint: Nested Loops
i can return the first result but the other return NaN. why?
this is my code:

function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  myArray = [arr];

  for (i = 0; i < myArray.length; i++){
    for (j = 0; j < myArray[i].length; j++){
      product *= myArray[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]]);

Just so I can read it

Ray
@rbjr
Jan 11 2016 02:22
Waypoint: Testing Objects for Properties
help Waypoint: Testing Objects for Properties
CamperBot
@camperbot
Jan 11 2016 02:22

:point_right: waypoint testing objects for properties [wiki]

Waypoint: Testing Objects for Properties

Sometimes it is useful to check if the property of a given object exists or not. We can use the .hasOwnProperty([propname]) method of objects to determine if that object has the given property name. .hasOwnProperty() returns true or false if the property is found or not.

Example

var myObj = {
  top: "hat",
  bottom: "pants"
};
myObj.hasOwnProperty("top");    // true
myObj.hasOwnProperty("middle");

:pencil: read more about waypoint testing objects for properties on the FCC Wiki

Charles Haralson
@cdonell22
Jan 11 2016 02:22
Can anyone help me with adding a div element with a class inside another div element with a class?
micahkid
@micahkid
Jan 11 2016 02:22

// Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};

// Only change code below this line
myStorage.car.inside["glove box"];
var gloveBoxContents = ""; // Change this line

Sujit Karki
@Swoozeki
Jan 11 2016 02:23
var secondTree=myPlants[0].list[1];
@Elifaz
micahkid
@micahkid
Jan 11 2016 02:24
...what am I missing? The examples are kind of lacking in explaining how to retrieve the JSON object contents
Elifaz Filho
@Elifaz
Jan 11 2016 02:24
@leoceschin you are placing your myArray = [arr] no need do that, I think you want to set your argument as an array. it wont work that way. Let me check the rest of your code
Sujit Karki
@Swoozeki
Jan 11 2016 02:25
Nvm, I got it
Elifaz Filho
@Elifaz
Jan 11 2016 02:25
@Swoozeki yeah, the concept was there, just the call that brought somehting else. You got this
Sujit Karki
@Swoozeki
Jan 11 2016 02:25
var secondTree=myPlants[1].list[1];
Thank you @Elifaz
CamperBot
@camperbot
Jan 11 2016 02:26
swoozeki sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 310 | @elifaz | http://www.freecodecamp.com/elifaz
Leonardo Ceschin
@leoceschin
Jan 11 2016 02:26
thanks @Elifaz
CamperBot
@camperbot
Jan 11 2016 02:26
leoceschin sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 311 | @elifaz | http://www.freecodecamp.com/elifaz
Elifaz Filho
@Elifaz
Jan 11 2016 02:26
Glad to help out guys.. @Swoozeki @leoceschin
Sujit Karki
@Swoozeki
Jan 11 2016 02:27
sometimes I just need someone to tell me to sit the f down and think about it
micahkid
@micahkid
Jan 11 2016 02:27
@Swoozeki sit the f down and think about it! ;]
Elifaz Filho
@Elifaz
Jan 11 2016 02:28
@micahkid show us what you have..
micahkid
@micahkid
Jan 11 2016 02:28
@Elifaz just following their example
var ourStorage = {
"desk": {
"drawer": "stapler"
},
"cabinet": {
"top drawer": {
"folder1": "a file",
"folder2": "secrets"
},
"bottom drawer": "soda"
}
}
ourStorage.cabinet["top drawer"].folder2; // "secrets"
Elifaz Filho
@Elifaz
Jan 11 2016 02:29
@Swoozeki I was stuck with a zipline and researching and researching and when I got the error I was doing it was a huge slap on the face..
lettda
@lettda
Jan 11 2016 02:29
Can someone explain what I'm suppose to be outputting? // myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces //
Elifaz Filho
@Elifaz
Jan 11 2016 02:29
just so i can read it
var ourStorage = {
  "desk": {
    "drawer": "stapler"
  },
  "cabinet": {
    "top drawer": { 
      "folder1": "a file",
      "folder2": "secrets"
    },
    "bottom drawer": "soda"
  }
}
ourStorage.cabinet["top drawer"].folder2;  // “secrets”
micahkid
@micahkid
Jan 11 2016 02:29
so I thought I was following that logic, but i'm getting an error 'Expected an assignment or function call and instead saw an expression'
sorry, how do you past code so it appears like yours
paste*
Brian
@sludge256
Jan 11 2016 02:30
explain format
CamperBot
@camperbot
Jan 11 2016 02:30

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

micahkid
@micahkid
Jan 11 2016 02:30
thanks camperbot
:P
Elifaz Filho
@Elifaz
Jan 11 2016 02:31
@micahkid alright so here you have a string of objects, and you can see that top drawer is being called with brackets [ ]and ” “ quotation marks because it is 2 separated words, and the ones that is not 2 separated words you can use . dot notation, keep that in mind, and give it a try..
matthew3454
@matthew3454
Jan 11 2016 02:31

<html><div class="container-fluid"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> </div>

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a> </html>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:31
help format
CamperBot
@camperbot
Jan 11 2016 02:31

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

micahkid
@micahkid
Jan 11 2016 02:32
// Setup
var myStorage = {
  "car": {
    "inside": {
      "glove box": "maps",
      "passenger seat": "crumbs"
     },
    "outside": {
      "trunk": "jack"
    }
  }
};

// Only change code below this line
myStorage.car.inside["glove box"];
var gloveBoxContents = ""; // Change this line
Elifaz Filho
@Elifaz
Jan 11 2016 02:32
Just so I can read
<html><div class="container-fluid"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>  <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> </div>

<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a> </html>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
micahkid
@micahkid
Jan 11 2016 02:34
my requirements are "gloveBoxContents should equal "maps""
smk319
@smk319
Jan 11 2016 02:34
function myFunction() {
  var myVar= 9;


  console.log(myVar);
}
myFunction();

// run and check the console 
// myVar is not defined outside of myFunction
console.log(myVar);

// now remove the console log line to pass the test
Elifaz Filho
@Elifaz
Jan 11 2016 02:34
@micahkid you need to work with the gloveBoxContents I’m assumming, your current call on glove box will call it’s value which is maps;
micahkid
@micahkid
Jan 11 2016 02:34
@Elifaz alright thank you, I'll work with it.
CamperBot
@camperbot
Jan 11 2016 02:34
micahkid sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 312 | @elifaz | http://www.freecodecamp.com/elifaz
Elifaz Filho
@Elifaz
Jan 11 2016 02:34
@micahkid right, so basically you have the answer is just placed on the wrong var.
@micahkid there you go
smk319
@smk319
Jan 11 2016 02:35
^ that is my attempt at the local scope and functions waypoint. It says i need to not have a global myVar variable, but idk what else to do
micahkid
@micahkid
Jan 11 2016 02:35
@Elifaz thanks that was the ticket
CamperBot
@camperbot
Jan 11 2016 02:35
micahkid sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:warning: micahkid already gave elifaz points
Brian
@sludge256
Jan 11 2016 02:37
@smk319 did you remove the console.log line outside of the function?
oh you pasted code
remove that bottom console.log
smk319
@smk319
Jan 11 2016 02:37
@sludge256 I did that and still nothing
Elifaz Filho
@Elifaz
Jan 11 2016 02:37
@smk319 alright, when you place myVar within a function these variables have something called scope, not just variables but loops, objects and many other references in JS, basically scope means where your key is located within a codeblock, so if you set var within a function, this variable will have a local scope to the function that it is within, and it will be a private variable, which means is not accessible outside of that function, but surprinsingly if you set a variable without the var word before it’s name, that variable will be set as global scope automatically! Which I believe is basically what the exercise is requesting.
Brian
@sludge256
Jan 11 2016 02:38
@smk319 place this 'use strict'; back into your code above var myVar = 9;
although it should work without it too i believe
More testing:
// Example
var ourStr = "I come first. " + "I come second.";

// Only change code below this line

var myStr;
Brian
@sludge256
Jan 11 2016 02:40
:+1:
Rex Schrader
@SaintPeter
Jan 11 2016 02:40
Hot Dog
smk319
@smk319
Jan 11 2016 02:40
Thanks @Elifaz
CamperBot
@camperbot
Jan 11 2016 02:40
smk319 sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 313 | @elifaz | http://www.freecodecamp.com/elifaz
Brian
@sludge256
Jan 11 2016 02:40
i assume it won't link to local host once merged
Elifaz Filho
@Elifaz
Jan 11 2016 02:40
@smk319 you got it
smk319
@smk319
Jan 11 2016 02:42
@sludge256 still nothing...idk what is up here
Jordan Shackelford
@JordanShackelford
Jan 11 2016 02:42
anybody know why my console.logs aren't showing up in the console
on bonfires
smk319
@smk319
Jan 11 2016 02:42
@sludge256 i put in the 'use strict'; and took out the bottom console.log and it's still not completing
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:42
@JordanShackelford Refresh
Jordan Shackelford
@JordanShackelford
Jan 11 2016 02:43
doesn't work :(
NormalWare
@Centuriom
Jan 11 2016 02:43
Hello everyone, how can i remove all non-alphanumeric characters (punctuation, spaces and symbols). Thanks
From a string
samaysalunke
@samaysalunke
Jan 11 2016 02:44
i need help with this Waypoint: Return Early Pattern for Functions
Jordan Shackelford
@JordanShackelford
Jan 11 2016 02:44
@Centuriom There are a lot of ways. One solution is to use regex
NormalWare
@Centuriom
Jan 11 2016 02:45
@JordanShackelford thanks
CamperBot
@camperbot
Jan 11 2016 02:45
centuriom sends brownie points to @jordanshackelford :sparkles: :thumbsup: :sparkles:
:star: 362 | @jordanshackelford | http://www.freecodecamp.com/jordanshackelford
Jordan Shackelford
@JordanShackelford
Jan 11 2016 02:45
@Centuriom Try doing string.replace(/\W/g, '');
NormalWare
@Centuriom
Jan 11 2016 02:45
Oh thanks again
Jordan Shackelford
@JordanShackelford
Jan 11 2016 02:46
np
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:46
Remember that strings are immutable. You may be better itterating through an array.
NormalWare
@Centuriom
Jan 11 2016 02:46
Strings are immutable at all ?
Brian
@sludge256
Jan 11 2016 02:46
@smk319 can we see your new code?
NormalWare
@Centuriom
Jan 11 2016 02:46
I don't think so because the function String.toLowerCase()
KEA
@KeaDC
Jan 11 2016 02:47
<input type="text" placeholder="cat photo UR"> this line is not working, but I believe everything is correct. Any help would be great :(
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:47
@Centuriom That replaces a str with another str.
NormalWare
@Centuriom
Jan 11 2016 02:47
Oh oh yeah you are right
samaysalunke
@samaysalunke
Jan 11 2016 02:48
i need help with this Waypoint: Return Early Pattern for Function
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:48
It gets a bit fuzzy, but if you are changing things arrays give fewer surprises.
@samaysalunke Post your code, but format it like so:
help format
CamperBot
@camperbot
Jan 11 2016 02:48

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

NormalWare
@Centuriom
Jan 11 2016 02:48
What is the best function to remove all non-alphanumeric characters (punctuation, spaces and symbols)
samaysalunke
@samaysalunke
Jan 11 2016 02:49

// Setup
function abTest(a, b) {
// Only change code below this line
if(a<0|b<0){
return('undefined.');
}

// Only change code above this line

return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);

help formatting this
CamperBot
@camperbot
Jan 11 2016 02:49
no wiki entry for: formatting this
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:49
@Centuriom Ceaser's Cipher?
smk319
@smk319
Jan 11 2016 02:49
@sludge256 it worked this time! I think I just had to refresh it, thanks for your help!
CamperBot
@camperbot
Jan 11 2016 02:49
smk319 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 681 | @sludge256 | http://www.freecodecamp.com/sludge256
NormalWare
@Centuriom
Jan 11 2016 02:49
@samaysalunke you need to type three times ´´´ top and bottom of the code
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:50
With a shift+return before and after each
NormalWare
@Centuriom
Jan 11 2016 02:50
Thanks @DevPoetsSociety
CamperBot
@camperbot
Jan 11 2016 02:50
centuriom sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
:star: 332 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:52
Thanks back at you @Centuriom . Were you trying Caesar's Cipher?
CamperBot
@camperbot
Jan 11 2016 02:52
devpoetssociety sends brownie points to @centuriom :sparkles: :thumbsup: :sparkles:
:star: 214 | @centuriom | http://www.freecodecamp.com/centuriom
samaysalunke
@samaysalunke
Jan 11 2016 02:52
@Centuriom if u can have a look at the module and revert back with the right code
NormalWare
@Centuriom
Jan 11 2016 02:52
No, another thingi was trying
Sachin S
@sachin234s
Jan 11 2016 02:52
@Elifaz var myStr = \ \t \t \r \n; // Change this line or var myStr = 'backslash \ tab \t tab \t carriage-return \r new-line \n'; // Change this line
Elifaz Filho
@Elifaz
Jan 11 2016 02:53
@Elifaz  
var myStr = \\ \t \t \r \n; 
// Change this line or 
var myStr = 'backslash \\ tab \t tab \t carriage-return \r new-line \n'; 

// Change this line
DJ
@qualitymanifest
Jan 11 2016 02:53
@sachin234s myStr is still a string so it needs to be in quotation marks
DevPoetsSociety
@DevPoetsSociety
Jan 11 2016 02:54
OK, nn all.
micahkid
@micahkid
Jan 11 2016 02:54
@DevPoetsSociety NN thanks!
CamperBot
@camperbot
Jan 11 2016 02:54
micahkid sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
Sachin S
@sachin234s
Jan 11 2016 02:54
@qualitymanifest @Elifaz both are not working
CamperBot
@camperbot
Jan 11 2016 02:54
:star: 333 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
Abhisek Pattnaik
@abhisekp
Jan 11 2016 02:55
@smk319 vs @sludge256
Identicon Wars
Sachin S
@sachin234s
Jan 11 2016 02:55
the error is myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces
Leonard Johnson
@Jarvis3000
Jan 11 2016 02:55
any clues on the counting cards checpoint
Elifaz Filho
@Elifaz
Jan 11 2016 02:56
@sachin234s what is your exercise name?
basically here I see 2 variables being assigned, nothing is being call, just assigned
Abhisek Pattnaik
@abhisekp
Jan 11 2016 02:56
:(
smk319
@smk319
Jan 11 2016 02:56
lol
Sachin S
@sachin234s
Jan 11 2016 02:56
@Elifaz Waypoint: Escape Sequences in Strings
samaysalunke
@samaysalunke
Jan 11 2016 02:57
Waypoint: Return Early Pattern for Functions
need help
in this module
DJ
@qualitymanifest
Jan 11 2016 02:57
@sachin234s paste your current code
Sachin S
@sachin234s
Jan 11 2016 02:58
var myStr = 'backslash \ tab \t tab \t carriage-return \r new-line \n';
Ray
@rbjr
Jan 11 2016 02:58
help waypoint testing objects for properties
CamperBot
@camperbot
Jan 11 2016 02:58

:point_right: waypoint testing objects for properties [wiki]

Waypoint: Testing Objects for Properties

Sometimes it is useful to check if the property of a given object exists or not. We can use the .hasOwnProperty([propname]) method of objects to determine if that object has the given property name. .hasOwnProperty() returns true or false if the property is found or not.

Example

var myObj = {
  top: "hat",
  bottom: "pants"
};
myObj.hasOwnProperty("top");    // true
myObj.hasOwnProperty("middle");

:pencil: read more about waypoint testing objects for properties on the FCC Wiki

DJ
@qualitymanifest
Jan 11 2016 02:58
@sachin234s your first example was the correct one that just needed quotation marks, not this one
Derek Welton
@freefora11
Jan 11 2016 02:59
Quick question for all of you, is it ok to call multiple getJSON methods to get an api? Is it efficient or would it slow down the webpage?
Elifaz Filho
@Elifaz
Jan 11 2016 02:59
@sachin234s ah ok, so I see, basically what you did is set the name of the escape sequences, which is not what the exercise is requiring, I meant it is the requirement but you need to do with the \t \n \\ instead of the literal name of each item...
@sachin234s read what each escape sequence does, and their name, and try to assign them to the var requested in the exercise
Ray
@rbjr
Jan 11 2016 03:00
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  checkProp = myObj.val;

  for (var i = 0; i < 3; i++){

    if (myObj.hasOwnProperty() === true) {
      return checkProp[i];
}
    else if (myObj.hasOwnProperty() === false){
      return "Not Found";
}
  return checkProp;
}}

// Test your code by modifying these values
checkObj("gift");
Sachin S
@sachin234s
Jan 11 2016 03:00
@qualitymanifest @Elifaz Yup solved it Thanks.
CamperBot
@camperbot
Jan 11 2016 03:00
sachin234s sends brownie points to @qualitymanifest and @elifaz :sparkles: :thumbsup: :sparkles:
:star: 762 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 314 | @elifaz | http://www.freecodecamp.com/elifaz
Ray
@rbjr
Jan 11 2016 03:01
i know my code is bad, im tired and im going to bed after this
Sujit Karki
@Swoozeki
Jan 11 2016 03:01
I am so, so stuck in Checkpoint: Record Collection
Ray
@rbjr
Jan 11 2016 03:01
i just want to get checkObj to iterate and return the values if they are present
Elifaz Filho
@Elifaz
Jan 11 2016 03:02
@freefora11 I didn’t stringfied them, instead I set to call the key as an object with various properties, and arrays as keys... Seems fast for me, I just haven’t tested enough to see
Ray
@rbjr
Jan 11 2016 03:02
having a major brain fart
DJ
@qualitymanifest
Jan 11 2016 03:02
@rbjr no need for a loop. you're only dealing with one value: checkProp, the argument passed into the checkObj function
Warren
@warrenonline
Jan 11 2016 03:02
Waypoint: Using Objects for Lookups
help Waypoint: Using Objects for Lookups
CamperBot
@camperbot
Jan 11 2016 03:03

:point_right: waypoint using objects for lookups [wiki]

Waypoint: Using Objects for Lookups

Objects can be thought of as a key/value storage, like a dictionary. If you have tabular data, you can use an object to "lookup" values rather than a switch statement or an if/else chain. This is most useful when you know that your input data is limited to a certain range.

Here is an example of a simple reverse alphabet lookup:

var alpha = {
  1:"Z",
  2:"Y",
  3:"X",
  4:"W",
  ...
  24:"C",
  25:"B",
  26:"A"
};
alpha[2]; // "Y"
alpha[24]; // "C"

:pencil: read more about waypoint using objects for lookups on the FCC Wiki

Elifaz Filho
@Elifaz
Jan 11 2016 03:03
@sachin234s There you go! Glad to help out
Derek Welton
@freefora11
Jan 11 2016 03:03
@Elifaz yea I guess just calling the key would be efficient, it doesn't make sense I guess to call the whole json
Elifaz Filho
@Elifaz
Jan 11 2016 03:03
@Swoozeki thats a tricky one, show us what you’ve got
Camilolwi
@Camilolwi
Jan 11 2016 03:03

// Example
var ourStr = "I come first. " + "I come second.";

// Only change code below this line

var myStr = "This is the start." + " This is the end.";

DJ
@qualitymanifest
Jan 11 2016 03:04
@rbjr and you're not using hasOwnProperty quite right. it's more like
myObj.hasOwnProperty(\*string or variable here*\)
Camilolwi
@Camilolwi
Jan 11 2016 03:04
hi! what is wrong with me >.<
cannelflow
@cannelflow
Jan 11 2016 03:04
@warrenonline tried something?
Camilolwi
@Camilolwi
Jan 11 2016 03:04
Instructions
Build myStr from the strings "This is the start. " and "This is the end." using the + operator.
Ray
@rbjr
Jan 11 2016 03:04
@qualitymanifest ok what do you suggest
without giving away the solution haha
DJ
@qualitymanifest
Jan 11 2016 03:04
@Camilolwi i think they want the space to go after the first string, not before the second
Camilolwi
@Camilolwi
Jan 11 2016 03:05
Oh! ok i try
@qualitymanifest Thanks !!!!
CamperBot
@camperbot
Jan 11 2016 03:05
camilolwi sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 763 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Elifaz Filho
@Elifaz
Jan 11 2016 03:05
@freefora11 So far it worked well for me, the issue is setting them up. But once is done, it runs like a charm. I’m sure further ahead on my learning curve there will be better ways of doing it
DJ
@qualitymanifest
Jan 11 2016 03:06
@rbjr just check to see if myObj has the property checkProp. and do not reassign checkProp like this checkProp = myObj.val; just use it as it was passed into the function
Sujit Karki
@Swoozeki
Jan 11 2016 03:07
if(value!=="" && collection.id.hasOwnProperty(prop));
if(value!=="" && collection.id.hasOwnProperty(prop));
Why am I getting "Cannot read property 'hasOwnProperty' of undefined?
Ray
@rbjr
Jan 11 2016 03:08
ugh still stuck
Sujit Karki
@Swoozeki
Jan 11 2016 03:08
does this mean that the object "id" is undefined, and thus cannot read its property?
@Elifaz
Ray
@rbjr
Jan 11 2016 03:09
holy crap i did it
smk319
@smk319
Jan 11 2016 03:09
could someone talk me through the waypoint assignment with a returned value? I have no idea where to start...and should probably brush up on math. Bringing an english background into coding is not the most fun thing ever
matthew3454
@matthew3454
Jan 11 2016 03:10
I still don't know how to make sure you have nested all HTML elements in .container-fluid. Can anyone please help?
Elifaz Filho
@Elifaz
Jan 11 2016 03:10
@Swoozeki if the id object is undefined it means that the id you’re calling doesn’t exist yet
Derek Welton
@freefora11
Jan 11 2016 03:10
@Elifaz I can't find any better ways at the moment with the research ive done, anyways thanks
CamperBot
@camperbot
Jan 11 2016 03:10
freefora11 sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 315 | @elifaz | http://www.freecodecamp.com/elifaz
Ray
@rbjr
Jan 11 2016 03:10
thanks @qualitymanifest
CamperBot
@camperbot
Jan 11 2016 03:10
rbjr sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 764 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Elifaz Filho
@Elifaz
Jan 11 2016 03:11
@Swoozeki how far are you in?
Sujit Karki
@Swoozeki
Jan 11 2016 03:11
@Elifaz the id's being tested are 5439,2548,1245, and 2548, all of which are in fact in collection
NormalWare
@Centuriom
Jan 11 2016 03:11
Function string.replace(/\W/g, ''); doesn't eliminate numbers, how can i eliminate numbers ?
framework24
@framework24
Jan 11 2016 03:11
need help! here's my task: h2 element should be blue.
Timmy
@timbertrand
Jan 11 2016 03:11
hi
ok
framework24
@framework24
Jan 11 2016 03:12

here's my code <style>
h2 {color: blue;}
<h2>CatPhotoApp</h2>
</style>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p> but can't pass

smk319
@smk319
Jan 11 2016 03:12
@matthew3454 put </div> at the very bottom of your code i think?
Sujit Karki
@Swoozeki
Jan 11 2016 03:12
@Elifaz haven't been able to get past first line, haha.
smk319
@smk319
Jan 11 2016 03:12
I had the same problem trying to complete that waypoint
Elifaz Filho
@Elifaz
Jan 11 2016 03:12
@Swoozeki alright, so is either not the ID the issue or the call is not going through in the wya you think.
waypoint record collection
Benjamin Corry
@becorry
Jan 11 2016 03:12
i need help My task is "size your image"
Timmy
@timbertrand
Jan 11 2016 03:12
the style should be after h2
Elifaz Filho
@Elifaz
Jan 11 2016 03:12
@Swoozeki let me see the exercise, is it called Record Collection?
Sujit Karki
@Swoozeki
Jan 11 2016 03:12
yeah
Elifaz Filho
@Elifaz
Jan 11 2016 03:12
WayPoint Record Collection
Benjamin Corry
@becorry
Jan 11 2016 03:13

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
img {
width:100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Elifaz Filho
@Elifaz
Jan 11 2016 03:13
Way Point Record Collection
NormalWare
@Centuriom
Jan 11 2016 03:13
Hello everyone i have this problem: Function string.replace(/\W/g, ''); doesn't eliminate numbers, how can i eliminate numbers whit .replace() function ?
Elifaz Filho
@Elifaz
Jan 11 2016 03:13
damn it..let me check in there...
Sujit Karki
@Swoozeki
Jan 11 2016 03:13
@Elifaz yeah, that one
micahkid
@micahkid
Jan 11 2016 03:14
Is there anywhere I can find a detailed explanation of the JSON record collection?
NormalWare
@Centuriom
Jan 11 2016 03:14
@becorry Hi dude, if you put your code whitin ´´´
@becorry It will look cooler
Benjamin Corry
@becorry
Jan 11 2016 03:14

'<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
img {
width:100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>'

@Centuriom how do you do it?
Elifaz Filho
@Elifaz
Jan 11 2016 03:15
@Swoozeki Alright, basically this exercise is asking you to make an evaluation check, and if it matches with your parameter if this is this and this then do that and that the code should pass. Work on it a bit and show me where you’re at..
framework24
@framework24
Jan 11 2016 03:15
put after h2 still didn't go
NormalWare
@Centuriom
Jan 11 2016 03:15
three times ´´´ at top
and ´´´ at bottom
matthew3454
@matthew3454
Jan 11 2016 03:15
Can someone complete a piece of code for me?
NormalWare
@Centuriom
Jan 11 2016 03:15
And your code between them two
Benjamin Corry
@becorry
Jan 11 2016 03:15

'''<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
img {
width:100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
'''

CamperBot
@camperbot
Jan 11 2016 03:15
:bulb: to format code use backticks! ``` more info
Jonatan Bernal
@Jonatan-B
Jan 11 2016 03:15
formatting help
help formatting
CamperBot
@camperbot
Jan 11 2016 03:15

:point_right: code formatting [wiki]

Inline code

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

Code Block

```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 ⏎]

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

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

NormalWare
@Centuriom
Jan 11 2016 03:15
Not ''' but ´´´
CamperBot
@camperbot
Jan 11 2016 03:15
:bulb: to format code use backticks! ``` more info
NormalWare
@Centuriom
Jan 11 2016 03:16
Like this
smk319
@smk319
Jan 11 2016 03:16
@matthew3454 post your code
Sujit Karki
@Swoozeki
Jan 11 2016 03:16
@becorry make a class called smaller-image and in it, change the width to 100px. Then add that class into the image tag
matthew3454
@matthew3454
Jan 11 2016 03:16
ok one moment
< <div class="container-fluid"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> </div>
<div class="container-fluid"> <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> </div>
Benjamin Corry
@becorry
Jan 11 2016 03:16

```<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
img {
width:100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>```

lol sorry
Jonatan Bernal
@Jonatan-B
Jan 11 2016 03:17
@becorry you gotta put the ``` in its own line.
NormalWare
@Centuriom
Jan 11 2016 03:17
yeah
Benjamin Corry
@becorry
Jan 11 2016 03:17
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }
 img {
    width:100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
matthew3454
@matthew3454
Jan 11 2016 03:17
"Make sure you have nested all HTML elements in .container-fluid." This is the direction
micahkid
@micahkid
Jan 11 2016 03:17
there you go
Benjamin Corry
@becorry
Jan 11 2016 03:17
im trying to size my image to 100px
Sujit Karki
@Swoozeki
Jan 11 2016 03:17
@Elifaz alright, I'll be back in 5 minutes
NormalWare
@Centuriom
Jan 11 2016 03:17
@becorry it looks sick dude !
Good work
Elifaz Filho
@Elifaz
Jan 11 2016 03:18
@Swoozeki sooounds good
DJ
@qualitymanifest
Jan 11 2016 03:18
@becorry 100px square? you will also need to set the height to 100px
Aaron Graves
@gravesmeister
Jan 11 2016 03:18
Is there a good resource guide out there that expands of any of the Java waypoints if someone just flat out doesn't undertand it?
Benjamin Corry
@becorry
Jan 11 2016 03:18
it says "your img element should have the class smaller-image
smk319
@smk319
Jan 11 2016 03:18
@matthew3454 try taking out the first < you have there, you have an extra one before <div class="container-fluid">
Elifaz Filho
@Elifaz
Jan 11 2016 03:18
@gravesmeister here! hahah
matthew3454
@matthew3454
Jan 11 2016 03:18
ok
Elifaz Filho
@Elifaz
Jan 11 2016 03:19
@gravesmeister maybe using Help will tell you more about the exercise you are working on
Milky
@milkyzongs
Jan 11 2016 03:19
Could anyone lend a hand? I've been stuck on this waypoint for way too long. http://imgur.com/FtomBLH
Aaron Graves
@gravesmeister
Jan 11 2016 03:19
@Elifaz I'm working on Waypoing: Finding a Remainder in Javascript
matthew3454
@matthew3454
Jan 11 2016 03:19
I tried it without luck
smk319
@smk319
Jan 11 2016 03:19
@matthew3454 what's the name of the waypoint you're working on?
DJ
@qualitymanifest
Jan 11 2016 03:20
@milkyzongs did you change line 2? it starts out as "Jello World" right?
matthew3454
@matthew3454
Jan 11 2016 03:20
Waypoint: Use Responsive Design with Bootstrap Fluid Containers
@smk319
Elifaz Filho
@Elifaz
Jan 11 2016 03:20
@gravesmeister great is that related to this % operator?
Aaron Graves
@gravesmeister
Jan 11 2016 03:20
Yes
@Elifaz
Benjamin Corry
@becorry
Jan 11 2016 03:20
setting the height didn't work how do i create a class called smaller-image?
Aaron Graves
@gravesmeister
Jan 11 2016 03:21
I think my problem is maybe my math skills might me lacking ?
DJ
@qualitymanifest
Jan 11 2016 03:21
@milkyzongs reset the code. don't change line 2. and on line 6 just assign myStr "Hello World"
Elifaz Filho
@Elifaz
Jan 11 2016 03:21
@gravesmeister if you knoe * + - / you’re good at least to start
@gravesmeister right, all you need to know is that the % will always return the remainder of a division operation, or the comparinson result of it such as truthy, falsy, true, false.
smk319
@smk319
Jan 11 2016 03:22
@matthew3454 take out the </div> you have after the google fonts link and instead post it at the very bottom of your code. so you should have two </div> elements there at the end.
You need the </div> at the bottom so that .container-fluid also contains the link in the middle of your code
Benjamin Corry
@becorry
Jan 11 2016 03:22
my only error says "your img element shoud have the class smaller image"
matthew3454
@matthew3454
Jan 11 2016 03:22
ok
Tejas Pancholi
@tejaser
Jan 11 2016 03:22
help checkpoint
CamperBot
@camperbot
Jan 11 2016 03:22

:point_right: checkpoint convert celsius to fahrenheit [wiki]

Details

The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.

You are given a variable celsius representing a temperature in Celsius. Create a variable fahrenheit and apply the algorithm to assign it the corresponding temperature in Fahrenheit.

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

:pencil: read more about checkpoint convert celsius to fahrenheit on the FCC Wiki

Benjamin Corry
@becorry
Jan 11 2016 03:22
```
Aaron Graves
@gravesmeister
Jan 11 2016 03:23
@Elifaz I don't get the instructions as far was what I'm supposed to do?
Elifaz Filho
@Elifaz
Jan 11 2016 03:23
@gravesmeister say
 var result = 10 % 2;
result;
// 0 beacuse the remainder of 10 / 2 is 0
Aaron Graves
@gravesmeister
Jan 11 2016 03:23
Instructions
Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator
matthew3454
@matthew3454
Jan 11 2016 03:24
@smk319 Thank you so much! I almost had call it quits tonight.
CamperBot
@camperbot
Jan 11 2016 03:24
matthew3454 sends brownie points to @smk319 :sparkles: :thumbsup: :sparkles:
:star: 181 | @smk319 | http://www.freecodecamp.com/smk319
Billboz
@Billboz
Jan 11 2016 03:24
I am missing something very very simple... right now I want to just figure out why the code isn't running the 'if' statement?
// Setup
function abTest(a, b) {
  // Only change code below this line
  if (a === 2) {
    console.log("a is less than 0");
  }

  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);
Elifaz Filho
@Elifaz
Jan 11 2016 03:25
@gravesmeister check the example I gave you above your message.
Billboz
@Billboz
Jan 11 2016 03:25
I am receiving an '8' and no console.log msg
smk319
@smk319
Jan 11 2016 03:25
@matthew3454 you're welcome! I ran into that problem when I was working through that challenge, glad I could help
Aaron Graves
@gravesmeister
Jan 11 2016 03:25
Yeah it's sort of making sense but I'm still foggy on the instructions @Elifaz
Elifaz Filho
@Elifaz
Jan 11 2016 03:26
@gravesmeister are you struggling with the word remainder?
DJ
@qualitymanifest
Jan 11 2016 03:26
@Billboz if a is 2, then a is less than 0? hmm
Aaron Graves
@gravesmeister
Jan 11 2016 03:26
@Elifaz The remainder is what is left over from the quotient correct?
so of the quotient is an even number the remainder is 0?
Billboz
@Billboz
Jan 11 2016 03:27
sorry... that was a left over msg
Aaron Graves
@gravesmeister
Jan 11 2016 03:27
*if
Elifaz Filho
@Elifaz
Jan 11 2016 03:27
@gravesmeister Correct, so basically on the exercise is asking you to evaluate the remainder of 11 and 3
@gravesmeister also if the dividend is an even number then the remainder is 0
Aaron Graves
@gravesmeister
Jan 11 2016 03:27
Right
DJ
@qualitymanifest
Jan 11 2016 03:28
@Billboz which waypoint is this?
John Cerpa
@johncerpa
Jan 11 2016 03:28
Hello
Ray
@rbjr
Jan 11 2016 03:28
help Waypoint: Accessing Nested Arrays in JSON
CamperBot
@camperbot
Jan 11 2016 03:28

:point_right: waypoint accessing nested arrays in json [wiki]

Waypoint: Accessing Nested Arrays in JSON

As we have seen in earlier examples, JSON objects can contain both nested objects and nested arrays. Similar to accessing nested objects, Array bracket notation can be chained to access nested arrays.

Here is an example of how to access a nested array:

```js
var ourPets = {
"cats": [
"Meowzer",
"Fluffy",
"Kit-Cat"
],
"dogs": [
"Spot",
"Bowser",
"Frankie"
]
};
ourPets.cats1; // "Fluffy"
:pencil: read more about waypoint accessing nested arrays in json on the FCC Wiki

Billboz
@Billboz
Jan 11 2016 03:28
Return Early Pattern for Functions
Aaron Graves
@gravesmeister
Jan 11 2016 03:28
Ok I guess I was understanding it better than I thought @Elifaz
Elifaz Filho
@Elifaz
Jan 11 2016 03:28
@gravesmeister give it a try, paste here and we will go from there.
Aaron Graves
@gravesmeister
Jan 11 2016 03:28
@Elifaz Thanks!!!!
CamperBot
@camperbot
Jan 11 2016 03:28
gravesmeister sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 316 | @elifaz | http://www.freecodecamp.com/elifaz
Aaron Graves
@gravesmeister
Jan 11 2016 03:28
That's like the 3rd time you've helped me now
brb
girlfriend is calling
wcs
@hoonah
Jan 11 2016 03:29
var myStr;
myStr = "This is the start." + " This is the end.";
this doesn't pass - it keeps saying Use the + operator to build myStr
DJ
@qualitymanifest
Jan 11 2016 03:29
@hoonah i think they want the space to be after the first string, not before the second
wcs
@hoonah
Jan 11 2016 03:29
@qualitymanifest just tried that and still not passing.
DJ
@qualitymanifest
Jan 11 2016 03:30
@hoonah paste a link to the waypoint
Milky
@milkyzongs
Jan 11 2016 03:30
@qualitymanifest thanks man, I got it going
CamperBot
@camperbot
Jan 11 2016 03:30
milkyzongs sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 765 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
John Cerpa
@johncerpa
Jan 11 2016 03:30
test
DJ
@qualitymanifest
Jan 11 2016 03:30
@milkyzongs :+1:
John Cerpa
@johncerpa
Jan 11 2016 03:30
function golfScore(par, strokes) {
  // Only change code below this line
  if (strokes == 1) {

    return "Hole-in-one";

  } else if (strokes <= par - 2) {

    return "Eagle";

  } else if (strokes == par - 1) {

    return "Birdie";

  } else if (strokes == par) {

    return "Par";    

  } else if (strokes == par + 1) {

    return "Bogey";

  } else if (strokes == par + 2) {

    return "Double Bogey!";

  } else if (strokes >= par + 3) {

    return "Go Home!";

  } else {

    return "Change Me";

  }


  // Only change code above this line
}

// Change these values to test
golfScore(4,5);
help
CamperBot
@camperbot
Jan 11 2016 03:31

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

DJ
@qualitymanifest
Jan 11 2016 03:31
@hoonah ah. don't initialize myStr before giving it text... just var myStr = "This is the start. " + "This is the end.";
framework24
@framework24
Jan 11 2016 03:31
how to make h2 element blue in this: <style>
<h2 style="color:red">CatPhotoApp>
h2 {color: blue;
}
</h2>
</style>
wcs
@hoonah
Jan 11 2016 03:31
@qualitymanifest thanks! it works!
CamperBot
@camperbot
Jan 11 2016 03:31
hoonah sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 766 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Jan 11 2016 03:32
@hoonah the way you had it is fine though, and would work - these tests are just really strict
John Cerpa
@johncerpa
Jan 11 2016 03:32
golfScore(4, 1) should return "Hole-in-one!"
Sujit Karki
@Swoozeki
Jan 11 2016 03:32
@Elifaz Yup, still stuck
function update(id, prop, value) {
  if(value!=="") collection[id].prop=value;
  if (value!=="" && prop=="tracks") collection[id].prop.push(value);  
  if (value=="") delete collection[id].prop;
  return collection;
}
Elifaz Filho
@Elifaz
Jan 11 2016 03:33
@gravesmeister Just a quick edit, if the dividend and the divisor is an even number, then by having de reainder as 0 it will equals to true, because 0 is true and 1 is false by coersion..I think this answer is a bit more propper
Sujit Karki
@Swoozeki
Jan 11 2016 03:33
but for some reason, changing collection.id to collection[id] made the error I was getting away gone
David
@DavidPhan1992
Jan 11 2016 03:33
Hi can anybody help me with waypoint Adding a default option in Switch statements
I
I'm having trouble
NormalWare
@Centuriom
Jan 11 2016 03:33
Hi everyone i got this problem... Function string.replace(/\W/g, ''); doesn't eliminate numbers, how can i eliminate numbers ?
Isaac Zaydens
@burnx545x
Jan 11 2016 03:33
Waypoint: Accessing Nested Arrays in JSON. My Code is var secondTree = myPlants.trees[1]; but I keep receiving an error "Type Erorr: Cannot read property '1' of undefined
Sujit Karki
@Swoozeki
Jan 11 2016 03:34
@DavidPhan1992 add default:"whatever you want"; at the end of your switch statement
David
@DavidPhan1992
Jan 11 2016 03:34
waypoint.PNG
DJ
@qualitymanifest
Jan 11 2016 03:34
@burnx545x paste a link to the waypoint
David
@DavidPhan1992
Jan 11 2016 03:34
@Swoozeki I'm getting an error at the break statement
@Swoozeki It keeps saying that it won't reach the break statement after teh return
Elifaz Filho
@Elifaz
Jan 11 2016 03:34
@Swoozeki yeah, you almost got it, so on your second if statement basically you are pushing the value to an object and that doesn’t work well
DJ
@qualitymanifest
Jan 11 2016 03:35
@Centuriom are you doing this for "palindrome" bonfire? you don't need to replace numbers for that. but you can access digits with \d
Elifaz Filho
@Elifaz
Jan 11 2016 03:35
@Swoozeki to fix that, try to assign collection[id][prop] to value; and give it a try.
NormalWare
@Centuriom
Jan 11 2016 03:35
@qualitymanifest Oh thanks dude!
CamperBot
@camperbot
Jan 11 2016 03:35
centuriom sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 767 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Aaron Graves
@gravesmeister
Jan 11 2016 03:35
@Elifaz Thanks again man. I'm going to continue with me lessons
CamperBot
@camperbot
Jan 11 2016 03:35
gravesmeister sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:warning: gravesmeister already gave elifaz points
Elifaz Filho
@Elifaz
Jan 11 2016 03:36
@gravesmeister You got it. Good luck!
DJ
@qualitymanifest
Jan 11 2016 03:36
@Centuriom something to note though is that underscores are considered a word character so replacing \W leaves underscores in there
Sujit Karki
@Swoozeki
Jan 11 2016 03:36
@DavidPhan1992 that's because return ends the function. Instead of that, assign the values to the variable "answer". And return the "answer" at the end
NormalWare
@Centuriom
Jan 11 2016 03:38
@qualitymanifest Mmm i didn't know that...
Vik
@vvang044
Jan 11 2016 03:38
Assign the value of 7 to variable a. Assign the contents of a to variable b......so var a= 7; var b=var a; .........is this correct?
DJ
@qualitymanifest
Jan 11 2016 03:39
@burnx545x first try myPlants[0] and then myPlants1 to see what those are, that might help it make a little more sense
David
@DavidPhan1992
Jan 11 2016 03:39
waypoint.PNG
@Swoozeki So I tried that and I still can't pass
@Swoozeki so I return answer at the end like this?
DJ
@qualitymanifest
Jan 11 2016 03:40
@burnx545x basically you need to get into the second part of myPlants, and then access the second part of list
Ray
@rbjr
Jan 11 2016 03:40
help Checkpoint: Record Collection
CamperBot
@camperbot
Jan 11 2016 03:40

: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

Vik
@vvang044
Jan 11 2016 03:41
can anyone help ?
Elifaz Filho
@Elifaz
Jan 11 2016 03:42
@vvang044 what’s up?
Sujit Karki
@Swoozeki
Jan 11 2016 03:43
@DavidPhan1992 the defailt answer should be "stuff"
Elifaz Filho
@Elifaz
Jan 11 2016 03:43
@vvang044 almost there, once you assign a variable you don’t have to place var again unless you have a purpose for that variable to be recreated
@Swoozeki did it worked?
Isaac Zaydens
@burnx545x
Jan 11 2016 03:43
@qualitymanifest that worked! Thanks!! ....how do I give you brownie points?
CamperBot
@camperbot
Jan 11 2016 03:43
burnx545x sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 768 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Isaac Zaydens
@burnx545x
Jan 11 2016 03:43
....well that worked perfectly!
DJ
@qualitymanifest
Jan 11 2016 03:43
@burnx545x haha success
David
@DavidPhan1992
Jan 11 2016 03:44
waypoint.PNG
@Swoozeki like this correct?
Sujit Karki
@Swoozeki
Jan 11 2016 03:44
@DavidPhan1992 No, the answer variable is"stuff"
put return statement after the switch statement
not inside
bob.fu
@yushiangfu
Jan 11 2016 03:46
hi everyone, I got a problem...
Waypoint: Global Scope and Functions
Sujit Karki
@Swoozeki
Jan 11 2016 03:46
as in:
default: answer="stuff" //this means that if none of the other cases becomes true, the default answer will be "stuff"
put the return statement outside of switch statement
bob.fu
@yushiangfu
Jan 11 2016 03:47
it keeps showing "RangeError: Maximum call stack size exceded"
Sujit Karki
@Swoozeki
Jan 11 2016 03:47
otherwise the return only executes when default case is true
@yushiangfu refresh the page, and try again. happened to me as well
@Elifaz I'm still a hopeless cause
:(
Elifaz Filho
@Elifaz
Jan 11 2016 03:48
@Swoozeki did you moved from the last time you posted your code
@Swoozeki if yes, let me check and we will go from there
bob.fu
@yushiangfu
Jan 11 2016 03:48
@Swoozeki it works! thanks!!!!
CamperBot
@camperbot
Jan 11 2016 03:48
yushiangfu sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 220 | @swoozeki | http://www.freecodecamp.com/swoozeki
David
@DavidPhan1992
Jan 11 2016 03:48
waypoint.PNG
@Swoozeki like this?
Sujit Karki
@Swoozeki
Jan 11 2016 03:49
@DavidPhan1992 yes
@yushiangfu no problem
David
@DavidPhan1992
Jan 11 2016 03:49
@Swoozeki That's weird I still can't pass
Sujit Karki
@Swoozeki
Jan 11 2016 03:49
@Elifaz I'm basically not able to do this: <If the prop is "tracks" and value is non-blank, push the value onto the end of the tracks array.>
Elifaz Filho
@Elifaz
Jan 11 2016 03:50
@DavidPhan1992 place a break after your default case
David
@DavidPhan1992
Jan 11 2016 03:51
@Elifaz doesn't work
Elifaz Filho
@Elifaz
Jan 11 2016 03:51
@DavidPhan1992 also set your switch to evaluate the (val) argument, and leave Answer in blank as undefined or with empty strings.
such as answer = “”change the switch to evaluate the “val”argument and try to pass the code
Sujit Karki
@Swoozeki
Jan 11 2016 03:52
if(value!=="" &&  prop=="tracks") //now, wut do
David
@DavidPhan1992
Jan 11 2016 03:52
@Elifaz how come I need a break statement after the default? The instructions doesn't say that, would that be a bug for this lesson?
Elifaz Filho
@Elifaz
Jan 11 2016 03:52
@Swoozeki you don’t have to push the value because on this case, the Tracks property is an object, it’s value is an array, therefore instead of pushing to a non-array key, you will assign the object tracks to the array value.
@DavidPhan1992 nope, not a bug, I was wrong.
Sujit Karki
@Swoozeki
Jan 11 2016 03:53
@DavidPhan1992 you don't need a break statement for default. Just refresh your page and try again
David
@DavidPhan1992
Jan 11 2016 03:54
@Swoozeki k i'll tryy that
Siddharth Khare
@kooks20
Jan 11 2016 03:55
Hey has the curriculum been shortened? Couldn't see full stack track?
Billboz
@Billboz
Jan 11 2016 03:55
Hey all.. I think this code should pick up a negative number and return 'undefined'. Can you tell me why it doesn't please?
// Setup
function abTest(a, b) {
  // Only change code below this line
  if (a < 0) {
      return "undefined";
      } else if (b < 0) {
        return "undefined";
      }

  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}

// Change values below to test your code
abTest(2,2);
Christopher Ngo
@ingochris
Jan 11 2016 03:56
math.sqrt(2)
David
@DavidPhan1992
Jan 11 2016 03:56
waypoint.PNG
Billboz
@Billboz
Jan 11 2016 03:56
oh... duh... clever
Ira Kaufman
@irajkaufman
Jan 11 2016 03:56
Hi Gang. Is there a way to show the barckets of an array in the console log? I'm working on the Chunky Monkey Bonfire, and when I return the resulting array, I don't see that the returned array is broken up into multiple arrays. In other words, rather than seeing [[a,b],[c,d]], i just see a,b,c,d. My answer passes with a,b,c,d, but it doesn't "show" that it worked, per se. Maybe it's not supposed to? Thanks in advance for any advice!!
David
@DavidPhan1992
Jan 11 2016 03:56
@Swoozeki this looks correct to me but I don't quite understand why i am not passing
Christopher Ngo
@ingochris
Jan 11 2016 03:56
it's greater than 0, @Billboz
Billboz
@Billboz
Jan 11 2016 03:57
In the tests neg numbers are input @ingochris
Waypoint: Return Early Pattern for Functions
Ira Kaufman
@irajkaufman
Jan 11 2016 03:58
  • "brackets" (not "barckets")
Elifaz Filho
@Elifaz
Jan 11 2016 03:58
@DavidPhan1992 paste your code
Lance Barney
@lbarney
Jan 11 2016 03:58

// Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};

// Only change code below this line

var gloveBoxContents = ""myStorage.car.inside["glove box"]; // Change this line

can someone tell me why this is not working?

David
@DavidPhan1992
Jan 11 2016 03:58
@Elifaz

function myTest(val) {
var answer = val;
// Only change code below this line
switch(val){
case 1:
answer = "apple";
break;
case 2:
answer = "bird";
break;
case 3:
answer = "cat";
break;
default:
answer = "stuff";

}
return answer;

// Only change code above this line
}

// Change this value to test
myTest("a");
myTest("b");
myTest("c");
myTest("d");
myTest(4);

Elifaz Filho
@Elifaz
Jan 11 2016 03:59
@DavidPhan1992 your variable answer, set it equal to an empty string
Sujit Karki
@Swoozeki
Jan 11 2016 03:59
@DavidPhan1992 Why did you assign "val" to "answer"? You're not even supposed to touch the code there
Elifaz Filho
@Elifaz
Jan 11 2016 03:59
@Swoozeki he assigned answer to the val, the val argument is what gets evaluated, by assigning the answer to the val the code will return undefined, or call stack exceed
David
@DavidPhan1992
Jan 11 2016 03:59
@Swoozeki Oh didn't see that let me try again
Christopher Ngo
@ingochris
Jan 11 2016 04:01
You threw in two positive numbers at the bottom there, though @Billboz : 2 and 2
abTest(2,2)
Billboz
@Billboz
Jan 11 2016 04:01
I can replace them with negs and it still doesn't work
Elifaz Filho
@Elifaz
Jan 11 2016 04:01
@DavidPhan1992 leave your answer with an empty string, the remainder of the code should run properly.
Sujit Karki
@Swoozeki
Jan 11 2016 04:01
@Elifaz I still have not been able to get it right
Elifaz Filho
@Elifaz
Jan 11 2016 04:02
@Swoozeki let me see
David
@DavidPhan1992
Jan 11 2016 04:02

function myTest(val) {
var answer = "";
// Only change code below this line
switch(val){
case 1:
answer = "apple";
break;
case 2:
answer = "bird";
break;
case 3:
answer = "cat";
break;
default:
answer = "stuff";
}

// Only change code above this line
return answer;
}

// Change this value to test
myTest("a");
myTest("b");
myTest("c");
myTest("d");
myTest(4);

So I changed it to this
Is this fine? @Elifaz @Swoozeki
Elifaz Filho
@Elifaz
Jan 11 2016 04:02
alright, run your code
Sujit Karki
@Swoozeki
Jan 11 2016 04:02
function update(id, prop, value) {
  if(value!=="") collection[id].prop=value;
  if (value!=="" && prop=="tracks") //don't know what to do here
  if (value=="") delete collection[id].prop;
  return collection;
}
David
@DavidPhan1992
Jan 11 2016 04:02
@Elifaz still can't pass
I even refreshed the page
Elifaz Filho
@Elifaz
Jan 11 2016 04:03
@DavidPhan1992 it’s not passing becase your answer supposed to have different strings
@DavidPhan1992 the structure is correct
David
@DavidPhan1992
Jan 11 2016 04:04
@Elifaz What do you mean by different strings?
Elifaz Filho
@Elifaz
Jan 11 2016 04:04
@DavidPhan1992 change the strings to return the proper strings, such as alpha, beta, gamma, delta check your requirements on the bottom left
David
@DavidPhan1992
Jan 11 2016 04:04
myTest("a") should have a value of "apple"
myTest("b") should have a value of "bird"
myTest("c") should have a value of "cat"
myTest("d") should have a value of "stuff"
myTest(4) should have a value of "stuff"
You should not use any if or else statements
You should have at least 3 break statements
this is my bottom left
Lance Barney
@lbarney
Jan 11 2016 04:05
@DavidPhan1992 your cases are numbers and your test arguments are letters, maybe?
David
@DavidPhan1992
Jan 11 2016 04:05
Instructions
Write a switch statement to set answer for the following conditions:
"a" - "apple"
"b" - "bird"
"c" - "cat"
default - "stuff"
Elifaz Filho
@Elifaz
Jan 11 2016 04:05
@DavidPhan1992 what is the name of your exercise?
David
@DavidPhan1992
Jan 11 2016 04:05
@Elifaz
Waypoint: Adding a default option in Switch statements
CharmedSatyr
@CharmedSatyr
Jan 11 2016 04:05
Anyone have hints for Waypoint: Return Early Pattern for Functions?
Billboz
@Billboz
Jan 11 2016 04:05
yes!!
Christopher Ngo
@ingochris
Jan 11 2016 04:05
Just checked out the prompt. Try using unconditional OR instead of elseif, @Billboz
Elifaz Filho
@Elifaz
Jan 11 2016 04:05
@DavidPhan1992 apparently it had changed, so in your case statements instead of numbers place these strings in it, a, b, c
Billboz
@Billboz
Jan 11 2016 04:06
yes @JosephWolfe
I want some as well
Lance Barney
@lbarney
Jan 11 2016 04:06
@Elifaz thats what I said
CharmedSatyr
@CharmedSatyr
Jan 11 2016 04:06
I am able to get the right results using switch or if/else statements, but evidently I'm supposed to solve the issue a different way
Elifaz Filho
@Elifaz
Jan 11 2016 04:06
case “a”..
case “b”… and so forth
Sammy
@Sammyghp
Jan 11 2016 04:06
i have a question about this. Does val = 1 in Case 1???

function myTest(val) {
var answer = "";
// Only change code below this line
switch(val) {
case 1:
answer = "alpha";
break;
case 2:
answer = "beta";
break;
case 3:
answer = "gamma";
break;
case 4:
answer = "delta";
break;
}

// Only change code above this line
return answer;
}

// Change this value to test
myTest(4);

Elifaz Filho
@Elifaz
Jan 11 2016 04:06
@lbarney you got it, thank you
CamperBot
@camperbot
Jan 11 2016 04:06
elifaz sends brownie points to @lbarney :sparkles: :thumbsup: :sparkles:
:star: 254 | @lbarney | http://www.freecodecamp.com/lbarney
David
@DavidPhan1992
Jan 11 2016 04:06
@Elifaz thank you it worked!
CamperBot
@camperbot
Jan 11 2016 04:06
davidphan1992 sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
Sammy
@Sammyghp
Jan 11 2016 04:06
lets say i put 1 inside
CamperBot
@camperbot
Jan 11 2016 04:06
:star: 317 | @elifaz | http://www.freecodecamp.com/elifaz
Sujit Karki
@Swoozeki
Jan 11 2016 04:07
This message was deleted
CamperBot
@camperbot
Jan 11 2016 04:07

:point_right: waypoint adding a default option in switch statements [wiki]

Waypoint: Adding a default option in Switch statements

In a switch statement you may not be able to specify all possible values as case statements. Instead, you can add the default statement which will be executed if no matching case statements are found. Think of it like the final else statement in an if/else chain.

A default statement should be the last case.

switch (num) {
  case value1:
    statement1
    break;
  case value2:
    statement2;
    break;
...
  default:
    defaultStatement;
}

:pencil: read more about waypoint adding a default option in switch statements on the FCC Wiki

Billboz
@Billboz
Jan 11 2016 04:07
I can get all but the negative tests to pass
David
@DavidPhan1992
Jan 11 2016 04:07
@lbarney thank you that made sense
CamperBot
@camperbot
Jan 11 2016 04:07
davidphan1992 sends brownie points to @lbarney :sparkles: :thumbsup: :sparkles:
:star: 255 | @lbarney | http://www.freecodecamp.com/lbarney
CharmedSatyr
@CharmedSatyr
Jan 11 2016 04:07
Same here, even though the console actually does read "undefined" when I test negative values
David
@DavidPhan1992
Jan 11 2016 04:07
@Swoozeki thanks for the effort in help
CamperBot
@camperbot
Jan 11 2016 04:07
davidphan1992 sends brownie points to @swoozeki :sparkles: :thumbsup: :sparkles:
:star: 221 | @swoozeki | http://www.freecodecamp.com/swoozeki
Lance Barney
@lbarney
Jan 11 2016 04:07
now can someone help me
DJ
@qualitymanifest
Jan 11 2016 04:07
@Billboz paste the link to your waypoint
Joe Savage
@JoeASavage
Jan 11 2016 04:08
same here @Billboz and @JosephWolfe
Lance Barney
@lbarney
Jan 11 2016 04:08
Waypoint: Accessing Nested Objects in JSON
Elifaz Filho
@Elifaz
Jan 11 2016 04:08
@Swoozeki so in there the evaluation is comming through, what you will return is what changes.
// before you were doing. 
collection[id][prop].push(value);
//  value can’t be pushed because it prop in this case is an object.
// To fix that try to assign the [prop] object to the value, such as:
collection[id][prop] = [value];
// The reason why is because you are assigning a value array to an object, and not pushing it
// necessarily..that’s how you go around adding a key array to a property object.
Christopher Ngo
@ingochris
Jan 11 2016 04:09
DJ
@qualitymanifest
Jan 11 2016 04:09
@Billboz don't put undefined in quotation marks
Billboz
@Billboz
Jan 11 2016 04:10
OH
Joe Savage
@JoeASavage
Jan 11 2016 04:10
oh man I was doing the same thing @Billboz.
Billboz
@Billboz
Jan 11 2016 04:10
ARE YOU F'ING KIDDING ME..... holy moly! thank you @qualitymanifest
CamperBot
@camperbot
Jan 11 2016 04:10
billboz sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 769 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Joe Savage
@JoeASavage
Jan 11 2016 04:11
thanks for the help @qualitymanifest
CamperBot
@camperbot
Jan 11 2016 04:11
joeasavage sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 770 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
CharmedSatyr
@CharmedSatyr
Jan 11 2016 04:11
Yeah that solved it for me too
Thanks guys
Lance Barney
@lbarney
Jan 11 2016 04:11

// Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};

// Only change code below this line

var gloveBoxContents = ""myStorage.car.inside["glove box"]; // Change this line

Billboz
@Billboz
Jan 11 2016 04:11
Maybe a little clue about the difference between "undefined" and undefined.... Thanks all
Lance Barney
@lbarney
Jan 11 2016 04:11
anyone?
denzel337
@denzel337
Jan 11 2016 04:11
Can anyone insist me with
Waypoint: Use the Bootstrap Grid to Put Elements Side By Side. I'm having trouble with "div element with the class col-xs-4 "portion
Joe Savage
@JoeASavage
Jan 11 2016 04:12
heh
NormalWare
@Centuriom
Jan 11 2016 04:13
Can somebody tell me, why the code doesn't work ?
´´´
```
damn
Elifaz Filho
@Elifaz
Jan 11 2016 04:13
@lbarney empty quotation marks floating there at the beginning of your assignment in your var gloveBoxContents
NormalWare
@Centuriom
Jan 11 2016 04:13
This message was deleted
DJ
@qualitymanifest
Jan 11 2016 04:14
@Billboz it's not a string, it's a primitive value. if you wanna do some reading: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined
Lance Barney
@lbarney
Jan 11 2016 04:14
@Elifaz wow i was wondering what those were doing there . thanks
CamperBot
@camperbot
Jan 11 2016 04:14
lbarney sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 318 | @elifaz | http://www.freecodecamp.com/elifaz
DJ
@qualitymanifest
Jan 11 2016 04:15
This message was deleted
Elifaz Filho
@Elifaz
Jan 11 2016 04:15
@lbarney haha, glad to help out.
Guys time to work on my project here, and then go to bed. Good night everyone..
Lance Barney
@lbarney
Jan 11 2016 04:15
@Elifaz Thanks man good luck
CamperBot
@camperbot
Jan 11 2016 04:15
lbarney sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:warning: lbarney already gave elifaz points
NormalWare
@Centuriom
Jan 11 2016 04:16
Good night
@qualitymanifest I think i just deleted your message
I didn't want to do that, i don't even know how i did that
DJ
@qualitymanifest
Jan 11 2016 04:16
@Centuriom haha nah you can't do that, i deleted it because i was gonna type something else but if you're just going to bed, goodnight
oh nm
you were saying that to someone else
NormalWare
@Centuriom
Jan 11 2016 04:17
what
DJ
@qualitymanifest
Jan 11 2016 04:17
anyway, do you still need help with that?
NormalWare
@Centuriom
Jan 11 2016 04:17
yeah dude
Mmm the code works
But doesn't work just for palindrome("0_0 (: /-\ :) 0-0");
Immanuel McGee
@imcgee77
Jan 11 2016 04:18
need some assistance with waypoint:size your images
NormalWare
@Centuriom
Jan 11 2016 04:18
palindrome("0_0 (: /-\ :) 0-0");
DJ
@qualitymanifest
Jan 11 2016 04:19
@Centuriom you're still not replacing underscores _
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:19
Could anyone tell me why I'm getting errors on this waypoint? I tested it and it works, but I'm still gettingerrors....
// Setup
var phoneticLookup ={
  "alpha": "Adams",
  "bravo": "Boston",
  "charlie": "Chicago",
  "delta": "Denver",
  "echo": "Easy",
  "foxtrot": "Frank",
  };

var val = "echo";
result = phoneticLookup[val];
NormalWare
@Centuriom
Jan 11 2016 04:19
@qualitymanifest Oh, how i can replace them ?
DJ
@qualitymanifest
Jan 11 2016 04:19
@KaanMasters paste a link to the waypoint
Ashley
@Ashtheyogi
Jan 11 2016 04:20
hey there campers, just got started in the query section, adding a bounce element to my buttons. But I have no flippin idea how it's supposed to look. Is this anywhere near correct?
<script>
  $("button").addClass("animated bounce"); {

  });
</script>
DJ
@qualitymanifest
Jan 11 2016 04:20
@Centuriom you can target multiple things in regex with the "or" pipeline, like \W|somethingelse
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:20
@qualitymanifest Here's the error message: "phoneticLookup("echo") should equal "Easy" "
DJ
@qualitymanifest
Jan 11 2016 04:21
@Ashtheyogi you don't need { or );
NormalWare
@Centuriom
Jan 11 2016 04:21
@qualitymanifest Dude it worked !! Thank you so much
CamperBot
@camperbot
Jan 11 2016 04:21
centuriom sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: centuriom already gave qualitymanifest points
Ashley
@Ashtheyogi
Jan 11 2016 04:22
hey @qualitymanifest why not? why did they have us add it in the last puzzle?
thanks @qualitymanifest
Sujit Karki
@Swoozeki
Jan 11 2016 04:23
anybody done with the checkpoint:record collection?
CamperBot
@camperbot
Jan 11 2016 04:23
ashtheyogi sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 771 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Ashley
@Ashtheyogi
Jan 11 2016 04:23
still dont get it though
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:24
any thoughts on mine @qualitymanifest
DJ
@qualitymanifest
Jan 11 2016 04:24
@Ashtheyogi that is a complete jQuery statement without the curly braces. what was the previous one you're talking about?
@KaanMasters yeah one sec
Ashley
@Ashtheyogi
Jan 11 2016 04:24
same one @qualitymanifest it just didnt make sense to me. First you have the curly brackets and then you dont need them :.-(
DJ
@qualitymanifest
Jan 11 2016 04:26
@KaanMasters you got rid of code above and below the lines that they tell you to stay inside
Edward Hong
@edward-hong
Jan 11 2016 04:26
Hi has anyone finished checkpoint Stand in Line?
Nick Grismore
@IamSoma
Jan 11 2016 04:26
Hey guys, I was wondering if someone can help me with the Checkpoint "Stand in Line"
@edward-hong I'm on the same one
Edward Hong
@edward-hong
Jan 11 2016 04:27
yea
here's my code
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:27
oh so they're punishing me eh
Edward Hong
@edward-hong
Jan 11 2016 04:27
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  // Your code here
  if (arr == []){
    return item;
  } else {
    arr.copyWithin(0,1,4);
    arr[4] = item;
  }

}
DJ
@qualitymanifest
Jan 11 2016 04:27
@KaanMasters not really, you got rid of things that you need
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:28
hmm okies ty @qualitymanifest
Nick Grismore
@IamSoma
Jan 11 2016 04:28
cant you use something like .pop
DJ
@qualitymanifest
Jan 11 2016 04:28
@KaanMasters you no longer have a function that has a parameter named val. instead, you're hardcoding val. and you're not returning anything or running the function
Nick Grismore
@IamSoma
Jan 11 2016 04:28
or something along those lines to get it to go to the front
Edward Hong
@edward-hong
Jan 11 2016 04:28
console comes back with "RangeError: maximum call stack size exceeded"
DJ
@qualitymanifest
Jan 11 2016 04:28
@KaanMasters copy your code and hit the "reset" button and put your code inside the lines this time
Edward Hong
@edward-hong
Jan 11 2016 04:29
I tried using copyWithin() method but i didn't work
Kaan Erermis, PPE (Professional Pizza Eater)
@KaanMasters
Jan 11 2016 04:29
Yea I got it now @qualitymanifest thanks. I didn't realize they wanted it as a function