These are chat archives for FreeCodeCamp/Help

3rd
Jan 2016
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:00
@Lunapopo Should i return arr[4] or return x = arr.shift() ?
Brian
@sludge256
Jan 03 2016 00:01
return arr.shift() works too
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:01
Got IT !
Lunapopo
@Lunapopo
Jan 03 2016 00:01
@7urkm3n return arr.shift()
Brian
@sludge256
Jan 03 2016 00:01
it just wants you to return whoever is first in line
Lunapopo
@Lunapopo
Jan 03 2016 00:01
@7urkm3n the test program will check arr[4] by itself.
Stella Liu
@Stells93
Jan 03 2016 00:03

@alexanderkopke thank you!! Yeah I think they need to edit the example in the instructions. It read:
var someProp = "propName";
var myObj = {
propName: "Some Value"
}
myObj[someProp]; // "Some Value"

When it should have been:

var myObj = {
propName: "SomeValue"
}
var someProp = "Some Value";
var someOtherProp = myObj [someProp];

CamperBot
@camperbot
Jan 03 2016 00:03
stells93 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:warning: stells93 already gave alexanderkopke points
Lunapopo
@Lunapopo
Jan 03 2016 00:04
@ahustlelife use product *= ..., it will keep mutiplying the previous results
Alexander Køpke
@alexanderkopke
Jan 03 2016 00:05
@ahustlelife one moment.. I think this is a new one.. I have to work through it first
Greg
@gsc229
Jan 03 2016 00:05
@Takumar Thanks for that. I've been banging my head over this one.
CamperBot
@camperbot
Jan 03 2016 00:05
gsc229 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1457 | @takumar | http://www.freecodecamp.com/takumar
Michael P Murphy
@ahustlelife
Jan 03 2016 00:07
@Lunapopo thanks a lot! for some reason in my mind I kept thinking that it was going to update the product variable and thus each iteration would cause the product value to increase throwing it all off, but *= was all I needed to knock it out! All I had left in the waypoints too so a big thank you!
CamperBot
@camperbot
Jan 03 2016 00:07
ahustlelife sends brownie points to @lunapopo :sparkles: :thumbsup: :sparkles:
:star: 237 | @lunapopo | http://www.freecodecamp.com/lunapopo
Lunapopo
@Lunapopo
Jan 03 2016 00:08
You're welcome :)
Aleksander Gębicki
@Takumar
Jan 03 2016 00:09
@gsc229 I'm glad that I could help.
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:13

// Setup
function myTest(val) {

if("12" == val) {
return "Equal";
}
return "Not Equal";
}

// Change this value to test
myTest();

Whats wrong with this ?

This message was deleted
Aleksander Gębicki
@Takumar
Jan 03 2016 00:14
@7urkm3n which waypoint is it? What you want to achieve?
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:14
@Takumar Waypoint: Comparison with the Equality Operator
FishFenly
@FishFenly
Jan 03 2016 00:15
@7urkm3n does it not need to be the other way round?
so if(val == "12")
Aleksander Gębicki
@Takumar
Jan 03 2016 00:15
@7urkm3n you are comparing val with string, you should compare with number 12
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:16
@Takumar thx
CamperBot
@camperbot
Jan 03 2016 00:16
7urkm3n sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1459 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Jan 03 2016 00:17
@7urkm3n if(val == 12) {
Stella Liu
@Stells93
Jan 03 2016 00:19
Ah sorry I need help again you guys. I am just not understand how to interpret their examples over to the activity
I am supposed to look up different values using objects. The example they gave is:
var alpha = {
1:"Z",
2:"Y",
3:"X",
4:"W",
...
24:"C",
25:"B",
26:"A"
};
alpha2; // "Y"
alpha[24]; // "C"
and then I applied it to the activity like this
// Setup
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
lookup[charlie];
but it won't work
Herman Fassett
@HermanFassett
Jan 03 2016 00:21
Why return result?
Aleksander Gębicki
@Takumar
Jan 03 2016 00:21
@Stells93 you have to change one line: return result;
Stella Liu
@Stells93
Jan 03 2016 00:22
@Takumar it says that I can't change that code
// only change code above this line
Herman Fassett
@HermanFassett
Jan 03 2016 00:22
That's true...
Aleksander Gębicki
@Takumar
Jan 03 2016 00:22
@Stells93 but you can assign value to result variable above ;-)
Herman Fassett
@HermanFassett
Jan 03 2016 00:23
It also works if you disobey the comment :P
Brian
@sludge256
Jan 03 2016 00:23
Call the :cop: :police_car: !
Stella Liu
@Stells93
Jan 03 2016 00:23
@HermanFassett ah no I deleted it and it won't work
Brian
@sludge256
Jan 03 2016 00:23
Rule breakers!
Aleksander Gębicki
@Takumar
Jan 03 2016 00:23
@HermanFassett you have to listen to the comments :-)
Stella Liu
@Stells93
Jan 03 2016 00:23
@Takumar wait what do you mean? Isn't result already defined?
var result = "";
Aleksander Gębicki
@Takumar
Jan 03 2016 00:23
@Stells93 it is defined but it is empty string.
Herman Fassett
@HermanFassett
Jan 03 2016 00:23
@Stells93 you can't just delete it, you have to return a specific something
Brian
@sludge256
Jan 03 2016 00:23
I think he means assign another value to it
Aleksander Gębicki
@Takumar
Jan 03 2016 00:24
@sludge256 understands me very good :-)
Stella Liu
@Stells93
Jan 03 2016 00:24
@Takumar so instead of lookup to put result?
Herman Fassett
@HermanFassett
Jan 03 2016 00:25
you should return something using the lookup
Aleksander Gębicki
@Takumar
Jan 03 2016 00:25
@Stells93 no, make use of lookup and assign one value from it to the result variable.
Remember also that you have val parameter in your function.
Stella Liu
@Stells93
Jan 03 2016 00:25
@Takumar I don't get what you mean
oh like val: result
Herman Fassett
@HermanFassett
Jan 03 2016 00:26
:)
Stella Liu
@Stells93
Jan 03 2016 00:26
wait that didnt work :/
KickAssBrockSamson
@KickAssBrockSamson
Jan 03 2016 00:26
90.Checkpoint: Record Collection Incomplete: Anyone get that far
Herman Fassett
@HermanFassett
Jan 03 2016 00:26
Yeah
Aleksander Gębicki
@Takumar
Jan 03 2016 00:26
It is so difficult when you know some English and some JavaScript, how to explain it :-)
Stella Liu
@Stells93
Jan 03 2016 00:27
@Takumar can i compare my code to yours? :)
KickAssBrockSamson
@KickAssBrockSamson
Jan 03 2016 00:27
@HermanFassett
function update(id, prop, value) {
  if ( value !== "") {
    collection[id].prop = value;
  } else if ( prop === "tracks" && value !== "") {
    collection[id].tracks.push(value);
  } else {
    collection[id].prop.delete();
  }
  return collection;
}
Herman Fassett
@HermanFassett
Jan 03 2016 00:27
@Stells93 you need to return the property of val inside lookup
Stella Liu
@Stells93
Jan 03 2016 00:28
@HermanFassett but I can't change the code outside. Is there an alternative solution?
Herman Fassett
@HermanFassett
Jan 03 2016 00:28
@Stells93 you can or assign the lookup property to result variable
@KickAssBrockSamson will the else if there ever be run?
Stella Liu
@Stells93
Jan 03 2016 00:29
@HermanFassett can you elaborate what you mean by assigning the lookup property to result variable?
Aleksander Gębicki
@Takumar
Jan 03 2016 00:29
@Stells93 result = 5 * 4; you can do it. and then you can return result;
Herman Fassett
@HermanFassett
Jan 03 2016 00:29
Yes, result = lookup property stuff using val
Stella Liu
@Stells93
Jan 03 2016 00:30
@Takumar @HermanFassett wait where do I add that in....?
so I have to include result = lookup val
Herman Fassett
@HermanFassett
Jan 03 2016 00:30
Somewhere between var lookup {} and return I guess
KickAssBrockSamson
@KickAssBrockSamson
Jan 03 2016 00:31
@HermanFassett
function update(id, prop, value) {

  if ( prop === "tracks" && value !== "") {
    collection[id].tracks.push(value);
  }  else if ( value !== "") {
    collection[id].prop = value;
  } else {
    collection[id].prop.delete();
  }

  return collection;
}
Stella Liu
@Stells93
Jan 03 2016 00:32
can I just see someones code for it? @HermanFassett @Takumar what you two are saying isn't making sense to me
Aleksander Gębicki
@Takumar
Jan 03 2016 00:33
@Stells93 try to get that value like you do with arrays. Use val as index.
Herman Fassett
@HermanFassett
Jan 03 2016 00:33
@KickAssBrockSamson prop is a variable so you won't be able to use dot notation like that
Stella Liu
@Stells93
Jan 03 2016 00:33
// Setup
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
lookup[charlie];
Herman Fassett
@HermanFassett
Jan 03 2016 00:33
@Stells93 get the val property in lookup using bracket notation
Stella Liu
@Stells93
Jan 03 2016 00:34
@HermanFassett can you please give an exact example? I don't get which part you are referring to?
Jon Grant
@jong649
Jan 03 2016 00:35
@HermanFassett @Stells93 I'm stuck on this one also
Stella Liu
@Stells93
Jan 03 2016 00:35
do you mean changing lookup [charlie];
Jon Grant
@jong649
Jan 03 2016 00:35
Seems easy enough, but I can't get lookup to use val
Herman Fassett
@HermanFassett
Jan 03 2016 00:35
@Stells93 we really aren't supposed to give you solutions, simply nudges. using lookup with bracket notation like that with val inside your function should work.
KickAssBrockSamson
@KickAssBrockSamson
Jan 03 2016 00:35
@HermanFassett Thanks man!
CamperBot
@camperbot
Jan 03 2016 00:35
kickassbrocksamson sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 1244 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Jan 03 2016 00:36
Yep
Stella Liu
@Stells93
Jan 03 2016 00:36
@HermanFassett understood but I already gave my code out and just need to compare it. I don't understand what you mean by putting val inside the function
Aleksander Gębicki
@Takumar
Jan 03 2016 00:36
@Stells93 you need only one line: result = lo...
Paul
@izzo70
Jan 03 2016 00:36
Switch statements? What is wrong with the way i am writing it?
i am writing it as follows:
switch (val) {
case 1:
"alpha";
break;
case 2:
"beta";
break;
case 3:
"gamma";
break;
case 4:
"delta";
break;
}
Herman Fassett
@HermanFassett
Jan 03 2016 00:37

@izzo70 try

case 1:
   answer = "alpha";
   break;

etc

You need to assign it like that
Brian
@sludge256
Jan 03 2016 00:37
@Stells93 So if you look at the example
calling the variable with a value in []
Aleksander Gębicki
@Takumar
Jan 03 2016 00:38

@Stells93 you have:

var arr = [2, 3];

How you will get second value from that array and assign it to result variable?

Paul
@izzo70
Jan 03 2016 00:38
@HermanFassett Thank you!
CamperBot
@camperbot
Jan 03 2016 00:38
izzo70 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 1246 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Jan 03 2016 00:38
Yep
Brian
@sludge256
Jan 03 2016 00:38
will give you the value that follows the value inside the []
var alpha = {
  1:"Z",
  2:"Y",
  3:"X",
  4:"W",
  ...
  24:"C",
  25:"B",
  26:"A"
};
alpha[2]; // "Y"
alpha[24]; // "C"
Herman Fassett
@HermanFassett
Jan 03 2016 00:38
@Takumar but we're speaking objects right?
Aleksander Gębicki
@Takumar
Jan 03 2016 00:39
@HermanFassett yes, but I tried to create analogy to arrays to understand bracket notation.
How to help without telling solution :-)
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:39
hey friends
Brian
@sludge256
Jan 03 2016 00:39
@Stells93 If you do the same to your lookup object as they did with the alpha object as show in the last two lines
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:39
I have a question :)
Brian
@sludge256
Jan 03 2016 00:39
you can assign that output to your result variable
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:39
@sludge256 No its not, cuz its Object. Object does have a index. Only KEY, VALUE>
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:40
How do I add a script element ??
Stella Liu
@Stells93
Jan 03 2016 00:40
@sludge256 that's why I put lookup[charlie]; Do i have to make result equal something....?
Herman Fassett
@HermanFassett
Jan 03 2016 00:40
@Bondygio in codepen?
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:40
@HermanFassett I am at Waypoint: Learn how script tags and documents ready work
Lunapopo
@Lunapopo
Jan 03 2016 00:40
@Bondygio <script></script>
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:40
and it says to add a script first
Brian
@sludge256
Jan 03 2016 00:40
@Stells93 when you pass in the value charlie to your function it is stored in the parameter called value
Herman Fassett
@HermanFassett
Jan 03 2016 00:40
Oh
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:40
that easy?
Brian
@sludge256
Jan 03 2016 00:40
err i mean val
at the top of the function
Aleksander Gębicki
@Takumar
Jan 03 2016 00:41
@Stells93 I haven't notice that. Last line should be: phoneticLookup("charlie"); like in the beginning.
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:41
@Bondygio add "<script> </script>" inside your <body> or <head>
Brian
@sludge256
Jan 03 2016 00:41
Yea you guys told her to change that line i think :P
aka cheat
might have been confusion as to what you said and what was done though
Stella Liu
@Stells93
Jan 03 2016 00:42
@Takumar okay.. so I should keep that? but what do I write beforehand...?
Aleksander Gębicki
@Takumar
Jan 03 2016 00:42
@sludge256 I told to add code above comment.
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:42
@7urkm3n @Lunapopo @HermanFassett thank you! :)
CamperBot
@camperbot
Jan 03 2016 00:42
bondygio sends brownie points to @7urkm3n and @lunapopo and @hermanfassett :sparkles: :thumbsup: :sparkles:
Lunapopo
@Lunapopo
Jan 03 2016 00:42
@Bondygio According to the assignment requirement: First, add a script element at the top of your page.
CamperBot
@camperbot
Jan 03 2016 00:42
:star: 78 | @7urkm3n | http://www.freecodecamp.com/7urkm3n
:star: 1247 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
:star: 243 | @lunapopo | http://www.freecodecamp.com/lunapopo
Aleksander Gębicki
@Takumar
Jan 03 2016 00:42
@Stells93 write assignment before comment, before you return result;
Stella Liu
@Stells93
Jan 03 2016 00:43
// Setup
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
lookup[charlie];

phoneticLookup("charlie");
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:43
@Lunapopo I did and then i just out $(document).ready(function() { inside of it right?
Lunapopo
@Lunapopo
Jan 03 2016 00:43
@Bondygio Yup
Brian
@sludge256
Jan 03 2016 00:43
put the lookup inside your function
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:43
like this?
<script $(document).ready(function() { >
??
Brian
@sludge256
Jan 03 2016 00:43
<script> stuff </script>
Lunapopo
@Lunapopo
Jan 03 2016 00:43
@Bondygio <script> $(document)... </script>
Aleksander Gębicki
@Takumar
Jan 03 2016 00:43

@Stells93 I give up.

result = lookup[ ...
// Only change code above this line
  return result;

You are expected to return "Chicago" right?
Use 'charlie' as key to find 'Chicago' and assign it to 'result' variable.

Jon Grant
@jong649
Jan 03 2016 00:44
@Stells93 you need to assign result something before it is returned; under the lookup code block
Stella Liu
@Stells93
Jan 03 2016 00:45
@Takumar that doesn't work for me. and I am
Jon Grant
@jong649
Jan 03 2016 00:45
@Stells93 I just figured it out; I was getting frustrated haha
Aleksander Gębicki
@Takumar
Jan 03 2016 00:45
@Stells93 result = lookup[val];
Rovshen Gurdov
@7urkm3n
Jan 03 2016 00:46
@Stells93 what assingment is that ?
Stella Liu
@Stells93
Jan 03 2016 00:47
@Takumar @jong649 @sludge256 okay it worked! I still don't get how I was supposed to figure that out based on what I was learning before. The waypoints before was focused on adding new properties to a javascript object... it was a big jump. Thank you!
CamperBot
@camperbot
Jan 03 2016 00:47
stells93 sends brownie points to @takumar and @jong649 and @sludge256 :sparkles: :thumbsup: :sparkles:
:warning: stells93 already gave sludge256 points
:star: 1462 | @takumar | http://www.freecodecamp.com/takumar
:star: 292 | @jong649 | http://www.freecodecamp.com/jong649
Shinigami Gökhan
@Bondygio
Jan 03 2016 00:48
@Lunapopo @sludge256 thank you! :)
CamperBot
@camperbot
Jan 03 2016 00:48
bondygio sends brownie points to @lunapopo and @sludge256 :sparkles: :thumbsup: :sparkles:
:warning: bondygio already gave lunapopo points
:star: 480 | @sludge256 | http://www.freecodecamp.com/sludge256
Stella Liu
@Stells93
Jan 03 2016 00:48
@7urkm3n it was Waypoint: Using Objects for Lookups
Jon Grant
@jong649
Jan 03 2016 00:48
@Stells93 This one was giving me trouble also; I was making it harder than necessary :)
Stella Liu
@Stells93
Jan 03 2016 00:49
@jong649 haha yeah! oh man. well I am going to go take a break now
Brian
@sludge256
Jan 03 2016 00:49
The continuity of the new content may have to be worked on
Hard for us that already know how to code to not be biased when working through it
Jon Grant
@jong649
Jan 03 2016 00:49
@Stells93 haha, too much code!!!!
Brian
@sludge256
Jan 03 2016 00:50
I know Caesar Cipher is being moved if it hasn't already
because it was too hard/ out of place
Derek Welton
@freefora11
Jan 03 2016 00:50

Can anyone explain to me the Bonfire: DNA Pairing(http://www.freecodecamp.com/challenges/bonfire-dna-pairing).

I don't understand how you pair("ATCGA") should return [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]].

Brian
@sludge256
Jan 03 2016 00:50
A pairs with T in it's own sub array T pairs with A in it's own sub array
so on and on
Stella Liu
@Stells93
Jan 03 2016 00:51
@sludge256 ah so you already know how to code?
Brian
@sludge256
Jan 03 2016 00:51
to some extent
Stella Liu
@Stells93
Jan 03 2016 00:51
@sludge256 from school or other online platforms? are you doing this program to be a full stack developer?
Brian
@sludge256
Jan 03 2016 00:53
Some from school. And yea I'm trying to extend my knowledge/ re solidify it
So you were able to understand the solution that was provided right?
Chris
@Aoxom
Jan 03 2016 00:53
i just started looking at the weather app zipline, and feel lost with the API / JSON stuff. got some heavy googling ahead of me
Alex
@wishe
Jan 03 2016 00:53
@freefora11 A is AT, T is TA, C is CG, G is GC
Brian
@sludge256
Jan 03 2016 00:54
Don't want you to push ahead without understanding it
Derek Welton
@freefora11
Jan 03 2016 00:54
@wishe but how?
Brian
@sludge256
Jan 03 2016 00:55
Biology :P
Alex
@wishe
Jan 03 2016 00:55
@freefora11 The way i did it was to split it to an array and loop it, then i just made some if statements and pushed the correct stuff into a new array!
Iyad ALTOUBAH
@Iyad87
Jan 03 2016 00:55
" <script $(document).ready(function()
{function});
    ></script>  "
Brian
@sludge256
Jan 03 2016 00:56
@Iyad87 close the first script before any code
Iyad ALTOUBAH
@Iyad87
Jan 03 2016 00:56
Create a script element making sure it is valid and has a closing tag.
Manish Giri
@Manish-Giri
Jan 03 2016 00:56
@Aoxom it’s actually one of the most easier ziplines, I felt! you need to get the location co-ordinates, rest is easy
Alexander Køpke
@alexanderkopke
Jan 03 2016 00:56
<script> $(document)etc etc </script>
Derek Welton
@freefora11
Jan 03 2016 00:56
@wishe not actually how to code it, I just don't undestand what they are asking for, like ATCGA, I don't understand the pattern if that makes sense
Iyad ALTOUBAH
@Iyad87
Jan 03 2016 00:57
i tried it dosent work
Chris
@Aoxom
Jan 03 2016 00:57
@Manish-Giri yeah i can see that there isnt too much to write, its just understanding the syntax for calling it and manipulating it
Alexander Køpke
@alexanderkopke
Jan 03 2016 00:57
post what you did
Alex
@wishe
Jan 03 2016 00:57
@freefora11 I just told you the pattern, The first letter coincides to the first letterr of the pairing
A = AT and T = TA
And so on
Moisés Man
@moigithub
Jan 03 2016 00:57
@Iyad87 inside <body> ... </body> ?
Alex
@wishe
Jan 03 2016 00:58
So GCA would be GC, CG, AT
Derek Welton
@freefora11
Jan 03 2016 00:59
@wishe with GCA, where is the AT coming from? I'm just confused lol
cause there is no T in that string
Alex
@wishe
Jan 03 2016 00:59
@freefora11 with GCA there is no AT
Iyad ALTOUBAH
@Iyad87
Jan 03 2016 00:59
? @moigithub
Brian
@sludge256
Jan 03 2016 00:59
The string they provide is the first letter of each pair @freefora11
each individual letter needs to be paired
the pairs are not provided
Alex
@wishe
Jan 03 2016 01:00
The test case they provide is GCA and that is GC CG AT
Brian
@sludge256
Jan 03 2016 01:00
It might be easier to think of it like this
1 goes A, 2 goes with B, 3 goes with C, etc
and they provided you with 123
Derek Welton
@freefora11
Jan 03 2016 01:02
@wishe your confusing me more, you first said "So GCA would be GC, CG, AT " then you said"with GCA there is no AT" then said"The test case they provide is GCA and that is GC CG AT" what do you mean there is no AT?
@sludge256 that makes a little more sense
Brian
@sludge256
Jan 03 2016 01:02
So you would get [[1,A],[2,B],[3,C]]
Alexander Køpke
@alexanderkopke
Jan 03 2016 01:03
<script>
$(document).ready(function(){

});
</script>
@Iyad87 this is how I did it
Alex
@wishe
Jan 03 2016 01:04
sorry @freefora11 i wasnt clear!
msaminsky
@msaminsky
Jan 03 2016 01:05
@Stells93 @sludge256 Haha just signed into the chat room to get help with this, glad I scrolled up :)
Derek Welton
@freefora11
Jan 03 2016 01:05
@sludge256 and A,B,C what are those representing? cause I understand that with each array, the first element is the next character in the string, but the 2nd element in that array is unclear
Brian
@sludge256
Jan 03 2016 01:06
@msaminsky You get to see us struggle with trying to make simple understandable explanations :+1:
baphomet
@Baphomet-DCLXVI
Jan 03 2016 01:09
I don't understand global variables. As in the concept, not the assignment.
Derek Welton
@freefora11
Jan 03 2016 01:10
@Baphomet-DCLXVI global variables can be used in any part of your script
@Baphomet-DCLXVI while local variables can only be used in their scrope meaning between{ }
baphomet
@Baphomet-DCLXVI
Jan 03 2016 01:11
It doesn't mean live page?
Derek Welton
@freefora11
Jan 03 2016 01:11
@Baphomet-DCLXVI what do you mean live page?
baphomet
@Baphomet-DCLXVI
Jan 03 2016 01:11
@freefora11 Got it thanks
CamperBot
@camperbot
Jan 03 2016 01:11
baphomet-dclxvi sends brownie points to @freefora11 :sparkles: :thumbsup: :sparkles:
:star: 212 | @freefora11 | http://www.freecodecamp.com/freefora11
Derek Welton
@freefora11
Jan 03 2016 01:11
no problem
@Baphomet-DCLXVI tried to avoid global variables at all cost
baphomet
@Baphomet-DCLXVI
Jan 03 2016 01:12
Why is that?
msaminsky
@msaminsky
Jan 03 2016 01:12
@sludge256 @Stells93 thanks!
CamperBot
@camperbot
Jan 03 2016 01:12
msaminsky sends brownie points to @sludge256 and @stells93 :sparkles: :thumbsup: :sparkles:
:star: 481 | @sludge256 | http://www.freecodecamp.com/sludge256
:star: 217 | @stells93 | http://www.freecodecamp.com/stells93
Alex
@wishe
Jan 03 2016 01:13
@freefora11 Im sorry i was unclear before, each letter represents the first letter in each pairing and the pairings are AT, GC but they can also be the other way like TA, CG!
Brian
@sludge256
Jan 03 2016 01:14
In bigger programs you might be unaware that a global variable with a certain name is already used
and might accidently change it or use it in a function
When you shouldn't have which can cause problems that you may not be aware of right away
Derek Welton
@freefora11
Jan 03 2016 01:15
@wishe so it doesn't matter which character you pair your first element with?
Brian
@sludge256
Jan 03 2016 01:16
Also global variables won't be reset if used in function calls unless you explicitly reset it
Alex
@wishe
Jan 03 2016 01:16
@freefora11 I am not sure what you mean, you pass in GCA and you should get back GC , CG, AT .. If you passed in TAC you should get back TA, AT, CG!
Brian
@sludge256
Jan 03 2016 01:17
I think it's confusing him because of the GC in GCA
Alex
@wishe
Jan 03 2016 01:17
Yea that threw me to the first time i looked at it
Derek Welton
@freefora11
Jan 03 2016 01:21
@wishe is that wiki page they give us explain it? Cause with your example of "TAC" you said TA, AT, and CG, but how did you get CG? Where is the "G" coming from with the string "TAC"?
Maybe I should call it a night and try and understand it tomorrow? haha
jimtr0n
@jimtr0n
Jan 03 2016 01:21
Hi: I'm brand new to FCC and Gitter (and JQuery). I'm doing JQuery exercise, and can't figure out why this won't pass test (http://www.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors). Here's my script:
<script> $(document).ready(function() { $("button").addClass ("animated"); $(".btn").addClass ("shake"); $("#target1").addClass("btn-primary"); }); </script>
..and the part I got wrong is: "Only add one class with each of your three selectors." Don't I only have one class for each selector?
Brian
@sludge256
Jan 03 2016 01:22
@freefora11 The CG is coming from the C in TAC
None of the letters they give you in the input are paired yet
It's up to you to pair them
Derek Welton
@freefora11
Jan 03 2016 01:23
@sludge256 but why is it "G"? why can't it be "B", "R", etc?
Brian
@sludge256
Jan 03 2016 01:23
Instead of seeing it as TAC look at it as [T,?],[A,?],[C,?]
It's how DNA pairing is
it's those letters specifically
Stella Liu
@Stells93
Jan 03 2016 01:24
@sludge256 yes I did! I do get it now.
Brian
@sludge256
Jan 03 2016 01:24
@Stells93 :+1:
Derek Welton
@freefora11
Jan 03 2016 01:24
@sludge256 so I need to read up on DNA pairing
Brian
@sludge256
Jan 03 2016 01:25
not necessarily since they already provide you with the required letters to pair
Base pairs are a pair of AT and CG. Match the missing element to the provided character.
If you click on Base Pairs in the instructions it takes you to wikipedia
if you want to read more on it
Derek Welton
@freefora11
Jan 03 2016 01:26
@sludge256 I think I understand what to do but I don't understand why its like that haha, thanks for your patience
CamperBot
@camperbot
Jan 03 2016 01:26
freefora11 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 482 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Jan 03 2016 01:27
The Biology lesson is a bit out of the scope of this site :P
atjeff
@atjeff
Jan 03 2016 01:27
Hey guys, I just did caesers cypher and portfolio
but I think the cypher was placed in the wrong spot when it came out
Derek Welton
@freefora11
Jan 03 2016 01:27
@sludge256 I know right? haha
atjeff
@atjeff
Jan 03 2016 01:27
so now i've done two bonfires but havn't finished the waypoints before it
should i go back to the waypoints or was it intended ?
Derek Welton
@freefora11
Jan 03 2016 01:29
@atjeff I would recommend doing all the waypoints in order with the bonfires and ziplines, even if you know this stuff, you will always learn more and it takes very little time to get through the waypoints if you know your stuff
Kevin
@ruizkevin1993
Jan 03 2016 01:30
If you're talking about the new waypoints that were just added, I'm pretty sure we have to go back and do them, otherwise, I doubt we'll be able to receive front-end cert.
Yugant Joshi
@yugantjoshi
Jan 03 2016 01:31
Is it okay if i put up my ziplines (done on codepen) on Github?
Brian
@sludge256
Jan 03 2016 01:31
Waypoints are optional towards certification but they do introduce useful concepts
@yugantjoshi I don't see the harm :+1:
Kevin
@ruizkevin1993
Jan 03 2016 01:31
@sludge256 Didn't know that. Thanks.
CamperBot
@camperbot
Jan 03 2016 01:31
ruizkevin1993 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 483 | @sludge256 | http://www.freecodecamp.com/sludge256
Yugant Joshi
@yugantjoshi
Jan 03 2016 01:32
@sludge256 do people normally do this?
Derek Welton
@freefora11
Jan 03 2016 01:37
@yugantjoshi like @sludge256 said, there is no harm, I myself haven't used github much so I don't put them on there, if people here on FCC want to see my projects, they can always just look at my profile
Yugant Joshi
@yugantjoshi
Jan 03 2016 01:38
@freefora11 @sludge256 thanks
CamperBot
@camperbot
Jan 03 2016 01:38
yugantjoshi sends brownie points to @freefora11 and @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 213 | @freefora11 | http://www.freecodecamp.com/freefora11
:star: 484 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Jan 03 2016 01:39
@yugantjoshi I believe some people do just to save their solutions
Some people also host their personal websites through Github pages
Kevin
@ruizkevin1993
Jan 03 2016 01:42
So I'm trying to use dot notation to get the value of hat and string but I'm getting an error for them not being defined. Any thoughts?
// Setup
var testObj = {
  "hat": "ballcap",
  "shirt": "jersey",
  "shoes": "cleats"
};

// Only change code below this line

 testObj.hat;      // Change this line
 testObj.shirt;    // Change this line
Oh novermind
nevermind.
I figured what I was doing wrong
dabmen87
@dabmen87
Jan 03 2016 01:45
@ruizkevin1993 what were you doing wrong?
Kenston
@kdrye72
Jan 03 2016 01:46

"Responsive design with bootstrap" #28 {Challenge: one h4 element should have the text #left-well.} & {One h4 element should have the text #right-well.}

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4 text="right-well"></h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4 text="left-well"></h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>

Cant seem to find my error, need another set of eye PLEASE

Brian
@sludge256
Jan 03 2016 01:47
@dabmen87 He got rid of the assignments to the test variables
Kevin
@ruizkevin1993
Jan 03 2016 01:48

The original code was

var hatValue = testObj;
var shirtValue = testObj;

The way point wanted me to make hatValue = testObj.hat and I just got too ahead of myself and deleted it.

Brian
@sludge256
Jan 03 2016 01:48
@kdrye72 don;t forget the # in the text
@ruizkevin1993 Someone made the same mistake earlier today. I think due to the instructions
or the example
Kevin
@ruizkevin1993
Jan 03 2016 01:50
Yeah. I saw the example has it as my first picture and I just retyped it as so, not realizing I was supposed to assign a value
Kenston
@kdrye72
Jan 03 2016 01:50
@sludge256 thanks added (#) still didnt take care of issue.
CamperBot
@camperbot
Jan 03 2016 01:50
kdrye72 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 485 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Jan 03 2016 01:52
@kdrye72 Oh instead of text =
just put the text nested in the h4 tags
Corey
@coreyjuliandavis
Jan 03 2016 01:52
@kdrye72 drop ‘text=‘ and put the text in between the declaration & closing of h4
KoToZ
@Mohamedtareque
Jan 03 2016 02:05
problem 77 in JS >>> i can't understand what he want !
Stoner19
@Stoner19
Jan 03 2016 02:06
@Mohamedtareque what is the title of the waypoint?
KoToZ
@Mohamedtareque
Jan 03 2016 02:06
Counting Cards [77]
Stoner19
@Stoner19
Jan 03 2016 02:06
oh, I just looked at my progress. I'm not quite that far yet.
Kenston
@kdrye72
Jan 03 2016 02:07
@sludge256 @coreyjuliandavis thanks
Johnathan Brown
@Legend28469
Jan 03 2016 02:09
Hello all. How exactly would you use Regex to do the Bonfire Convert HTML Entities? I know I can complete using switch but I can’t figure out how to do it with Regex
Alex
@alex9jk
Jan 03 2016 02:09
these are the instructions: Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr. This is my attempt: var myStr = \ \t \t \r \n; Anyone know whats wrong with my code?
Kevin
@ruizkevin1993
Jan 03 2016 02:10
Put them as a string I believe
No it was commas
they need commas
asialea
@asialea
Jan 03 2016 02:12
can someone please help with Checkpoint: Word Blanks under javascript, i don't understand what they're asking
Mark Lawrence
@ninja-ml
Jan 03 2016 02:12
can anyone tell me whats wrong with this code for Waypoint: Using Objects for Lookups?
Stoner19
@Stoner19
Jan 03 2016 02:12
@asialea they're asking you to construct a series of strings to make a story
Mark Lawrence
@ninja-ml
Jan 03 2016 02:13
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
phoneticLookup("charlie");
Stoner19
@Stoner19
Jan 03 2016 02:13
you combine your words along with your variables using +
asialea
@asialea
Jan 03 2016 02:13
oh ok ill try that thanks
Stoner19
@Stoner19
Jan 03 2016 02:13
each variable is defined already in (wordBlanks)
@asialea start by making your own variable. That was the step I was missing. var myStory =
Jon Grant
@jong649
Jan 03 2016 02:15
Hey guys, I'm confused at why my code isn't working for this waypoint.
var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1993,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }
   ];
[
  {
     "artist": "Jimi Hendrix",
     "title": "Are You Experienced?",
     "release_year": 1968,
     "formats": [
       "CS",
       "8T",
       "LP" ],
     "gold":true
  }
];
Waypoint: Introducing JavaScript Object Notation JSON
Waypoint: Introducing JavaScript Object Notation JSON
asialea
@asialea
Jan 03 2016 02:16
I thought I understood but I'm completely lost
haha
Kenston
@kdrye72
Jan 03 2016 02:16
this is what I have at this point
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4 #left-well></h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4 #right-well></h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>
Kevin
@ruizkevin1993
Jan 03 2016 02:18
@ninja-ml Have you figured it out yet? I'm stuck on the same problem.
Jon Grant
@jong649
Jan 03 2016 02:19
@ninja-ml you have to assign result before returning it
Stella Liu
@Stells93
Jan 03 2016 02:20
@jong649 ah I just passed that one. It is a small change, but remember when you separate the rows, you need to add a comma? Same thing for the nested arrays
Stoner19
@Stoner19
Jan 03 2016 02:20
@asialea start with making a var. use the var name result. var result = ignore my statement about making a var titled myStory
Jon Grant
@jong649
Jan 03 2016 02:20
@ninja-ml oh sorry, I mean your code block labeled result should be lookup, then you assign result to something related to lookup
Stella Liu
@Stells93
Jan 03 2016 02:20
@ninja-ml ah I was just stuck on that problem
Jon Grant
@jong649
Jan 03 2016 02:20
@Stells93 Hmmm, I thought I did that
Stella Liu
@Stells93
Jan 03 2016 02:21
@jong649 ah you put a semi-colon instead of a colon ,
asialea
@asialea
Jan 03 2016 02:21
ok i did that
Jon Grant
@jong649
Jan 03 2016 02:21
@Stells93 really? I can't see where
@asialea the little code sample kinda gives you a hint, the alpha2 one
@asialea alpha [ 2 ]
Stella Liu
@Stells93
Jan 03 2016 02:22
@jong649 you also do not need the square brackets in between
dabmen87
@dabmen87
Jan 03 2016 02:22
@sludge256 ok thanks
CamperBot
@camperbot
Jan 03 2016 02:22
dabmen87 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 486 | @sludge256 | http://www.freecodecamp.com/sludge256
Stella Liu
@Stells93
Jan 03 2016 02:22
@jong649 the square brackets hold the entire thing so you should only have two
Stoner19
@Stoner19
Jan 03 2016 02:23
@asialea then create a combination of strings and the defined variables already stated by the waypoint by concatenating them like this: "The Beginning of my story " +myNoun+ " second part of my story " +myAdjective+ " third " +myVerb+ " last part" +myAdverb;
Stella Liu
@Stells93
Jan 03 2016 02:23
@jong649 your albums are separated by curly brackets. then remember to separate them with commas.
Jon Grant
@jong649
Jan 03 2016 02:24
@Stells93 OOOhhhhhhh! Wow, thanks
CamperBot
@camperbot
Jan 03 2016 02:24
jong649 sends brownie points to @stells93 :sparkles: :thumbsup: :sparkles:
:star: 222 | @stells93 | http://www.freecodecamp.com/stells93
Stella Liu
@Stells93
Jan 03 2016 02:24
@jong649 you're welcome :)
asialea
@asialea
Jan 03 2016 02:24
where does the var result come into play
Stoner19
@Stoner19
Jan 03 2016 02:25
that is just the name of your var
Kevin
@ruizkevin1993
Jan 03 2016 02:25
@ninja-ml Hey. Did you ever figure it out? If not, I can help. I just finished it.
Jon Grant
@jong649
Jan 03 2016 02:25
@asialea should be result = lookup....
Stoner19
@Stoner19
Jan 03 2016 02:25
return is going to output your var, which is titled result
Jon Grant
@jong649
Jan 03 2016 02:25
@asialea the square bracket is the key
Stella Liu
@Stells93
Jan 03 2016 02:25
@ninja-ml okay so at the end, when you return result, you need to set result equal to the table of data you used for var lookup
Mark Lawrence
@ninja-ml
Jan 03 2016 02:26
@Stells93 @ruizkevin1993 @jong649 thanks everyone... I finally got it
CamperBot
@camperbot
Jan 03 2016 02:26
ninja-ml sends brownie points to @stells93 and @ruizkevin1993 and @jong649 :sparkles: :thumbsup: :sparkles:
:star: 295 | @jong649 | http://www.freecodecamp.com/jong649
:star: 258 | @ruizkevin1993 | http://www.freecodecamp.com/ruizkevin1993
:star: 223 | @stells93 | http://www.freecodecamp.com/stells93
Jon Grant
@jong649
Jan 03 2016 02:26
@ninja-ml Awesome! I was stuck on that one also for a while
Stella Liu
@Stells93
Jan 03 2016 02:27
@ninja-ml yeah same here haha four people had to explain it to me
Mark Lawrence
@ninja-ml
Jan 03 2016 02:27
most of them I understand but I could figure it out
Stella Liu
@Stells93
Jan 03 2016 02:28
can anyone shed light to my code for the record collection? everything passed but one and I am not sure what is wrong
Stoner19
@Stoner19
Jan 03 2016 02:28
@asialea that one was very confusing to me as well, but after doing it and redoing it a few times it makes much more sense.
Mark Lawrence
@ninja-ml
Jan 03 2016 02:28
  • but I couldn't figure that one out
Stella Liu
@Stells93
Jan 03 2016 02:28
// 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].tracks.push(value);
 } else if (value === "") {
   delete collection[id][prop];
 } 
  return collection;
}

// Alter values below to test your code
update(5439, "artist", "ABBA");
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:29
The first else if
Stella Liu
@Stells93
Jan 03 2016 02:29
everything passed but After update(1245, "tracks", "Addicted to Love"), tracks should have a length of 1 :/
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:29
I have the same problem :<
Stella Liu
@Stells93
Jan 03 2016 02:29
@NiallSzalkai what do you mean the first else if?
dabmen87
@dabmen87
Jan 03 2016 02:30
i need to set the font size to 16 on both <p> tags, but I dont know how to add it to the first one that has a
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:30
The first else if is fine, my bad
asialea
@asialea
Jan 03 2016 02:30
@jong649 where am i putting a square bracket?
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:31
@Stells93 I have no idea how to complete this one >.<
Stella Liu
@Stells93
Jan 03 2016 02:31
someone help @NiallSzalkai and me?? :sparkles:
Stoner19
@Stoner19
Jan 03 2016 02:31
@asialea you shouldn't be doing any square brackets on that waypoint.
@asialea did you see my comment a few minutes ago? start with this:
    // Your code below this line
  var result = "write something here " +myNoun+ " and here " +myAdjective+ " here too " +myVerb+ " finally here last " +myAdverb;  

    // Your code above this line
Derek Welton
@freefora11
Jan 03 2016 02:34
I'm trying to add values to my multidimensional array but getting an error : TypeError: arr2[i] is undefined
function pair(str) {
  var arr = str.split("");
  console.log(arr);
  var arr2 = [[]];

  for(var i = 0; i < arr.length;i++){
      if(arr[i] == "G"){
          arr2[i][0]="G";
          arr2[i][1]="C";
      }
      if(arr[i] == "C"){
          arr2[i][0]="C";
          arr2[i][1]="G";
      }
      if(arr[i] == "A"){
          arr2[i][0]="A";
          arr2[i][1]="T";
      }
      if(arr[i] == "T"){
          arr2[i][0]="T";
          arr2[i][1]="A";
      }
  }

  console.log(arr2);



  return str;
}

pair("GCG");
asialea
@asialea
Jan 03 2016 02:35
yes i did that but var result is already defined in the line above that
Manish Giri
@Manish-Giri
Jan 03 2016 02:35
@Stells93 Here, try and go through this code and understand the logic! It might help-
function update(id, prop, value) {

    if(value !== "") {
      if(prop === "tracks") {
          (collection[id].tracks).push(value);
         //collection[id][prop].push(value);
      }
      else {
        collection[id][prop] = value;
      }

    }

    else if(value === ""){
      delete collection[id][prop];
    }


  return collection;
}
asialea
@asialea
Jan 03 2016 02:35
it says var result = ""
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:39
@Manish-Giri Tried it but still getting the same result :/
Manish Giri
@Manish-Giri
Jan 03 2016 02:40
@NiallSzalkai can you paste the url to your waypoint
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:42
http://www.freecodecamp.com/challenges/checkpoint-record-collection#?solution=%2F%2F%20Setup%0Avar%20collection%20%3D%20%7B%0A%20%20%20%202548%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22Slippery%20When%20Wet%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Bon%20Jovi%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%22Let%20It%20Rock%22%2C%20%0A%20%20%20%20%20%20%20%20%22You%20Give%20Love%20a%20Bad%20Name%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%202468%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%221999%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Prince%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%221999%22%2C%20%0A%20%20%20%20%20%20%20%20%22Little%20Red%20Corvette%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%201245%3A%20%7B%0A%20%20%20%20%20%20artist%3A%20%22Robert%20Palmer%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%205439%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22ABBA%20Gold%22%0A%20%20%20%20%7D%0A%7D%3B%0A%2F%2F%20Keep%20a%20copy%20of%20the%20collection%20for%20tests%0Avar%20collectionCopy%20%3D%20JSON.parse(JSON.stringify(collection))%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afunction%20update(id%2C%20prop%2C%20value)%20%7B%0A%20%20if%20(value%20%3D%3D%3D%20%22%22)%20%7B%0A%20%20%20%20delete%20collection%5Bid%5D%5Bprop%5D%3B%0A%20%20%7D%0A%20%20else%20if%20(value%20%3D%3D%3D%20%22tracks%22)%20%7B%0A%20%20%20%20(collection%5Bid%5D.tracks).push(value)%3B%0A%20%20%7D%0A%20%20else%20%7B%0A%20%20%20%20collection%5Bid%5D%5Bprop%5D%20%3D%20value%3B%0A%20%20%7D%0A%20%20%0A%20%20console.log(collection%5B1245%5D)%3B%0A%20%20return%20collection%3B%0A%7D%0A%0A%2F%2F%20Alter%20values%20below%20to%20test%20your%20code%0Aupdate(5439%2C%20%22artist%22%2C%20%22ABBA%22)%3B%0A%0A
wrong url :p
Manish Giri
@Manish-Giri
Jan 03 2016 02:43
@NiallSzalkai I hit “run tests” and all the tests passed for me.
@NiallSzalkai try and hit “reset” and then put in my code from above, it should work
Mark Lawrence
@ninja-ml
Jan 03 2016 02:48
for Waypoint: Testing Objects for Properties why won't this pass for Not Found?
Niall Szalkai
@NiallSzalkai
Jan 03 2016 02:48
@Manish-Giri worked perfectly now, thank you :)
CamperBot
@camperbot
Jan 03 2016 02:48
niallszalkai sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 556 | @manish-giri | http://www.freecodecamp.com/manish-giri
Mark Lawrence
@ninja-ml
Jan 03 2016 02:48
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  (myObj.hasOwnProperty(myObj[checkProp]));
   if (true) {
     return myObj[checkProp];
   } else {
     return "Not Found";
   }
}

// Test your code by modifying these values
checkObj("gift");
sparkleefitgirl
@sparkleefitgirl
Jan 03 2016 02:48
This message was deleted
Dsands78
@Dsands78
Jan 03 2016 02:48
Hey guys I am having an issue with the set the ID of an element part
the code i have is <form id="cat-photo-app">
<form action= "/submit-cat-photo">
Pawan
@pawan92
Jan 03 2016 02:51
@Dsands78 whats your problem
Mark Lawrence
@ninja-ml
Jan 03 2016 02:51
@Dsands78 try <form id = "cat-photo-form"action="/submit-cat-photo">
Dsands78
@Dsands78
Jan 03 2016 02:51
@ninja-ml thank you so much
CamperBot
@camperbot
Jan 03 2016 02:51
dsands78 sends brownie points to @ninja-ml :sparkles: :thumbsup: :sparkles:
:star: 265 | @ninja-ml | http://www.freecodecamp.com/ninja-ml
Jon Grant
@jong649
Jan 03 2016 02:55
Hey guys, I solved this one, but am not really sure why it worked haha
Waypoint: Accessing Nested Arrays in JSON
Waypoint: Accessing Nested Arrays in JSON
Waypoint: Accessing Nested Arrays in JSON
haha apparently you can't link them now with just the title?
Stella Liu
@Stells93
Jan 03 2016 02:59
@Manish-Giri thank you for sharing your code! I am a bit confused on why this one works, but my code doesn't. seems the same logically but mine has more lines
CamperBot
@camperbot
Jan 03 2016 02:59
stells93 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 557 | @manish-giri | http://www.freecodecamp.com/manish-giri
Jason C.
@jayman3838
Jan 03 2016 02:59
lastNameLength = "lastName";
lastNameLength .length;
what am i doing wrong
Stella Liu
@Stells93
Jan 03 2016 02:59
@NiallSzalkai did you get the logic behind her code?
@jayman3838 you put a space in there
@jayman3838 when you don't need one
Jason C.
@jayman3838
Jan 03 2016 03:00
@Stells93
lastNameLength = "lastName";
lastNameLength.length;
didnt fix
Stella Liu
@Stells93
Jan 03 2016 03:00
can I get the directions for this? what waypoint challenge is it?
@jayman3838
Manish Giri
@Manish-Giri
Jan 03 2016 03:01
@Stells93 I'll explain the logic for my code in a few minutes, driving home
Jason C.
@jayman3838
Jan 03 2016 03:01
Waypoint: Find the Length of a String @Stells93
instructions
Use the .length property to count the number of characters in the lastName variable and assign it to lastNameLength.
Muhammad Mamun Hossain
@mamun2015
Jan 03 2016 03:02

im still stuck with Waypoint: Using Objects for Lookups

```// Setup
function phoneticLookup(val) {
var result = "";

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

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

// Change this value to test
phoneticLookup ("charlie");

Jason C.
@jayman3838
Jan 03 2016 03:04
@Stells93 stilll there?
Stella Liu
@Stells93
Jan 03 2016 03:05
@jayman3838 got it! a hint here, it is supposed to be only one line. Assigning the variable means that the variable must = to the variable that you want it to equal
Colton Ehrman
@coltonehrman
Jan 03 2016 03:05
need help with Zipline: Build a Random Quote Machine how can i impliment the tweet feature?
Stella Liu
@Stells93
Jan 03 2016 03:05
so lastNameLength = ........
@jayman3838
Jason C.
@jayman3838
Jan 03 2016 03:06
@Stells93 not picking up
Alex
@wishe
Jan 03 2016 03:06
@coltonehrman Look at this https://dev.twitter.com/web/tweet-button
Jason C.
@jayman3838
Jan 03 2016 03:06
so do i get rid of the first line that i had
Colton Ehrman
@coltonehrman
Jan 03 2016 03:06
thanks @wishe
CamperBot
@camperbot
Jan 03 2016 03:06
coltonehrman sends brownie points to @wishe :sparkles: :thumbsup: :sparkles:
:star: 361 | @wishe | http://www.freecodecamp.com/wishe
TaressaH
@TaressaH
Jan 03 2016 03:06
Hi need help on making images mobile responsive: bootstrap
Stella Liu
@Stells93
Jan 03 2016 03:07
@jayman3838 lastNameLength = ...... (type in how you can find the length of a string)
TaressaH
@TaressaH
Jan 03 2016 03:07
total of 2 images and classes
Stella Liu
@Stells93
Jan 03 2016 03:07
@jayman3838 you need to combine the two lines. take out "lastName"
Alex
@wishe
Jan 03 2016 03:07
@TaressaH add class="img-responsive" to the images
Jason C.
@jayman3838
Jan 03 2016 03:08
lastNameLength = "lastNameLength".length;
@Stells93
?
TaressaH
@TaressaH
Jan 03 2016 03:08
where in the code?
Stella Liu
@Stells93
Jan 03 2016 03:08
@jayman3838 close you don't need the "" around lastNameLength
Alex
@wishe
Jan 03 2016 03:08
on the img tag
Maor Levy
@Atixx
Jan 03 2016 03:08
thanks @wishe was about to ask the same!
CamperBot
@camperbot
Jan 03 2016 03:08
atixx sends brownie points to @wishe :sparkles: :thumbsup: :sparkles:
:star: 362 | @wishe | http://www.freecodecamp.com/wishe
TaressaH
@TaressaH
Jan 03 2016 03:09
give me an example please
I need new image below the old one and have img-responsive class
Jason C.
@jayman3838
Jan 03 2016 03:09
lastNameLength = lastNameLength.length;
@Stells93 i feel like this is right but its saying its wrong. im sad
TaressaH
@TaressaH
Jan 03 2016 03:09
plus-running cats
http tag
Alex
@wishe
Jan 03 2016 03:09
<img class="img-responsive" src="image.jpg" alt="this is an image">
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:10
wassup guys gm everyone
Stella Liu
@Stells93
Jan 03 2016 03:10
@jayman3838 oh you're super close. take out the length
@jayman3838 lastNameLength = lastName.length;
@jayman3838 does this make sense though, like the logic?
if you do lastNameLength = lastNameLength.length; you will count lastNameLength not lastName
@Manish-Giri thank you!
CamperBot
@camperbot
Jan 03 2016 03:11
stells93 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: stells93 already gave manish-giri points
Jason C.
@jayman3838
Jan 03 2016 03:11
oh i got it thank you so much @Stells93 will probably need help on the next one too lol
CamperBot
@camperbot
Jan 03 2016 03:11
jayman3838 sends brownie points to @stells93 :sparkles: :thumbsup: :sparkles:
:star: 225 | @stells93 | http://www.freecodecamp.com/stells93
Stella Liu
@Stells93
Jan 03 2016 03:12
@jayman3838 you're welcome! I would try to understand the logic though otherwise the challenges ahead will get more and more complicated
TaressaH
@TaressaH
Jan 03 2016 03:12
ok that helped a bit but I still need:
our new image should be below your old one and have the class img-responsive.
Your new image should not have the class smaller-image.
Your new image should have a src of http://bit.ly/fcc-running-cats.
Jason C.
@jayman3838
Jan 03 2016 03:12
yeah i try but with this javascript it is really hard for me @Stells93
Stella Liu
@Stells93
Jan 03 2016 03:13
@jayman3838 yeah, it is tough but you got this! It was hard for me at first too. I combined lessons from Khan academy and Codeacademy before this and it helped
Colton Ehrman
@coltonehrman
Jan 03 2016 03:14
@wishe how do i dynamically change the text that the tweet share button uses?
c.fairbrother
@colleen612
Jan 03 2016 03:14
Just logged back on to notice some updates in JS. one of which is about the remainder operator. I'm not so sure what they're asking of me. Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.
Stella Liu
@Stells93
Jan 03 2016 03:14
@jayman3838 I would recommend catching some youtube videos too. and just make sure that you understand the logic. It's like math.. if you speed ahead and not really understand addition, you can't really multiply multiple integers
c.fairbrother
@colleen612
Jan 03 2016 03:14
what exactly are they asking here?
Jason C.
@jayman3838
Jan 03 2016 03:14
this is my first experience coding so i just keep trying and looking back at the last one i finished until i understand @Stells93
Stella Liu
@Stells93
Jan 03 2016 03:15
@jayman3838 sounds good! Good luck :) This chat is really helpful for answering questions
Maor Levy
@Atixx
Jan 03 2016 03:15
@colleen612 exactly what you typed, set the variable to the remainder of the division
Alex
@wishe
Jan 03 2016 03:15
@coltonehrman the same way you output it to your page. Append it to the share url
TaressaH
@TaressaH
Jan 03 2016 03:15
Hey still here
Maor Levy
@Atixx
Jan 03 2016 03:15
@colleen612 using the % operator
Colton Ehrman
@coltonehrman
Jan 03 2016 03:15
it doesnt work @wishe
c.fairbrother
@colleen612
Jan 03 2016 03:15
thank you, I'll give it a go :)
TaressaH
@TaressaH
Jan 03 2016 03:16
new image should be below old one img-responsive class
new image should not have class smaller-image
dabmen87
@dabmen87
Jan 03 2016 03:18
blob
blob
Jason C.
@jayman3838
Jan 03 2016 03:19

// Setup
var myStr = "Jello World";

// Only change code below this line

myStr0 = "J"; // Fix Me

wouldnt this be right?
Angela
@kbmom5
Jan 03 2016 03:21
@jayman3838 you change the whole string to "Hello World"
dabmen87
@dabmen87
Jan 03 2016 03:21
blob
how can i downgrade the <h2> font when lobster is not available to monospace? they suggest me to add a comment to the very first link...any thoughts?
Angela
@kbmom5
Jan 03 2016 03:21
@jayman3838 and remove the 0 from MyStr
Jason C.
@jayman3838
Jan 03 2016 03:21
@kbmom5 so creat a new line that says myStr = "Hello World"
Angela
@kbmom5
Jan 03 2016 03:22
just edit that line
Maor Levy
@Atixx
Jan 03 2016 03:22
@dabmen87 try changing the font family in css, remember how you downgrade when a font is not available
Jason C.
@jayman3838
Jan 03 2016 03:22
@kbmom5 thanks
Angela
@kbmom5
Jan 03 2016 03:22
Ugh, does every JavaScript tutorial have to have a MadLibs game?!!!
CamperBot
@camperbot
Jan 03 2016 03:22
jayman3838 sends brownie points to @kbmom5 :sparkles: :thumbsup: :sparkles:
dlbonanno64
@dlbonanno64
Jan 03 2016 03:22

New to the forum and learning HTML and CSS. Working on the beginning waypoints. Waypoint: Use a CSS Class to Style an Element... is this correct?<style>

h2.red-text {

color: red;

}

</style>

CamperBot
@camperbot
Jan 03 2016 03:22
:star: 164 | @kbmom5 | http://www.freecodecamp.com/kbmom5
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:23
@dlbonanno64 dont add h2
DJ
@qualitymanifest
Jan 03 2016 03:23
@kbmom5 that just got introduced. you can skip it if you don't feel like you'll learn anything from it
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:23
its proper but fcc requirement is different @dlbonanno64
dabmen87
@dabmen87
Jan 03 2016 03:23
@Atixx do you know any way to do it by adding a comment to the first link from google?
dlbonanno64
@dlbonanno64
Jan 03 2016 03:23
Took the h2 out, but it still does not tell me I am correct.
Angela
@kbmom5
Jan 03 2016 03:23
no, I can't get it. I have taken several tutorials on JavaScript. I'm just banging my head on a cement wall @dabmen87
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:24
wats happening @dlbonanno64
Angela
@kbmom5
Jan 03 2016 03:24
sorry @qualitymanifest
Maor Levy
@Atixx
Jan 03 2016 03:24
@dabmen87 youcan add // at the start, but it's not about not having it, its about having monospace as an option when lobster is not available
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:24
post ur code within backticks @dlbonanno64
its not working
DJ
@qualitymanifest
Jan 03 2016 03:24
@kbmom5 what are you having trouble with? are there certain failing tests or are you just not sure where to start?
Muhammad Mamun Hossain
@mamun2015
Jan 03 2016 03:25
// Setup
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
phoneticLookup ("charlie");
i can not understand why its not passing ...
Maor Levy
@Atixx
Jan 03 2016 03:25
@dabmen87 what exercise is it?
Angela
@kbmom5
Jan 03 2016 03:25
@qualitymanifest I have the function given to me. I need to run it, I guess, to make a new string. The call is there already, with the new parameters.
Colton Ehrman
@coltonehrman
Jan 03 2016 03:25
@mamun2015 u need to return a certain value inside lookup not the whole object
Drew
@andrewp89
Jan 03 2016 03:26
I need help with Waypoint: Reverse Arrays with reverse
dlbonanno64
@dlbonanno64
Jan 03 2016 03:26
@pranavdoshi Took the h2 out, but it still does not tell me I am correct.
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:26
post the entire code @dlbonanno64
Angela
@kbmom5
Jan 03 2016 03:26
@qualitymanifest do I post a screenshot or how can I post my assignment?
Drew
@andrewp89
Jan 03 2016 03:26

var array = [1,2,3,4,5,6,7];

var newArray = array.reverse(function(){

});

Colton Ehrman
@coltonehrman
Jan 03 2016 03:26
@andrew var arr = string.split(' ') and arr.reverse()
Angela
@kbmom5
Jan 03 2016 03:26

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

// Your code above this line

return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

DJ
@qualitymanifest
Jan 03 2016 03:26
@kbmom5 yeah, the idea is to use the parameters in a sentence. "word word" + parameter + "more words" + other parameter etc
Drew
@andrewp89
Jan 03 2016 03:26
thats my code and its reversing it in the test
but its saying I need to use the reverse function
Colton Ehrman
@coltonehrman
Jan 03 2016 03:27
oh sorry
dlbonanno64
@dlbonanno64
Jan 03 2016 03:27

<head>
<style>

.red-text {

color: red;

}

</style>

</head>

<h2>CatPhotoApp</h2>

<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>

Colton Ehrman
@coltonehrman
Jan 03 2016 03:27
ur using reverse wrong
no callback
just array.reverse()
Drew
@andrewp89
Jan 03 2016 03:27
call back is in the ( ) ? and then I return that?
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:28
@dlbonanno64 u havent given class red-text to html element how will the style be applied
Colton Ehrman
@coltonehrman
Jan 03 2016 03:28
@andrewp89 there is not callback
its just .reverse()
Jason C.
@jayman3838
Jan 03 2016 03:29
can anybody help me with Checkpoint: Word Blanks because im not good at making stuff from scratch
Angela
@kbmom5
Jan 03 2016 03:29
@jayman3838 I'm on that too!!!
DJ
@qualitymanifest
Jan 03 2016 03:29
@kbmom5 did you catch what i said above
Jason C.
@jayman3838
Jan 03 2016 03:29
@kbmom5 oh lol
dlbonanno64
@dlbonanno64
Jan 03 2016 03:29
@pranavdoshi how do I identify that?
Drew
@andrewp89
Jan 03 2016 03:29
oh thank you @coltonhrman champion !
CamperBot
@camperbot
Jan 03 2016 03:29
andrewp89 sends brownie points to @coltonhrman :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for coltonhrman
Colton Ehrman
@coltonehrman
Jan 03 2016 03:29
np
Angela
@kbmom5
Jan 03 2016 03:29
@qualitymanifest was trying to help me
@qualitymanifest I understand that, but it kept telling me I needed to use a function, missing a semi colon, and I had everything. I don't know what I was missing.
Jason C.
@jayman3838
Jan 03 2016 03:31
@kbmom5 i dont even know where to start
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:31
h2 element
DJ
@qualitymanifest
Jan 03 2016 03:31
@kbmom5 the code you sent didn't have any code you added in there..? it was just the code you get when you first load the page
Alex
@wishe
Jan 03 2016 03:31
@coltonehrman dont use the class twitter-share-button, that automatically appends the url you are on, just make your own class and also include bootstrap btn class if you want to quick style it
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:31
@dlbonanno64 try looking above for examples
Angela
@kbmom5
Jan 03 2016 03:31
@qualitymanifest yes I reset it in frustration...
DJ
@qualitymanifest
Jan 03 2016 03:32
@kbmom5 ok, well maybe try again and if you have trouble you could paste your code on here and we could take a look
Colton Ehrman
@coltonehrman
Jan 03 2016 03:32
@wishe still not working
Jason C.
@jayman3838
Jan 03 2016 03:32
anyone wanna help me with Checkpoint: Word Blanks
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:33
@jayman3838 hey hi
so wats d issue u facing
Alex
@wishe
Jan 03 2016 03:33
@coltonehrman i tried it and it tries to tweet test
Jason C.
@jayman3838
Jan 03 2016 03:33
@pranavdoshi hi i just have no idea where to start
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:34
specify me the entire thing
Jason C.
@jayman3838
Jan 03 2016 03:34
its says make a mad libs type thing and i have no idea
Colton Ehrman
@coltonehrman
Jan 03 2016 03:34
really? @wishe its not showing anything for me
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:34
its a game i guess
so wer u r stuck??
Angela
@kbmom5
Jan 03 2016 03:34

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line
var result = "I once saw a " + myAdjective + " " + myNoun " " + myVerb + " "

  + "run to the spaceship " + myAdverb + " .";

// Your code above this line

return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

Alex
@wishe
Jan 03 2016 03:34
You need to remove the twitter-share-button class from the html @coltonehrman
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:34
@dlbonanno64 did u figured out?
Angela
@kbmom5
Jan 03 2016 03:34
@qualitymanifest instead of var result = ... what should I write?
Jason C.
@jayman3838
Jan 03 2016 03:34
@pranavdoshi You will need to use string operators to build a new string, result, using the provided variables: myNoun, myAdjective, myVerb, and myAdverb.
that is one out of three paragraphs of instructions
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:35
go thorugh the description wat fcc has given
Harsh Patel
@hgpatel16
Jan 03 2016 03:35
hello guys
Colton Ehrman
@coltonehrman
Jan 03 2016 03:35
ohhh i have to completed remove it?
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:35
den little bit get info from google
DJ
@qualitymanifest
Jan 03 2016 03:35
@kbmom5 get rid of var since var result is already created on the second line
Angela
@kbmom5
Jan 03 2016 03:36
@qualitymanifest yes, and then...
Alex
@wishe
Jan 03 2016 03:36
@coltonehrman Yes because it is used for a share button on a website, so it will automatically try to tweet current url
DJ
@qualitymanifest
Jan 03 2016 03:36
@kbmom5 and then exercise a little patience while i look at it closer, maybe?
Colton Ehrman
@coltonehrman
Jan 03 2016 03:37
ahhh! thanks @wishe
CamperBot
@camperbot
Jan 03 2016 03:37
coltonehrman sends brownie points to @wishe :sparkles: :thumbsup: :sparkles:
:warning: coltonehrman already gave wishe points
Colton Ehrman
@coltonehrman
Jan 03 2016 03:37
its working now
Angela
@kbmom5
Jan 03 2016 03:37
:) @qualitymanifest It tells me I have an unexpected string
dlbonanno64
@dlbonanno64
Jan 03 2016 03:37
@pranavdoshi no, reset the code and plugged in the example, but it still does not work
DJ
@qualitymanifest
Jan 03 2016 03:37
@kbmom5 you are missing a + after myNoun
Angela
@kbmom5
Jan 03 2016 03:38
@qualitymanifest that was IT!!! Ugh! THANK YOU!
CamperBot
@camperbot
Jan 03 2016 03:38
kbmom5 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 703 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Colton Ehrman
@coltonehrman
Jan 03 2016 03:38
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:39
<h2 class="red-txt"></h2> like dis i am talking abt @dlbonanno64
Angela
@kbmom5
Jan 03 2016 03:39
@jayman3838 did you see that? check the conversation above...
Alex
@wishe
Jan 03 2016 03:40
@coltonehrman works well!
Colton Ehrman
@coltonehrman
Jan 03 2016 03:41
@wishe hmm for some reason its concating all the tweets onto uri
lol wow i had a += xD
nvm fixed it
tarek elgohry
@tarek2020
Jan 03 2016 03:42
http://www.freecodecamp.com/challenges/waypoint-create-a-bootstrap-button#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch2%20class%3D%22red-text%20text-center%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%20%20%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%20%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%20%20%3Cimg%20src%3D%22http%3A%2F%2Fbit.ly%2Ffcc-running-cats%22%20class%3D%22img-responsive%22%3E%0A%20%0A%0A%20%20%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%20%20%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Indoor%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Outdoor%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Loving%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Lazy%3C%2Flabel%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Crazy%3C%2Flabel%3E%0A%20%20%20%20%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%20%20%3C%2Fform%3E%0A%3C%2Fdiv%3E%0A
sorry anyone can help me ?
Dineshjs
@Dineshjs
Jan 03 2016 03:43
Hello All, the following script(jquery) throws error,
DJ
@qualitymanifest
Jan 03 2016 03:43
@coltonehrman :+1::+1::+1::+1: for ron swanson quotes
Dineshjs
@Dineshjs
Jan 03 2016 03:43
<script>
$(document).ready(function() {
$("button").addclass("animated bounce");
});
</script>
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:43
wat happen @tarek2020
Colton Ehrman
@coltonehrman
Jan 03 2016 03:43
:p
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:43
@Dineshjs wat happen?
tarek elgohry
@tarek2020
Jan 03 2016 03:43
@pranavdoshi Create a new button element with the text "Like".
Your new button should have the class btn.
Dineshjs
@Dineshjs
Jan 03 2016 03:44
@pranavdoshi even I follow the procedure, it wont run
Taro
@TaroWong
Jan 03 2016 03:44
Hey all!
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:44
@tarek2020 give the class of btn in html
DJ
@qualitymanifest
Jan 03 2016 03:44
@Dineshjs it's addClass (camelCase) not addclass
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:44
@Dineshjs yes
as @qualitymanifest said
Dineshjs
@Dineshjs
Jan 03 2016 03:44
will try @qualitymanifest
Taro
@TaroWong
Jan 03 2016 03:45
help
CamperBot
@camperbot
Jan 03 2016 03:45

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

Pranav Doshi
@pranavdoshi
Jan 03 2016 03:45
@tarek2020 also first create new button element and give class btn
tarek elgohry
@tarek2020
Jan 03 2016 03:45
how ?
Taro
@TaroWong
Jan 03 2016 03:45
wiki Using objects for lookups
CamperBot
@camperbot
Jan 03 2016 03:45
no wiki entry for: using objects for lookups
Jason C.
@jayman3838
Jan 03 2016 03:45
@kbmom5 thanks alot that helped me big time
CamperBot
@camperbot
Jan 03 2016 03:45
jayman3838 sends brownie points to @kbmom5 :sparkles: :thumbsup: :sparkles:
:warning: jayman3838 already gave kbmom5 points
tarek elgohry
@tarek2020
Jan 03 2016 03:45
@pranavdoshi can you write code
Taro
@TaroWong
Jan 03 2016 03:46
wiki waypoint: Using objects for lookups
CamperBot
@camperbot
Jan 03 2016 03:46
no wiki entry for: waypoint using objects for lookups
Dineshjs
@Dineshjs
Jan 03 2016 03:46
Thanks @pranavdoshi @qualitymanifest , it works!!!
CamperBot
@camperbot
Jan 03 2016 03:46
dineshjs sends brownie points to @pranavdoshi and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 279 | @pranavdoshi | http://www.freecodecamp.com/pranavdoshi
:star: 704 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Pranav Doshi
@pranavdoshi
Jan 03 2016 03:46
<button class=" "></button>
@tarek2020
Taro
@TaroWong
Jan 03 2016 03:46
Anyone completed this challenge - Waypoint: Using Objects for Lookups
tarek elgohry
@tarek2020
Jan 03 2016 03:47
@pranavdoshi thanks it's run but how i can write a text in it ?
CamperBot
@camperbot
Jan 03 2016 03:47
tarek2020 sends brownie points to @pranavdoshi :sparkles: :thumbsup: :sparkles:
:star: 280 | @pranavdoshi | http://www.freecodecamp.com/pranavdoshi
Annabelle
@yayannabelle
Jan 03 2016 03:49
@TaroWong yep! I was stuck on that one earlier
@TaroWong what do you have so far?
Taro
@TaroWong
Jan 03 2016 03:49
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line

  var val = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank"
  };

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

// Change this value to test
phoneticLookup("charlie");
Sorry for format
Annabelle
@yayannabelle
Jan 03 2016 03:51
@TaroWong nw! first of all, var val should be var lookup (it's asking you to name it lookup specifically) otherwise that bit is a-okay!
Jason C.
@jayman3838
Jan 03 2016 03:52
@kbmom5 we were at the same place where are you now?
Annabelle
@yayannabelle
Jan 03 2016 03:52
@TaroWong based off the way I did it (and the person who helped me did it), you need one more line of code to finish it off, and it involves the result var and the lookup table
Taro
@TaroWong
Jan 03 2016 03:52
Okay thanks for pointing out the mistake
I will try to figure it out and get back to you :)
Annabelle
@yayannabelle
Jan 03 2016 03:53
@TaroWong you're welcome! go for it~
tarek elgohry
@tarek2020
Jan 03 2016 03:54
how i can write a text in a button ??
c.fairbrother
@colleen612
Jan 03 2016 03:56
I'm just not getting it - the waypoint about the remainder . so setting the value of the remainder to 2 was obvious. but then I'm to set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator. I'm just not getting it. I don't know what sequence they're looking for. for one, 11 divided by 3 is not equal to 2 lol, I know I'm overthinking this and I'm way too new I guess. I just don't know what I'm doing. what do they want from me. I know that no one wants to give me the answer but for some reason, everything I read, I do and it's easy and then this one I'm not getting :( what am I not getting? what do they want? what is the sequence they're looking for?? the example is a terrible example or I simply am missing something entirely.
Zach Miller
@zachmiller1
Jan 03 2016 03:57
Having trouble with Waypoint: Nesting For Loops
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i=0; i < arr.length; i++) {
    for (var j=0; i < arr[i].length; j++) {
      product *= arr[i][j];
    }
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
stanvet
@stanvet
Jan 03 2016 03:58
j < arr[i] ?
Zach Miller
@zachmiller1
Jan 03 2016 03:58
nvm im dumb
c.fairbrother
@colleen612
Jan 03 2016 03:59
yes
Zach Miller
@zachmiller1
Jan 03 2016 03:59
yes @stanvet that was the issue haha
stanvet
@stanvet
Jan 03 2016 03:59
haha
Stephen DanzLopez
@sd1186
Jan 03 2016 03:59

// Setup
function abTest(a, b) {
// Only change code below this line

// 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);

Zach Miller
@zachmiller1
Jan 03 2016 03:59
thank you!
Stephen DanzLopez
@sd1186
Jan 03 2016 03:59
I dont understand this one
c.fairbrother
@colleen612
Jan 03 2016 04:00
@lovelyaveline yes .. any suggestions ?
William Sanches
@PPNC
Jan 03 2016 04:01
@colleen612 Use the remainder operator the same as they used remainder of 5 divided by 2 in the example
Annabelle
@yayannabelle
Jan 03 2016 04:02
@colleen612 so % divides the first number by the second and gives you the remainder, that's its purpose, it goes a step beyond just division. they want you to type in the equation (which here is 11 % 3) and the resulting remainder will be assigned to the variable "remainder"
c.fairbrother
@colleen612
Jan 03 2016 04:04
okay .. thank you! I'll give it a go @PPNC & @lovelyaveline
CamperBot
@camperbot
Jan 03 2016 04:04
colleen612 sends brownie points to @ppnc and @lovelyaveline :sparkles: :thumbsup: :sparkles:
:star: 247 | @lovelyaveline | http://www.freecodecamp.com/lovelyaveline
:star: 33 | @ppnc | http://www.freecodecamp.com/ppnc
cannelflow
@cannelflow
Jan 03 2016 04:04
can some one help me with Waypoint: Escape Sequences in Strings
Annabelle
@yayannabelle
Jan 03 2016 04:04
@colleen612 do your best! I know you can do it :D plus it's really easy to end up overthinking things so sometimes it's helpful to take a step back and reassess
c.fairbrother
@colleen612
Jan 03 2016 04:05
got it! I appreciate the help!
Maor Levy
@Atixx
Jan 03 2016 04:05
@colleen612 Woot!
Annabelle
@yayannabelle
Jan 03 2016 04:05
@colleen612 :clap: Yay!
c.fairbrother
@colleen612
Jan 03 2016 04:06
well I think I was overthinking because using % is typically to calculate the tip of your dinner bill
William Sanches
@PPNC
Jan 03 2016 04:07
@colleen612 Yep, it has a different purpose here :P
c.fairbrother
@colleen612
Jan 03 2016 04:07
just to clarify but I know this is silly of me (maybe ocd haha) but .. the % is called the remainder operator but it divides ?
that's so confusing. hahaha
Annabelle
@yayannabelle
Jan 03 2016 04:08
@colleen612 yep, divides AND gives the remainder. goes beyond the / operator
cannelflow
@cannelflow
Jan 03 2016 04:09
can anyone help me with Waypoint: Escape Sequences in Strings
c.fairbrother
@colleen612
Jan 03 2016 04:09
it's not the modulus, nor percent. but the remainder operator that also does double duty and gives the remainder of what it's dividing. okay .. got it.
@lov thank you :)
CamperBot
@camperbot
Jan 03 2016 04:09
colleen612 sends brownie points to @lov :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for lov
Annabelle
@yayannabelle
Jan 03 2016 04:09
also, I just tried explaining the whole % deal to a non-coding friend and he was like "huh, I'm confused because I have never seen it used like that before" so you're not alone!
you're welcome :D glad I could help!
Maor Levy
@Atixx
Jan 03 2016 04:09
@colleen612 you'll most likely find it being called modulus operator, and it returns the remainder of the division, it's weird like that (it comes really handy when you have to loop over stuff)
Anyone getting the waypoint for accessing nested arrays in JSON?
@jong649 Are you still in here?
William Sanches
@PPNC
Jan 03 2016 04:10
@colleen612 Well, it is called the modulo operation / modulus, if you want the "fancier" term
adily
@adiyous
Jan 03 2016 04:10
Hello everyone I'm stuck at Checkpoint: Counting Cards
c.fairbrother
@colleen612
Jan 03 2016 04:11
Thank you @Atixx ... out of curiosity, is it called the remainder operator in other languages too? or do most other lang refer to it as modular. and does it have the same function in other lang or is this an operator that performs as it does only in JS ? I'm just curious just to know.
CamperBot
@camperbot
Jan 03 2016 04:11
colleen612 sends brownie points to @atixx :sparkles: :thumbsup: :sparkles:
:star: 266 | @atixx | http://www.freecodecamp.com/atixx
Maor Levy
@Atixx
Jan 03 2016 04:11
most languages use the % as the modulus
c.fairbrother
@colleen612
Jan 03 2016 04:11
okay. thank you :)
Maor Levy
@Atixx
Jan 03 2016 04:12
:D
Dr. Paul Kenneth Shreeman
@pkshreeman
Jan 03 2016 04:14
This message was deleted
CamperBot
@camperbot
Jan 03 2016 04:14
Sorry, can't find a bonfire called slasher flick seem to have a bug i have this code and it doesnt pass function slasherarr howmany variables var axe arrlength - howmany var headless arrslice-axe what if ax cuts more than just head if howmany arrlengthreturn its all gonenow what return headlessslasher1 2 3 1. [ Check the map? ]
Dr. Paul Kenneth Shreeman
@pkshreeman
Jan 03 2016 04:20
function slasher(arr, howMany) {
  //variables
  var axe = arr.length - howMany;
  var headless = arr.slice(-axe);
 //What if ax cuts more than just head? 

 if (howMany >= arr.length){return "";}
  //it's all gone...now what? 
  return headless;
}

slasher([1, 2, 3], 1);
Bonfire Slasher…this seem to be bug since this wouldn’t pass the tests
Angela
@kbmom5
Jan 03 2016 04:20
@jayman3838 I'm on the shopping list.
@jayman3838 I must have something wrong with my syntax again...
Jason C.
@jayman3838
Jan 03 2016 04:21
oh i stoped for the night. sorry i dont know
Kenston
@kdrye72
Jan 03 2016 04:22
need HELP
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target">target1</button>
        <button class="btn btn-default target">target2</button>
        <button class="btn btn-default target">target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target">target4</button>
        <button class="btn btn-default target">target5</button>
        <button class="btn btn-default target">target6</button>
      </div>
    </div>
  </div>
</div>
Pawan
@pawan92
Jan 03 2016 04:22
@jayman3838 whats up
Jason C.
@jayman3838
Jan 03 2016 04:22
@pawan92 not much why
Manish Giri
@Manish-Giri
Jan 03 2016 04:22
@kdrye72 what’s your question
Kenneth
@kenyounot
Jan 03 2016 04:22
why is storing values with equal operators not working, I know my code is right
Taro
@TaroWong
Jan 03 2016 04:22

Hi @lovelyaveline

I feel that I am getting there but I am lost on what to do with the "result = data" part. How do I select the values inside "data"?

// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
    var data = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank"
  };

  result = data;

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

// Change this value to test
phoneticLookup("alpha");
Pawan
@pawan92
Jan 03 2016 04:22
@jayman3838 oh you said you had a problem on shopping list haha
Kenston
@kdrye72
Jan 03 2016 04:22
Responsive Design with Bootstrap
Manish Giri
@Manish-Giri
Jan 03 2016 04:23
@TaroWong what does the question say
Jason C.
@jayman3838
Jan 03 2016 04:23
@pawan92 no i didnt @kbmom5 did
Angela
@kbmom5
Jan 03 2016 04:23
@pawan92 could you look at you mine?
Kenston
@kdrye72
Jan 03 2016 04:23
#29
Angela
@kbmom5
Jan 03 2016 04:23
var myList = ["fruit",["apples",5]"vegetables",["peas",20]"meat",["steak",5]"chocolate",["milk",7]"milk",["soy",1]];
@pawan92 apparently I need 5 items... I've tried everything I can think of...
Kenneth
@kenyounot
Jan 03 2016 04:24

Hi @lovelyaveline

I feel that I am getting there but I am lost on what to do with the "result = data" part. How do I select the values inside "data"?

```
// Setup
function phoneticLookup(val) {
var result = "";

// Only change code below this line
var data = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank"
};

result = data;

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

// Change this value to test
phoneticLookup("alpha");
```return data[val]

Pawan
@pawan92
Jan 03 2016 04:24
@kbmom5 which waypoint was that? you might be missing commas
Kenston
@kdrye72
Jan 03 2016 04:24
#29 challenge; One button element should have the id target1.
Taro
@TaroWong
Jan 03 2016 04:24
@Manish-Giri Hi, I am doing the "Waypoint: Using objects for lookups"
Annabelle
@yayannabelle
Jan 03 2016 04:25
@TaroWong @kenyounot you're both mostly there! someone said view it like an array, and how you'd index it, if I'm remembering this correctly! basically that "data" in "result = data" needs to change to include lookup (which should be the table's var name) & val.
Angela
@kbmom5
Jan 03 2016 04:25
I don't know the number, but it's "Checkpoint: shopping list" in JavaScript
Mark Lawrence
@ninja-ml
Jan 03 2016 04:26
@TaroWong change var data { to var lookup {
Pattee
@wannabeempress
Jan 03 2016 04:27
@TaroWong Your result should be looking up the value. Like @lovelyaveline says, it's like an array. The val variable corresponds to a value in lookup.
Angela
@kbmom5
Jan 03 2016 04:27
I removed the commas from between the first element and subarray, now it says the second element must all be numbers
Pattee
@wannabeempress
Jan 03 2016 04:28
@TaroWong
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
    var data = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank"
  };

  result = lookup[val]; // <------ 

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

// Change this value to test
phoneticLookup("alpha");
Pawan
@pawan92
Jan 03 2016 04:28
@kbmom5 there should be a comma between each array
@kbmom5 this is what i have:
var myList = [["apples",5],["bananas",3],["plums",4],["tea",2],["veggie",4]];
Kenneth
@kenyounot
Jan 03 2016 04:29

'''// Setup
var a;
var b = 2;

// Only change code below this line
a=7;
a=b;
'''

CamperBot
@camperbot
Jan 03 2016 04:29
:bulb: to format code use backticks! ``` more info
Pawan
@pawan92
Jan 03 2016 04:29
i think you have extra braces as well
Stephen DanzLopez
@sd1186
Jan 03 2016 04:29
can someone explain: Waypoint: Return Early Pattern for Functions
Kenneth
@kenyounot
Jan 03 2016 04:30

// Setup
var a;
var b = 2;

// Only change code below this line
a=7;
a=b;

why is this not working

Pawan
@pawan92
Jan 03 2016 04:30
@kbmom5 you dont need to specify fruits and veggie..just list an item and number. refer to mine
Annabelle
@yayannabelle
Jan 03 2016 04:30
@kenyounot which exercise is that?
Taro
@TaroWong
Jan 03 2016 04:30

@wannabeempress

I managed to got it right but my answer is slightly different from yours.

I referred to "Waypoint: Accessing Objects Properties with Variables"

// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
    var data = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank"
  };

  result = data[val];

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

// Change this value to test
phoneticLookup("alpha");
Still correct?
Kenneth
@kenyounot
Jan 03 2016 04:30
a new one. storing values with the equal operator, its correct
Angela
@kbmom5
Jan 03 2016 04:30
@pawan92 oh. I see. the instructions weren't that clear to me! I see now. thanks!!
CamperBot
@camperbot
Jan 03 2016 04:30
kbmom5 sends brownie points to @pawan92 :sparkles: :thumbsup: :sparkles:
:star: 259 | @pawan92 | http://www.freecodecamp.com/pawan92
Annabelle
@yayannabelle
Jan 03 2016 04:31
@kenyounot var a = 7;
var b = a;
?
Kenneth
@kenyounot
Jan 03 2016 04:31
tried that, doesnt matter
and shouldnt considering a and b have been defined a s avariable
Taro
@TaroWong
Jan 03 2016 04:32
wiki thank
CamperBot
@camperbot
Jan 03 2016 04:32
no wiki entry for: thank
Taro
@TaroWong
Jan 03 2016 04:32
help
CamperBot
@camperbot
Jan 03 2016 04:32

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

Taro
@TaroWong
Jan 03 2016 04:33
thanks @lovelyaveline
CamperBot
@camperbot
Jan 03 2016 04:33
tarowong sends brownie points to @lovelyaveline :sparkles: :thumbsup: :sparkles:
:star: 250 | @lovelyaveline | http://www.freecodecamp.com/lovelyaveline
Taro
@TaroWong
Jan 03 2016 04:33
thanks @wannabeempress
CamperBot
@camperbot
Jan 03 2016 04:33
tarowong sends brownie points to @wannabeempress :sparkles: :thumbsup: :sparkles:
:star: 213 | @wannabeempress | http://www.freecodecamp.com/wannabeempress
Annabelle
@yayannabelle
Jan 03 2016 04:33
@TaroWong you're welcome! hopefully now you understand how it works (when I found out I went OHHHHHH really loudly out loud because I felt so silly haha)
pecansalad
@pecansalad
Jan 03 2016 04:34
hey what do they mean by "Note that the backslash itself must be escaped in order to display as a backslash." ?
Taro
@TaroWong
Jan 03 2016 04:34
@lovelyaveline Yes I do now. It took silly me 30mins haha
Mark Lawrence
@ninja-ml
Jan 03 2016 04:35
@pecansalad they mean to show an actual backslash, you have to put a backslash before the backslash
Annabelle
@yayannabelle
Jan 03 2016 04:35
@TaroWong oh gosh it took me way longer! admittedly, I did stop, go to bed, and return many hours later, but it was still longer than 30 mins! it's all good now though :D learning something new everyday!
Colton Ehrman
@coltonehrman
Jan 03 2016 04:36
can someone give me feedback on my Calculator Module?
var Calculator = function($calc){

  var symbolMap = {
    '%': '%',
    '÷': '/',
    'x': '*',
    '-': '-',
    '+': '+'
  };
  var $calculator = $calc;
  var $screen = $calc.find('[rel="calculator-output"]');
  var $buttons = $calc.find('button');
  var equation = [];
  var lastClicked;

  function init() {
    $screen.val('0');

    $buttons.click(function(event){
      var $target = $(event.target);
      lastClicked = $target.text();
      updateScreen(lastClicked);
    });

    function clearScreen() {
      $screen.val('0');
    }

    function updateScreen(input) {
      var displayed = $screen.val();
      var isNum = !Number.isNaN(parseInt(input));

      if (isNum || input === '.') { 
        if (displayed === '0') {
          $screen.val(input);
        }
        else {
          $screen.val(displayed + input);
        }
      }
      else {
        clearScreen();
        switch(input) {
          case '%':
          case '÷':
          case 'x':
          case '-':
          case '+':
            equation.push(displayed, symbolMap[input]);
            break;
          case '=':
            equation.push(displayed);
            evaluate();
            break;
        }
      }
    }

    function evaluate() {
      var total = eval(equation.join(''));
      equation = [];
      $screen.val(total);
    }

  }

  return {
    init: init
  };

};
pecansalad
@pecansalad
Jan 03 2016 04:36
@ninja-ml you mean like this \backslash?
Mark Lawrence
@ninja-ml
Jan 03 2016 04:36
@pecansalad so one \ would be escape and to escape and show a backslash \
@pecansalad it would just be \
@pecansalad \
its two backslash symbols \\
pecansalad
@pecansalad
Jan 03 2016 04:39
@ninja-ml when i write the code it says unexpected '\' and unexpected '\' :/
dabmen87
@dabmen87
Jan 03 2016 04:39
whats wrong with this code when trying to create a link
daxkrishna
@daxkrishna
Jan 03 2016 04:39
// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  // Your code here

  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));

guys, can anyone help me understand this and what i'm supposed to do?

These are the instructions

Write a function queue which takes an "array" and an "item" as arguments. Add the item onto the end of the array, then remove the first element of the array. The queue function should return the element that was removed.

and these are the objectives:

queue([], 1) should return 1
queue([2], 1) should return 2
After queue(myArr, 10), myArr[4] should be 10
pecansalad
@pecansalad
Jan 03 2016 04:39
unexpected end of program @ninja-ml
Michael Martin
@MikeASNT
Jan 03 2016 04:39
Checkpoint: Golf Code
Mark Lawrence
@ninja-ml
Jan 03 2016 04:40
@pecansalad which one are you working on?
Michael Martin
@MikeASNT
Jan 03 2016 04:40
Is there any way to create a look-up table for values?
dabmen87
@dabmen87
Jan 03 2016 04:41
blob
Taro
@TaroWong
Jan 03 2016 04:41
@lovelyaveline (y)
dabmen87
@dabmen87
Jan 03 2016 04:41
whats wrong with my code
blob
pecansalad
@pecansalad
Jan 03 2016 04:41
@ninja-ml Waypoint: Escape Sequences in Strings this is my code var myStr= \backslash \ttab \ttab carriage-\rreturn \nnew-line ; // Change this line
daxkrishna
@daxkrishna
Jan 03 2016 04:41
@dabmen87 can you post the actual code instead of a screenshot?
Pattee
@wannabeempress
Jan 03 2016 04:41
@TaroWong You're welcome! And, yeah, still correct. Only difference I can see in our answers is variable name. Mine was lookup; yours is data. :)
dabmen87
@dabmen87
Jan 03 2016 04:42
yes
daxkrishna
@daxkrishna
Jan 03 2016 04:42
also what waypoint is this? @dabmen87
dabmen87
@dabmen87
Jan 03 2016 04:42
<a href='http://freecatphotoapp.com'>cat photos</a>
Mark Lawrence
@ninja-ml
Jan 03 2016 04:42
@pecansalad you have to put the symbols in and not the words
Stephen DanzLopez
@sd1186
Jan 03 2016 04:43
find Waypoint: Return Early Pattern for Functions c
CamperBot
@camperbot
Jan 03 2016 04:43
find waypoint return early pattern for functions c
nothing found
Stephen DanzLopez
@sd1186
Jan 03 2016 04:43
Waypoint: Return Early Pattern for Functions
can somoene explain this one to me.
@daxkrishna manipulate the array using pop/push shift/unshift in your waypoint. If you want more help, let me know.
dabmen87
@dabmen87
Jan 03 2016 04:43
@daxkrishna this is the Waypoint: Link to External Pages with Anchor Elements
daxkrishna
@daxkrishna
Jan 03 2016 04:43
no no, let me try that first @CJM4 will get back if i face problems again
Mark Lawrence
@ninja-ml
Jan 03 2016 04:44
@pecansalad so for the first one to escape the backslash would be \\
tarek elgohry
@tarek2020
Jan 03 2016 04:44
@tarek2020
anyone can help me in
Waypoint: Add Font Awesome Icons to our Buttons
daxkrishna
@daxkrishna
Jan 03 2016 04:45
@dabmen87 what objective is not passing?
pecansalad
@pecansalad
Jan 03 2016 04:45
@ninja-ml you mean like this? var myStr=\ \t \t \r \n;
Mark Lawrence
@ninja-ml
Jan 03 2016 04:46
@pecansalad does it pass? i think you're missing a backslash at the beginning
DJ
@qualitymanifest
Jan 03 2016 04:46
@pecansalad i can see you did use two \\ at the beginning... so yes. it also needs to be in quotation marks
@ninja-ml if you hit the three dots to the right of the time and hit "quote" you will see they had both backslashes
Mark Lawrence
@ninja-ml
Jan 03 2016 04:47
@pecansalad var myStr = '\\ \t \t \r \n'; this should work
CekaI
@cekai
Jan 03 2016 04:47
I am at Waypoint: Return Early Pattern for Functions
I need some help on understanding what this is asking me to do
pecansalad
@pecansalad
Jan 03 2016 04:47
@qualitymanifest @ninja-ml yes finally got it! thanks so much
CamperBot
@camperbot
Jan 03 2016 04:47
pecansalad sends brownie points to @qualitymanifest and @ninja-ml :sparkles: :thumbsup: :sparkles:
dabmen87
@dabmen87
Jan 03 2016 04:47
@daxkrishna thanks it went through
CamperBot
@camperbot
Jan 03 2016 04:47
:star: 705 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 267 | @ninja-ml | http://www.freecodecamp.com/ninja-ml
Mark Lawrence
@ninja-ml
Jan 03 2016 04:48
@qualitymanifest didn't know that, thanks
CamperBot
@camperbot
Jan 03 2016 04:48
ninja-ml sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 706 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
daxkrishna
@daxkrishna
Jan 03 2016 04:48
@dabmen87 good
Mark Lawrence
@ninja-ml
Jan 03 2016 04:49
@tarek2020 what problem are you having?
Juergen Hauser
@Jogibaer1963
Jan 03 2016 04:50
var nameString = function (name) {

console.log("Hi, I am" +" " + name);

};

nameString("Jogibaer");
What is wrong with this ? I am stuck :(
DJ
@qualitymanifest
Jan 03 2016 04:51
@Jogibaer1963 why concatenate the space instead of putting it after the first string like "Hi, I am " + name?
Bun
@Bunchhieng
Jan 03 2016 04:52
Anyone done WayPoint: Testing Objects for Properties?
code
Juergen Hauser
@Jogibaer1963
Jan 03 2016 04:52
just playing around, but this should not effect the result
Jawbh
@CaBra503
Jan 03 2016 04:52
camper bot
DJ
@qualitymanifest
Jan 03 2016 04:52
@Jogibaer1963 is this a waypoint or are you just trying things out?
Bun
@Bunchhieng
Jan 03 2016 04:52

not sure what I did wrong here.. it doesn't accept my code
function checkObj(checkProp) {
// Your Code Here

return myObj.hasOwnProperty("checkProp") ? myObj.checkProp : "Not Found";
}

dhuddleston
@dhuddleston
Jan 03 2016 04:52
Hello! This is my first time using this FreeCodeCamp chat room. I'm currently having an issue with the "Zipline: Build a Random Quote Machine" challenge. I have some code that compiles just fine when I use Brackets, but when I try using the same code in CodePen there are some glitches. I am a bit baffled as to why this is happening. How should I proceed to solve this problem?
DJ
@qualitymanifest
Jan 03 2016 04:52
@Jogibaer1963 you are correct that it should return the same thing either way, but the FCC waypoint tests are pretty strict
Bun
@Bunchhieng
Jan 03 2016 04:53
`return myObj.hasOwnProperty("checkProp") ? myObj.checkProp : "Not Found";1
return myObj.hasOwnProperty("checkProp") ? myObj.checkProp : "Not Found";
Juergen Hauser
@Jogibaer1963
Jan 03 2016 04:53
just trying out, its not a waypoint
DJ
@qualitymanifest
Jan 03 2016 04:53
@Bunchhieng pretty sure you shouldn't be putting checkProp in quotation marks
tarek elgohry
@tarek2020
Jan 03 2016 04:53
Waypoint: Add Font Awesome Icons to our Buttons
cannelflow
@cannelflow
Jan 03 2016 04:54
can some one help me with Checkpoint: Word Blanks
DJ
@qualitymanifest
Jan 03 2016 04:54
@Jogibaer1963 https://repl.it/BbYf looks fine to me...?
Bun
@Bunchhieng
Jan 03 2016 04:54
it should be in double quotes. see the example
tarek elgohry
@tarek2020
Jan 03 2016 04:54
anyone can helpme
Waypoint: Add Font Awesome Icons to our Buttons
Bun
@Bunchhieng
Jan 03 2016 04:54

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

function checkObj(checkProp) {
// Your Code Here

return myObj.hasOwnProperty(checkProp) ? myObj.checkProp : "Not Found";
}

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

DJ
@qualitymanifest
Jan 03 2016 04:54
@Bunchhieng doubt it... can you paste a link to the waypoint?
CekaI
@cekai
Jan 03 2016 04:55

anyone know what is wrong w this? ```// Setup
function abTest(a, b) {
// Only change code below this line
if (a < 0 || b < 0);
console.log("undefined");
//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);
```

'''// Setup
function abTest(a, b) {
// Only change code below this line
if (a < 0 || b < 0);
console.log("undefined");
//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);

CamperBot
@camperbot
Jan 03 2016 04:55
:bulb: to format code use backticks! ``` more info
Juergen Hauser
@Jogibaer1963
Jan 03 2016 04:56
hmm.. then something else might be buggy.. Maybe a hidden char somewhere, thankyou, Thanky for that repl.it, i did not know that :)
DJ
@qualitymanifest
Jan 03 2016 04:56
@Bunchhieng i see you took the quotation marks out. thats good, leave it that way. now instead of using dot notation in your ternary true return, use bracket notation
Bun
@Bunchhieng
Jan 03 2016 04:57
still doesn't work.
abidahmad473
@abidahmad473
Jan 03 2016 04:57
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  pink-text {
    color: pink;
  }
</style>
<h1 class:"pink-text">Hello World!</h1>
DJ
@qualitymanifest
Jan 03 2016 04:57
@Bunchhieng paste your code again... works when i do it
abidahmad473
@abidahmad473
Jan 03 2016 04:57
What did I do wrong
Its asking about priotitizing one color over the other
Bun
@Bunchhieng
Jan 03 2016 04:57

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

function checkObj(checkProp) {
// Your Code Here

return myObj.hasOwnProperty("checkProp") ? myObj[checkProp] : "Not Found";
}

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

dhuddleston
@dhuddleston
Jan 03 2016 04:58
Figured out the solution! My Adblock Plus was disabling some features on CodePen. Haha.
DJ
@qualitymanifest
Jan 03 2016 04:58
@Bunchhieng take checkProp out of quotation marks dude
CekaI
@cekai
Jan 03 2016 04:58
```
 if (a < 0 || b < 0);
    console.log("undefined");
Stephen DanzLopez
@sd1186
Jan 03 2016 04:59
@cekai You dont need the console.log
CekaI
@cekai
Jan 03 2016 04:59
@sd1186 what do I need? just return?
and why?
daxkrishna
@daxkrishna
Jan 03 2016 05:00
@CJM4 can you give me an example of how to do it?
Stephen DanzLopez
@sd1186
Jan 03 2016 05:00
You can do the following:
if (a < 0 || b < 0) {
return;}
Juergen Hauser
@Jogibaer1963
Jan 03 2016 05:00
@abidahmad473 it shoul be class="
should
Rony Alvarez
@RonyAlvarez
Jan 03 2016 05:01
Hi guys, I need help testing my local weather app http://codepen.io/RonyAlvarez/full/mVOwNb/
daxkrishna
@daxkrishna
Jan 03 2016 05:01
// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  // Your code here

  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));

guys, can anyone help me understand this and what i'm supposed to do?

These are the instructions

Write a function queue which takes an "array" and an "item" as arguments. Add the item onto the end of the array, then remove the first element of the array. The queue function should return the element that was removed.

and these are the objectives:

queue([], 1) should return 1
queue([2], 1) should return 2
After queue(myArr, 10), myArr[4] should be 10
Rony Alvarez
@RonyAlvarez
Jan 03 2016 05:01
Can you see the name of your city?
daxkrishna
@daxkrishna
Jan 03 2016 05:02
i know i am supposed to use the push, pop parameters but how?
DJ
@qualitymanifest
Jan 03 2016 05:02
@RonyAlvarez yep everything looks correct
CekaI
@cekai
Jan 03 2016 05:02
@sd1186 yes, but now my other part doesn't work
Bun
@Bunchhieng
Jan 03 2016 05:02
doesn't work.
Rony Alvarez
@RonyAlvarez
Jan 03 2016 05:02
@qualitymanifest Can you see the name of your city? mine says city line for some reason
Stephen DanzLopez
@sd1186
Jan 03 2016 05:02

function abTest(a, b) {
// Only change code below this line

if (a<0 || b<0) {
return;}

// Only change code above this line

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

CekaI
@cekai
Jan 03 2016 05:02
```
DJ
@qualitymanifest
Jan 03 2016 05:02
@RonyAlvarez yes i see the correct city
@daxkrishna you'll specifically want to use .push to add the new item and .shift to remove the first.
Rony Alvarez
@RonyAlvarez
Jan 03 2016 05:03
@qualitymanifest Ok, Thanks
CamperBot
@camperbot
Jan 03 2016 05:03
ronyalvarez sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 707 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
CekaI
@cekai
Jan 03 2016 05:04
@sd1186 thank you , was missing the {} but I don't know why that makes the difference, was that the point of the exercise?
CamperBot
@camperbot
Jan 03 2016 05:04
cekai sends brownie points to @sd1186 :sparkles: :thumbsup: :sparkles:
:star: 205 | @sd1186 | http://www.freecodecamp.com/sd1186
Stephen DanzLopez
@sd1186
Jan 03 2016 05:04
I honestly dont know
It took me forever to figure it out
@cekai
Favian Eric Raygoza
@quietray
Jan 03 2016 05:04
a little help here. I just started the HTML section. We're covering the Link to External Pages with Anchor Elements curriculum. I do everything that is asked of me but it won't let me proceed or mark my answer as correct
Manish Giri
@Manish-Giri
Jan 03 2016 05:05
@quietray show your code
daxkrishna
@daxkrishna
Jan 03 2016 05:05
@quietray code please
Favian Eric Raygoza
@quietray
Jan 03 2016 05:05
I wrote: <a href="http://freecatphotoapp.com">cat photos</a>
and the directions are
Create an a element that links to http://freecatphotoapp.com and has "cat photos" as its anchor text.
Michael Martin
@MikeASNT
Jan 03 2016 05:06
function golfScore(par, strokes) {
  // Only change code below this line
  if (strokes === 0)
    {
      return "You gotta shoot!";
    }
    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!";}

  // Only change code above this line
}

// Change these values to test
golfScore(3, 0);
Is there a better way to write this code?
Maulik Darji
@maulikdarji
Jan 03 2016 05:06
@MikeASNT use Switch case statement
daxkrishna
@daxkrishna
Jan 03 2016 05:07
@quietray what objective isn't being passed?
abidahmad473
@abidahmad473
Jan 03 2016 05:07
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  pink-text{
    color: pink;
  }
</style>
<h1 class="pink-text">Hello World!</h1>
For the waypoint for prioritizing one style over the other, It's saying my h1 element should be pink but for some reason it's coming out green. Can I get help with this?
Favian Eric Raygoza
@quietray
Jan 03 2016 05:07
The following three have a red X next to each:
  1. Your a element should have the anchor text of "cat photos".
  2. You need an a element that links to http://freecatphotoapp.com
  3. Make sure your a element has a closing tag.
Maulik Darji
@maulikdarji
Jan 03 2016 05:08
@abidahmad473 add . before your pink-text class in <style>
daxkrishna
@daxkrishna
Jan 03 2016 05:08
the code seems right @quietray
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:08
@MikeASNT If you have multiple if statements, better use Switch statement, its more efficient.
daxkrishna
@daxkrishna
Jan 03 2016 05:08
checking my waypoint wait
Favian Eric Raygoza
@quietray
Jan 03 2016 05:08
hmmm
Manish Giri
@Manish-Giri
Jan 03 2016 05:08
@abidahmad473 you need to reference class names in css with a ., like .pink-text
Juergen Hauser
@Jogibaer1963
Jan 03 2016 05:08
@abidahmad473 css class is defined as .pink-text
abidahmad473
@abidahmad473
Jan 03 2016 05:09
@maulikdarji Thanks
CamperBot
@camperbot
Jan 03 2016 05:09
abidahmad473 sends brownie points to @maulikdarji :sparkles: :thumbsup: :sparkles:
:star: 280 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
Michael Martin
@MikeASNT
Jan 03 2016 05:09
how do you write a switch statement? Mine keeps saying that the break won't be reached after the return
daxkrishna
@daxkrishna
Jan 03 2016 05:09

@quietray

<p> <a href="http://freecatphotoapp.com"> Cat Photos </a></p>

this is what it looks like on my waypoint and it passed

Favian Eric Raygoza
@quietray
Jan 03 2016 05:10
@daxkrishna yup, just worked for me finally. I guess all it wanted me to do was encase it in a paragraph
daxkrishna
@daxkrishna
Jan 03 2016 05:10
@quietray good :)

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

function queue(arr, item) {
// Your code here

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));

guys, can anyone help me understand this and what i'm supposed to do?

These are the instructions

Write a function queue which takes an "array" and an "item" as arguments. Add the item onto the end of the array, then remove the first element of the array. The queue function should return the element that was removed.

and these are the objectives:

queue([], 1) should return 1
queue(2, 1) should return 2
After queue(myArr, 10), myArr[4] should be 10
```

cannelflow
@cannelflow
Jan 03 2016 05:11
need help with Checkpoint: Word Blanks
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:11
@MikeASNT You do not need Switch statement, IF statement is totally fine in that case. all you need todo is take it out 1st if statement where "strokes === 0", and put it end of function "return "You gotta shoot!"" without if statement .
daxkrishna
@daxkrishna
Jan 03 2016 05:11
// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  // Your code here

  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));

These are the instructions

Write a function queue which takes an "array" and an "item" as arguments. Add the item onto the end of the array, then remove the first element of the array. The queue function should return the element that was removed.

and these are the objectives:

queue([], 1) should return 1
queue([2], 1) should return 2
After queue(myArr, 10), myArr[4] should be 10

guys, can someone please guide me with this?

Maulik Darji
@maulikdarji
Jan 03 2016 05:11
@MikeASNT for that you have to use a var that stores the result and returns it at the end of switch case. Like:
switch(var){
case X:
    result = "X";
    break;
case Y:
    result = "Y";
    break;
.
.
.


}

return result;
Stoner19
@Stoner19
Jan 03 2016 05:12
@daxkrishna I've skipped that one. I don't get it at all.
daxkrishna
@daxkrishna
Jan 03 2016 05:12
@cannelflow what's the problem?
Michael Martin
@MikeASNT
Jan 03 2016 05:12
so... function switchTest (testStrokes)
daxkrishna
@daxkrishna
Jan 03 2016 05:12
@Stoner19 yeah, a little nudge is all i need
Michael Martin
@MikeASNT
Jan 03 2016 05:12
return 1
?
daxkrishna
@daxkrishna
Jan 03 2016 05:12
i don't want to skip anything
Michael Martin
@MikeASNT
Jan 03 2016 05:12
or just return testStrokes
testStrokes = whatever is in the return?
Stoner19
@Stoner19
Jan 03 2016 05:12
nor do I, but getting frustrated and angry wasn't helping me
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:13
@daxkrishna if arr length == 0 return 1. else do smth...
daxkrishna
@daxkrishna
Jan 03 2016 05:13
i am honestly not angry or frustrated :)
Michael Martin
@MikeASNT
Jan 03 2016 05:13
should I use return or result =?
daxkrishna
@daxkrishna
Jan 03 2016 05:13
@7urkm3n it doesn't have to do anything push/pop/shift/unshift then?
Stoner19
@Stoner19
Jan 03 2016 05:14
thats good! I spent a lot of time reading and rereading that one and still doesn't make sense. I'll still complete it, just needed a break from it
daxkrishna
@daxkrishna
Jan 03 2016 05:14
cos i thought that was the way since you are taking off something at the start and adding at the end
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:14
@daxkrishna in else, push then unshift xD
Elifaz Filho
@Elifaz
Jan 03 2016 05:14
so I’m trying to change the bootstrap class page-header color and somehow this is not working on codepen, but is running fine on Brackets, did anyone experienced the same issue? check it out:
.page-header {
  border-bottom-color: #FFCCBC;
}
daxkrishna
@daxkrishna
Jan 03 2016 05:14
but i don't get how i do it
where I add that code and how
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:14
@MikeASNT return result = 'Bla bla bal'
Jpax411
@Jpax411
Jan 03 2016 05:14
anyone past the JSON part of JS?
Maulik Darji
@maulikdarji
Jan 03 2016 05:14
@daxkrishna Whats the problem?
daxkrishna
@daxkrishna
Jan 03 2016 05:14
inside the function { }? if so, how?
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:15
@daxkrishna if(arr.length === 0 ){
return 1;
}else{
arr.push(item);
}
return arr.shift();
Maulik Darji
@maulikdarji
Jan 03 2016 05:16
@daxkrishna For queue function you need to push() an item at the end of the provided array and remove and return the first item from the array
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:17
@daxkrishna did u figure it out now ?
Michael Martin
@MikeASNT
Jan 03 2016 05:17
its not working
Tarun Rathi
@tarunrathi999
Jan 03 2016 05:17
@Elifaz try adding border-bottom-width, it should work then
daxkrishna
@daxkrishna
Jan 03 2016 05:17
@7urkm3n still lost :(
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:18

@daxkrishna xD
Try to understand the point of idea.

function queue(arr, item) {
if(arr.length === 0 ){
return 1;
}else{
arr.push(item);
}
return arr.shift();
}

@MikeASNT whats problem ?
Michael Martin
@MikeASNT
Jan 03 2016 05:19
  function switchTest (strokes) {
    switch (Strokes) {
      case 1:
        return result == "Hole-in-one!";
      break;

      case strokes <= (par -2):
        return result == "Eagle";
      break;

      case strokes == par - 1:
        return result == "Birdie";
      break;

      case strokes == par:
        return result == "Par";
      break;

      case strokes == par + 1:
        return result == "Bogey";
      break;

      case strokes == par + 2:
        return result == "Double Bogey";
      break;

      case strokes >= par + 3:
        return result == "Go Home!";
      break;
      }
      return Strokes;
  }
I think I am doing it wrong
Stella Liu
@Stells93
Jan 03 2016 05:19
whelp I am getting confused on this waypoint challenge and not sure what's wrong with my code. The challenge is nesting for loops
@Jpax411 I have; I might be able to help.
Stella Liu
@Stells93
Jan 03 2016 05:19
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i = 0; i < arr.length; i++) {
    for (var j = 0; j < arr[i].length; j++) {
      console.log(arr[i][j]);
    }
        product = multiplyAll(arr);
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:19

@MikeASNT

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!";
}

return ;

Michael Martin
@MikeASNT
Jan 03 2016 05:20
that's what I wrote before and I was told to make it a switch
Stella Liu
@Stells93
Jan 03 2016 05:20
@MikeASNT yeah I passed that challenge. lemme go take a peek and help you out
Maulik Darji
@maulikdarji
Jan 03 2016 05:20
@MikeASNT return result. and == is a comparison operator not assignment operator. Use result="something";
Jpax411
@Jpax411
Jan 03 2016 05:21
@CJM4 do I have to do something different to change the data in the objects?
Stoner19
@Stoner19
Jan 03 2016 05:21
@7urkm3n @daxkrishna I understand the solution that you pasted, but in reading the instructions, I definitely don't see how you came to that. I understand that it's saying "if the array is strictly equal to 0 then output 1, and if so remove the 1st integer and add myArr to the end."
Elifaz Filho
@Elifaz
Jan 03 2016 05:21
@tarunrathi999 with which value?
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:21
@MikeASNT I just have did earlier, if u want to know efficient code use switch statement instead of If statement. But both works
Michael Martin
@MikeASNT
Jan 03 2016 05:21
Did you mean to return a conditional instead of an assignment? is what it says
that's what I am saying
but my switch is not working
I don't know why it isn't working
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:22
@Stoner19 which one u talking about ?
@MikeASNT I don't know if this will help, but at the beginning of your switch you have Strokes capitalized and I believe it's case sensitive.
Maulik Darji
@maulikdarji
Jan 03 2016 05:22
no you have to return the result variable @MikeASNT
Stoner19
@Stoner19
Jan 03 2016 05:22
@7urkm3n js Stand in Line
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:22
@Stoner19 where u cant understand ?
HOW TO PASTE CODE AS LIKE CODE ?
Michael Martin
@MikeASNT
Jan 03 2016 05:23
<> </>
lol
+ ` CODE + `
omg
three `
Francisco Júnior
@franciscoeaj
Jan 03 2016 05:23
put the code between ```
Michael Martin
@MikeASNT
Jan 03 2016 05:23
thank you
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:23
ok, im just new here, for fun to help and see freecodecamp
Bill Hinostroza
@billh93
Jan 03 2016 05:23
I don't mean to intrude but I really need help with this problem set. Here is the code
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:24

@Stoner19
+`
function queue(arr, item) {

if(arr.length === 0 ){
return 1;
}else{
arr.push(item);
}
return arr.shift();
}
`+

<> XXX </>
Bill Hinostroza
@billh93
Jan 03 2016 05:24
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 || strokes >= par + 1){
    return "Bogey";
  }else if(par + 2){
    return "Double Bogey";
  }else if(strokes >= par - 3){
    return "Go Home!";
  }

  return "Change Me";
  // Only change code above this line
}

// Change these values to test
golfScore(4, 6);
@Jpax411 Are you working on Record Collection?
Tarun Rathi
@tarunrathi999
Jan 03 2016 05:24
@Elifaz you can add 2px 0r 4px
Jpax411
@Jpax411
Jan 03 2016 05:24
yes
Michael Martin
@MikeASNT
Jan 03 2016 05:24
I have no idea
lol
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:24
@billh93 ?
Stoner19
@Stoner19
Jan 03 2016 05:24
@7urkm3n ok, now going back to re-read it, I can make a little more sense of the question. requirements of that checkpoint seem a bit far fetched for js noob. Thank you for the help with this one. i've been stuck for days
CamperBot
@camperbot
Jan 03 2016 05:24
stoner19 sends brownie points to @7urkm3n :sparkles: :thumbsup: :sparkles:
Bill Hinostroza
@billh93
Jan 03 2016 05:24
I have hole in one, eagle and birdie all set. I just need the rest
CamperBot
@camperbot
Jan 03 2016 05:24
:star: 97 | @7urkm3n | http://www.freecodecamp.com/7urkm3n
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:25
@Stoner19 cool !
Elifaz Filho
@Elifaz
Jan 03 2016 05:25
@tarunrathi999 no go..perhaps i’m running a different version on Brackets
Michael Martin
@MikeASNT
Jan 03 2016 05:25
:|
Rovshen Gurdov
@7urkm3n
Jan 03 2016 05:25
@MikeASNT did u fix it ?
Michael Martin
@MikeASNT
Jan 03 2016 05:25
no
Bill Hinostroza
@billh93
Jan 03 2016 05:26
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 || strokes >= par + 1){
    return "Bogey";
  }else if(par + 2){
    return "Double Bogey";
  }else if(strokes >= par - 3){
    return "Go Home!";
  }

  return "Change Me";
  // Only change