These are chat archives for FreeCodeCamp/Help

28th
Jan 2016
Franco Zapata
@Francozt01
Jan 28 2016 00:00
@zozoaco we all make mistakes when we start to learn something new
just don't give up
Xavier Artot
@xavierartot
Jan 28 2016 00:03
hey there
do you need help
how can I change my name here?
Franco Zapata
@Francozt01
Jan 28 2016 00:04
hi Professor Xavier
Xavier Artot
@xavierartot
Jan 28 2016 00:04
:+1:
where is a preference to change my name?
Franco Zapata
@Francozt01
Jan 28 2016 00:05
that is ur nickname
Xavier Artot
@xavierartot
Jan 28 2016 00:05
wep
Franco Zapata
@Francozt01
Jan 28 2016 00:05
or user name
try at ur gthub acc
Xavier Artot
@xavierartot
Jan 28 2016 00:05
the name has display here
Franco Zapata
@Francozt01
Jan 28 2016 00:05
and relog
Xavier Artot
@xavierartot
Jan 28 2016 00:05
or
ok
Franco Zapata
@Francozt01
Jan 28 2016 00:05
when i hiver ur picture
ur name appears Xavier Artot
hover
Jorge Sanz
@jorge-sanz
Jan 28 2016 00:06
Is FreeCodeCamp going to be translated to different languages?
Is there any project to be translated?
Xavier Artot
@xavierartot
Jan 28 2016 00:06
wep but I don't want to change my Github
Franco Zapata
@Francozt01
Jan 28 2016 00:09
@xavierartot just stay like that we all see ur name with a space "Xavier Artot" when we hover ur nick or ur picture
Enrique Cahua
@enriquecahua
Jan 28 2016 00:09
@jorge-sanz there are some, check out their waffle board html <img src="https://bit.ly/fcc-relaxing-cat" class="smaller-image">
wrong copy and paste originally
Franco Zapata
@Francozt01
Jan 28 2016 00:11
@jorge-sanz la verdad no he escuchado nada de alguna traduccion del sitio.. cualquier cosa entra al chat en español y preguntas hay varios españoles
Xavier Artot
@xavierartot
Jan 28 2016 00:27
talking in French please :smile:
DBerk
@theberknologist
Jan 28 2016 00:36
hope someone can help me with the following lesson, "Target the same element with multiple jQuery Selections".
Aleksander Gębicki
@Takumar
Jan 28 2016 00:37
@jorge-sanz I think that Spanish version of some exercises is available.
DBerk
@theberknologist
Jan 28 2016 00:37
The problem says, "Using each of the above jQuery selectors and the addClass() function:
Add the animated class to all elements with type button.
Add the shake class to all the buttons with class .btn.
Add the btn-primary class to the button with id #target1.
Unfortunately, I'm lost...
Here's what I have:
Enrique Cahua
@enriquecahua
Jan 28 2016 00:38
@theberknologist can you copy and paste your code?
DBerk
@theberknologist
Jan 28 2016 00:38
<script>
$(document).ready(function() {
addClass(animated)
});
</script>
Enrique Cahua
@enriquecahua
Jan 28 2016 00:38
explain format
CamperBot
@camperbot
Jan 28 2016 00:38

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

DBerk
@theberknologist
Jan 28 2016 00:38
@enriquecahua thanks for responding.
CamperBot
@camperbot
Jan 28 2016 00:38
theberknologist sends brownie points to @enriquecahua :sparkles: :thumbsup: :sparkles:
:star: 313 | @enriquecahua | http://www.freecodecamp.com/enriquecahua
DBerk
@theberknologist
Jan 28 2016 00:38
i just pasted the code
<script>
$(document).ready(function() {
addClass(animated)
});
</script>
the question is how do I add the following elements to this code:
Enrique Cahua
@enriquecahua
Jan 28 2016 00:39
if you highlight your code and select copy as pretty code, its easier to paste here
DBerk
@theberknologist
Jan 28 2016 00:39

addClass() function:

Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

Enrique Cahua
@enriquecahua
Jan 28 2016 00:39
 <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="targe
like this
DBerk
@theberknologist
Jan 28 2016 00:39
@enriquecahua one other simple question:
where are you doing this to get the cut and past to appear in it's original form with color
Aleksander Gębicki
@Takumar
Jan 28 2016 00:40
@theberknologist you have to select first button element and then add class to it:
$("button").addClass(...
DBerk
@theberknologist
Jan 28 2016 00:40
Thanks @Takumar
CamperBot
@camperbot
Jan 28 2016 00:40
theberknologist sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1964 | @takumar | http://www.freecodecamp.com/takumar
Enrique Cahua
@enriquecahua
Jan 28 2016 00:40
@theberknologist just highlight your code on the freecodecamp page you are on and then it pops up
Aleksander Gębicki
@Takumar
Jan 28 2016 00:40
@theberknologist also put name of class in double quotation marks, because it is a string.
DBerk
@theberknologist
Jan 28 2016 00:41
<div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="animated shake btn-primary btn btn-default target" id="target1">#tar
cool, thanks
thanks @enriquecahua and @Takumar
CamperBot
@camperbot
Jan 28 2016 00:42
theberknologist sends brownie points to @enriquecahua and @takumar :sparkles: :thumbsup: :sparkles:
:warning: theberknologist already gave takumar points
:warning: theberknologist already gave enriquecahua points
Enrique Cahua
@enriquecahua
Jan 28 2016 00:42
@theberknologist @Takumar is correct, $("button").addClass(...
for example html $("button").addClass("animated")
soccerpreston11
@soccerpreston11
Jan 28 2016 00:43

it says
Your a element should be a dead link with a href attribute set to #.

here is my code

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

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


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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
DBerk
@theberknologist
Jan 28 2016 00:44
@enriquecahua @Takumar looks good, thanks... very helpful
CamperBot
@camperbot
Jan 28 2016 00:44
theberknologist sends brownie points to @enriquecahua and @takumar :sparkles: :thumbsup: :sparkles:
:warning: theberknologist already gave enriquecahua points
:warning: theberknologist already gave takumar points
Enrique Cahua
@enriquecahua
Jan 28 2016 00:45
np
Aleksander Gębicki
@Takumar
Jan 28 2016 00:45
@theberknologist you are welcome :-)
Enrique Cahua
@enriquecahua
Jan 28 2016 00:49
@soccerpreston11 locate your a(anchor tag), find and replace the link(href) with '#' instead of the url
soccerpreston11
@soccerpreston11
Jan 28 2016 00:51
hi
Enrique Cahua
@enriquecahua
Jan 28 2016 00:53
@soccerpreston11 hi, were you able to figure it out?
soccerpreston11
@soccerpreston11
Jan 28 2016 00:54

it says
Your a element should be a dead link with a href attribute set to #.
here is my code

```

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

<p>#<a href="#">#</a></p>


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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Enrique Cahua
@enriquecahua
Jan 28 2016 00:54
@soccerpreston11 locate your 'a' tag(anchor tag), find and replace the link(href) with '#' instead of the url
soccerpreston11
@soccerpreston11
Jan 28 2016 00:55
where is it
Enrique Cahua
@enriquecahua
Jan 28 2016 00:57
<p>Click here for <a href="#">cat photos</a>.</p>
@soccerpreston11 it wasn't necessary to change the text inside as well, only the link
TheKingIsHere
@TheKingIsHere
Jan 28 2016 00:58
could I get some help
<script>

  {$(document).ready(function)()});

</script>
Sean Baldwin
@Seanislavski
Jan 28 2016 00:59
is github down for anyone else?
Enrique Cahua
@enriquecahua
Jan 28 2016 00:59
@Seanislavski yeah
Sean Baldwin
@Seanislavski
Jan 28 2016 00:59
ok
damn
tx
Enrique Cahua
@enriquecahua
Jan 28 2016 01:00
@TheKingIsHere whats your question?
TheKingIsHere
@TheKingIsHere
Jan 28 2016 01:02
@enriquecahua how to add the scripting correctly
Enrique Cahua
@enriquecahua
Jan 28 2016 01:03

@TheKingIsHere ```html
$(document).ready(function() {

});
```

 $(document).ready(function() {

  });
the selectors will go inbetween the brackets once you get going
TheKingIsHere
@TheKingIsHere
Jan 28 2016 01:05
@enriquecahua thanks
CamperBot
@camperbot
Jan 28 2016 01:05
thekingishere sends brownie points to @enriquecahua :sparkles: :thumbsup: :sparkles:
:star: 314 | @enriquecahua | http://www.freecodecamp.com/enriquecahua
Enrique Cahua
@enriquecahua
Jan 28 2016 01:05
np
DBerk
@theberknologist
Jan 28 2016 01:05
@TheKingIsHere did you get your problem solved? nevermind, looks like @enriquecahua's got you!
Gary Morris
@fattox
Jan 28 2016 01:05
any JS/OOP wizards can answer me a question?
i've got my exercise working but have a question about it
DBerk
@theberknologist
Jan 28 2016 01:06
@TheKingIsHere we may be close in our lessons, so hopefully i can be of some help if you get stuck...
i'm just happy i've gotten this far - this is all new to me
Xavier Artot
@xavierartot
Jan 28 2016 01:06
@fattox ask
Enrique Cahua
@enriquecahua
Jan 28 2016 01:06
Gary Morris
@fattox
Jan 28 2016 01:06
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {

  // Only change code below this line.
  var gear = 0;

    this.setGear = function(set) {
    gear += set;
  };

    this.getGear = function() {
    return gear;
  };

};

var myCar = new Car();

var myBike = new Bike();

myBike.setGear(3);
this does not work, unless i change the += in the setGear function to =
but on my console the output is correct (3)
anyone can explain why?
Xavier Artot
@xavierartot
Jan 28 2016 01:08
is an assign
you said : gear = 3;
it's normal
Gary Morris
@fattox
Jan 28 2016 01:09
but with += aren't i just saying gear = 0+3 (=3)
and getting the same output
because it shows the same in the console
Xavier Artot
@xavierartot
Jan 28 2016 01:09
which waypoint it is?
Gary Morris
@fattox
Jan 28 2016 01:09
Make Object Properties Private
it works fine if i use =
Xavier Artot
@xavierartot
Jan 28 2016 01:10
yes
Gary Morris
@fattox
Jan 28 2016 01:10
just trying to understand better, of why += doesn't say correct
even though the output is correct on the console
Xavier Artot
@xavierartot
Jan 28 2016 01:10
I just told uou
Gary Morris
@fattox
Jan 28 2016 01:10
do you have more detail than "is an assign"? i'm a newbie :)
i'm not sure what you mean
is it because it only works once, and then the value is "added" again instead of directly assigned each time it runs?
Xavier Artot
@xavierartot
Jan 28 2016 01:11
you're code is calling myBike.setGear(3);
one time
Gary Morris
@fattox
Jan 28 2016 01:11
so gear = 3, then 6, etc?
Xavier Artot
@xavierartot
Jan 28 2016 01:13
no
you execute the fun 1 time
Gary Morris
@fattox
Jan 28 2016 01:14
it's ok, i worked it out, it was adding them up like i thought
i guess that's what you meant?
so
myBike.setGear(3);
myBike.setGear(3);
myBike.setGear(3);
= 9, intead of 3,3,3
Xavier Artot
@xavierartot
Jan 28 2016 01:14
no
yes
Gary Morris
@fattox
Jan 28 2016 01:14
yeah maybe i didn't understand you, but you put my brain on the right path
thanks! @xavierartot
CamperBot
@camperbot
Jan 28 2016 01:14
fattox sends brownie points to @xavierartot :sparkles: :thumbsup: :sparkles:
:star: 259 | @xavierartot | http://www.freecodecamp.com/xavierartot
Xavier Artot
@xavierartot
Jan 28 2016 01:15
ok
you have to understand is important
Gary Morris
@fattox
Jan 28 2016 01:16
yeah, just a brain hiccup
Xavier Artot
@xavierartot
Jan 28 2016 01:16
an assignation is a simple var i = 2;
Gary Morris
@fattox
Jan 28 2016 01:17
yeah, i see the difference better now
Xavier Artot
@xavierartot
Jan 28 2016 01:17
i +=4;
i = 6
Gary Morris
@fattox
Jan 28 2016 01:17
yeah
Xavier Artot
@xavierartot
Jan 28 2016 01:17
the output
Gary Morris
@fattox
Jan 28 2016 01:17
thanks for your help
@xavierartot nice website by the way, very cool ;)
Jason
@Jauble
Jan 28 2016 01:21
So frustrated
Xavier Artot
@xavierartot
Jan 28 2016 01:21
thx
@Jauble what's up
What's wrong?
Jason
@Jauble
Jan 28 2016 01:23
The code I have locally isn't working right, but it's working on codepen. I can't figure out what's going on
Xavier Artot
@xavierartot
Jan 28 2016 01:23
ok
the code?
did you use a task runner, workflow, Grunt or Gulp
?
show me the colde
code
Jason
@Jauble
Jan 28 2016 01:27
In the js, the part that puts "Today is Jan27 and nothing happened" on the page. "http://codepen.io/auble220/pen/WrMmEb
It works on codepen, but not locally
Xavier Artot
@xavierartot
Jan 28 2016 01:28
use console.log() on local
to display the element
what is it: this.news
news is not in the object Date?
I'm not sure
Jason
@Jauble
Jan 28 2016 01:29
huh?
Xavier Artot
@xavierartot
Jan 28 2016 01:29
then you don't have the ;
at the end
line 2
no that's ok
sorry
have you try:
var date = new Day('Today this happened');
console.log(date);
Jason
@Jauble
Jan 28 2016 01:35
I figured it out. I had the external js file linked in the head. Moved it to the end of the body
thanks @xavierartot
CamperBot
@camperbot
Jan 28 2016 01:35
jauble sends brownie points to @xavierartot :sparkles: :thumbsup: :sparkles:
:star: 260 | @xavierartot | http://www.freecodecamp.com/xavierartot
Jason
@Jauble
Jan 28 2016 01:37
I guess it was trying to change the news div, but wasn't recognizing it because the page hadn't fully loaded
Shahariar Touhid
@shahariar50
Jan 28 2016 01:58
someone help me
please help me for this challange(Add Alt Text to an Image for Accessibility)
dgrozdanich
@dgrozdanich
Jan 28 2016 02:00
Sure, what's up?
dgrozdanich
@dgrozdanich
Jan 28 2016 02:05

I also need some tips actually: I'm working on Object Oriented and Functional Programming: on the Make Object Properties Private. I feel like I understand what the lesson is trying to make me learn, but I'm having issues as I've had before with calling the function.

var Car = function() {
// this is a private variable
var speed = 10;

// these are public methods
this.accelerate = function(change) {
speed += change;
};

this.decelerate = function() {
speed -= 5;
};

this.getSpeed = function() {
return speed;
};
};

Whoops.... well anyway uh how do I call the getSpeed function as a part of that constructor?
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:08
When I run the "Reverse a String" challenge, it almost works, but it returns o,l,l,e,h instead of olleh. What am I doing wrong?
function reverseString(str) {

 var arr = str.split('');
  arr = arr.reverse();
  arr = arr.join();


  return arr;
}  

reverseString("hello");
Bill
@kirah1314
Jan 28 2016 02:09
@zukethenuke just missing '' in the join method's parameter
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:10
Thanks @kirah1314
CamperBot
@camperbot
Jan 28 2016 02:10
zukethenuke sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 882 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Bill
@kirah1314
Jan 28 2016 02:11
@zukethenuke by the way, you can chain these methods together into 1 line var arr = str.split('').reverse().join();
Tab_BLee
@ivanberry
Jan 28 2016 02:12
@zukethenuke with the '' :smile:
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:12
I know, its just easier to visualize whats happening the other way.
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:47
OK. My code is working on the Factorialize a Number challenge. The numbers being returned are correct, but the red X's aren't turning green. Am I missing something?
var fac = 1;
function factorialize(num) {
  for (var i=1; i<=num; i++) {
    fac *= i;
  }

  return fac;
}


factorialize(5);
Shahid Foy
@shahidfoy
Jan 28 2016 02:48
@zukethenuke did you try arr.toString();
Shahariar Touhid
@shahariar50
Jan 28 2016 02:51
please help me for this challange(Nest your text input element within a form element. )
Nick Robson
@nickrobson
Jan 28 2016 02:51
@zukethenuke Your fac variable is a global variable how you've set it up, so if you were to run it twice:
factorialize(3); // => 6
factorialize(3); // => 36 (since 6 * 6 == 36)
ltrerotola
@ltrerotola
Jan 28 2016 02:53
How do you start a comment with <!-- and end the comment with --> ?
Jocelyn
@jocelyn-ong
Jan 28 2016 02:54
@ltrerotola that's how you comment in html, won't work for js
ltrerotola
@ltrerotola
Jan 28 2016 02:54
it is for HTML
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:54
Thanks @nickrobson . I just moved fac inside the function and it worked. I understand the difference between global and private variables, but I don't understand why it matters in this case.
CamperBot
@camperbot
Jan 28 2016 02:54
zukethenuke sends brownie points to @nickrobson :sparkles: :thumbsup: :sparkles:
:star: 357 | @nickrobson | http://www.freecodecamp.com/nickrobson
Nick Robson
@nickrobson
Jan 28 2016 02:56
@zukethenuke It runs the function multiple times in the same runtime, so each call is affected by previous calls.
Shahid Foy
@shahidfoy
Jan 28 2016 02:56

@shahariar50

<form>
<input type="submit">
</form>

@zukethenuke because the fac is saved out side of the function the fac value is saved each time the function is called instead of starting over
ltrerotola
@ltrerotola
Jan 28 2016 02:58
I am working on HTML and one of the task is “You can start a comment with <!— and end a comment with —> I am a little confused on how to do it. please help =/
Stephen Zukowski
@zukethenuke
Jan 28 2016 02:58
I understand, it dosen't matter for the lesson, but if I were writing a program in the real world it would matter.
Shahid Foy
@shahidfoy
Jan 28 2016 02:58
@ltrerotola
<!-- put out comments here -->
like that
ltrerotola
@ltrerotola
Jan 28 2016 02:59
thank you! xx
Shahid Foy
@shahidfoy
Jan 28 2016 02:59
@zukethenuke yes if you want the function to work correctly cus fac value is saved and so when you ask the function to run again it will give an incorrect answer
Tab_BLee
@ivanberry
Jan 28 2016 03:04

I think this is a bug or Chrom bug white I try the code below

                 ```js

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].lenght; j++) {
product = product * arr[i][j];
}

}

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

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

```
someone review it? I get what I want while in my own js file, but failed in the chanllengs "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; j < arr[i].lenght; j++) {
      product = product * arr[i][j];
    }

  }

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

// Modify values below to test your code
multiplyAll([[1],[2],[3]]);
sorry for wrong code
Oh NO, I get it ,there is typo of "lenght"
That's terrible :cry:
ltrerotola
@ltrerotola
Jan 28 2016 03:19
Screen Shot 2016-01-27 at 7.17.04 PM.png
How do I do this?
Tab_BLee
@ivanberry
Jan 28 2016 03:20
@ltrerotola just delete the comments
Franco Zapata
@Francozt01
Jan 28 2016 03:21
@ltrerotola delete <!-- and -->
ltrerotola
@ltrerotola
Jan 28 2016 03:23
OMG that was so simple. thank you so much and sorry if my questions seem stupid but I’m a newbie and still straggling understanding the language. Thank you for being so kind.
Tab_BLee
@ivanberry
Jan 28 2016 03:25
Nothing different bewteen us except litter early than you diving into the Camp; @ltrerotola
Franco Zapata
@Francozt01
Jan 28 2016 03:30
@ivanberry that's correct
ltrerotola
@ltrerotola
Jan 28 2016 03:34
Screen Shot 2016-01-27 at 7.33.29 PM.png
What am I missing? :/
Shahid Foy
@shahidfoy
Jan 28 2016 03:36

@ltrerotola
you need
````
<!--

<h1></h1>
-->

<h2></h2>
<!--

<p></p>
-->

<!--
<h1></h1>
-->
<h2></h2>
<!--
<p></p>
-->
ltrerotola
@ltrerotola
Jan 28 2016 03:38
OMG I love you! thank you so much!
Shahid Foy
@shahidfoy
Jan 28 2016 03:39
@ltrerotola thanks
CamperBot
@camperbot
Jan 28 2016 03:39
shahidfoy sends brownie points to @ltrerotola :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for ltrerotola
Jose Colmenares
@elfchente
Jan 28 2016 03:41
I'm stuck in this topic bootstrap
how can nest all my HTML in a div class container
Shahid Foy
@shahidfoy
Jan 28 2016 03:42

@elfchente like so
````

<div class="container">
html stuff here
</div>

<div class="container">
html stuff here
</div>
Tab_BLee
@ivanberry
Jan 28 2016 03:43
<div class="container">
<div class="row">
<div class="col-ms-*></div>
</div>
</div>
something like this @shahidfoy
Jose Colmenares
@elfchente
Jan 28 2016 03:44
thank you
Shahid Foy
@shahidfoy
Jan 28 2016 03:44
@ivanberry thanks
CamperBot
@camperbot
Jan 28 2016 03:44
shahidfoy sends brownie points to @ivanberry :sparkles: :thumbsup: :sparkles:
:star: 46 | @ivanberry | http://www.freecodecamp.com/ivanberry
Tab_BLee
@ivanberry
Jan 28 2016 03:44
my suggests: it's better to read the bootstrap first before using.or it will look strange.:smil:
@elfchente
Tab_BLee
@ivanberry
Jan 28 2016 03:51
everyone know, is there anychance to practice with out Camp offline?
Don Price
@KingHippo
Jan 28 2016 03:56
Could anyone give me a clue as top what I am doing wrong on the challenge Accessing Nested Arrays in JSON?
// Setup
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

var secondTree = myPlants.trees[1]; // Change this line
Tab_BLee
@ivanberry
Jan 28 2016 03:57
You can't get the value directly myPlants.trees. it's the prop value. you may want try: myPlants1.type;
var secondTree = myPlants[1].type;
@KingHippo
for the maPlants is a array
Don Price
@KingHippo
Jan 28 2016 04:00
@ivanberry hmmm I tried that, but it's a no go.
I think that might be heading down the right path though
Elifaz Filho
@Elifaz
Jan 28 2016 04:01
Help, I don’t know why I’m not outputting the prime numbers,
function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole = false;

  for (var x = 11; x < num; x++) {

    for (var i = 0; i <= primeHolder.length; i++) {

      if (x % primeHolder[i] === 0)
        pole = true;
      else
        pole = false;
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);
CamperBot
@camperbot
Jan 28 2016 04:01
no wiki entry for: i dont know why im not outputting the prime numbers function sumprimesnum var primeholder 2 3 5 7 11 pole false for var x 11 x num x for var i 0 i primeholderlength i if x primeholderi 0 pole true else pole false if pole primeholderpushx consolelogprimeholdersumprimes200
Greg D
@mosaic-greg
Jan 28 2016 04:02
lol camperbot
what results do you get elifaz
Elifaz Filho
@Elifaz
Jan 28 2016 04:03
the array with 2, 3, 5, 7, 11
It’s not switching the pole to true or false, but why?
chriscchristensen
@chriscchristensen
Jan 28 2016 04:04
Did everyone else get to the bonfires and realise, "I need to start this course over or I need to go and read and watch and learn from other sources about javascript." Or was that just me?
Elifaz Filho
@Elifaz
Jan 28 2016 04:04
@chriscchristensen yeah, you’re not alone…you’re good..
Greg D
@mosaic-greg
Jan 28 2016 04:04
what does the pole mean eli
bf sumprimes
CamperBot
@camperbot
Jan 28 2016 04:05
Sorry, can't find a bonfire called sumprimes. [ Check the map? ]
chriscchristensen
@chriscchristensen
Jan 28 2016 04:05
@Elifaz what would suggest moving to before going back to the bonfires?
Elifaz Filho
@Elifaz
Jan 28 2016 04:05
@mosaic-greg basically I want the array loop to finish and at the end say if there was any match, if there was then set pole to false and do nothing, if there wasn’t then set pole to true and push the number.
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:05
@Elifaz i<primeholder.length will come
less than
Elifaz Filho
@Elifaz
Jan 28 2016 04:06
@chriscchristensen bonfires is basically on the go, reading a lot of documentation on javascript, check this out Mozilla Developer Network this is my number 1 go to.
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:07
@Elifaz wat prob u still facing??
Elifaz Filho
@Elifaz
Jan 28 2016 04:07
@pranavdoshi yeah, I don’t want the number to go through until evaluate it itself such as <= because I already know that x % x === 0 || 1
@pranavdoshi it’s not pushing the primes..
chriscchristensen
@chriscchristensen
Jan 28 2016 04:08
Thanks @Elifaz I was signing up for all the free JavaScript courses at udemy and everything.
CamperBot
@camperbot
Jan 28 2016 04:08
chriscchristensen sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 354 | @elifaz | http://www.freecodecamp.com/elifaz
Elifaz Filho
@Elifaz
Jan 28 2016 04:08
@chriscchristensen trust me, there are a lot of ressources out there..and this website will take you to the next level.
Don Price
@KingHippo
Jan 28 2016 04:08
@ivanberry I think I figured it out. Thanks!
CamperBot
@camperbot
Jan 28 2016 04:08
kinghippo sends brownie points to @ivanberry :sparkles: :thumbsup: :sparkles:
:star: 47 | @ivanberry | http://www.freecodecamp.com/ivanberry
Elifaz Filho
@Elifaz
Jan 28 2016 04:09
@pranavdoshi like, even if it should go to <= the numbers on the loop should output something, I’m sure is something very dumb that i’m missing in here...
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:09
@Elifaz hey just now the primeholder is having
Elifaz Filho
@Elifaz
Jan 28 2016 04:09
Just a refresher..
function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole = false;

  for (var x = 11; x < num; x++) {

    for (var i = 0; i <= primeHolder.length; i++) {

      if (x % primeHolder[i] === 0)
        pole = true;
      else
        pole = false;
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:10
the same numbers on o/p
dude u r suppose to get sum of numbers within array?
Elifaz Filho
@Elifaz
Jan 28 2016 04:10
@pranavdoshi yes I am, but first I need to get the prime numbers.
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:10

pig latin..

function translate(str) {
    var a=str.charAt(0);
    if(a==="a"||a==="e"||a==="i"||a==="o"||a==="u"){
        str=str+"way";
    }else{
    str=str.slice(1)+a+"ay";}
    return str;
}

only doest work for translate("glove") should return "oveglay"...any help ?? @pranavdoshi

Elifaz Filho
@Elifaz
Jan 28 2016 04:11
@pranavdoshi I will add them pretty quick once I get these primes in..
Carlos Toro Vera
@carmelo12341
Jan 28 2016 04:11
eh... can someone help me with node cookies related problem
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:11
@Elifaz so u want prime numbers based on the argument that gets passed to sumPrimes function?
Elifaz Filho
@Elifaz
Jan 28 2016 04:12
@pranavdoshi there you go..correct
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:12
@pranavdoshi any help man ?
Elifaz Filho
@Elifaz
Jan 28 2016 04:12
@pranavdoshi more like, all prime numbers up to the argument.
chriscchristensen
@chriscchristensen
Jan 28 2016 04:12
The funny/messed up part @Elifaz is that I have already finished the course on
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:12
@chaitanyaashtekar wat happen?
chriscchristensen
@chriscchristensen
Jan 28 2016 04:12
Codeacademy.
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:13
@Elifaz yeah wait ur prog will change bit first and try to get prime numb first getting their sum will be easy.
Elifaz Filho
@Elifaz
Jan 28 2016 04:13
@chriscchristensen codecademy is a great place to learn, I also did twice the javascript course in there, the issue for me was that you can only go so far untill you feel forced to go pro account. Great place no doubt, just seems to be not enough..
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:13
@pranavdoshi i have posting it ..pig latin
chriscchristensen
@chriscchristensen
Jan 28 2016 04:14
Agreed @Elifaz
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:14
@chaitanyaashtekar didnt get u.
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:14
@chriscchristensen i have done codeacademy.it doesnt help that much you just do again the basic javascript section of fcc
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:14
@carmelo12341 wat happen??
chriscchristensen
@chriscchristensen
Jan 28 2016 04:15
There are strengths and weaknesses for both I feel. @chaitanyaashtekar
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:15

@pranavdoshi .pig latin.

function translate(str) {
    var a=str.charAt(0);
    if(a==="a"||a==="e"||a==="i"||a==="o"||a==="u"){
        str=str+"way";
    }else{
    str=str.slice(1)+a+"ay";}
    return str;
}

only doest work for translate("glove") should return "oveglay"...any help ??

Elifaz Filho
@Elifaz
Jan 28 2016 04:15
@chaitanyaashtekar on your else statement, you are slicing from char 1 and adding a which is str.charAt(0) + “ay” yeah, you can not go too far with this one, it will pass a few, try to elaborate for the slice area where you want to cut it out.
Tab_BLee
@ivanberry
Jan 28 2016 04:16
@KingHippo can't you get the "trees" with my code? and how did you fix it?
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:16
@chriscchristensen true.but if you havent already done codeacademy.it takes a lot of time but of fcc you can just revise it again
@Elifaz i didnt understand it??? it works for all other case..
Elifaz Filho
@Elifaz
Jan 28 2016 04:18
@chaitanyaashtekar so what is your issue then? is there any case that is not passing, like the glove one?
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:18

@Elifaz it says

translate("glove") should return "oveglay"

but shouldnt it return lovegay ??

chriscchristensen
@chriscchristensen
Jan 28 2016 04:18
I think that has helped me more than anything. I learn by repetition so having done codeacademy and the going through fcc has helped me a bit . @chaitanyaashtekar
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:19
@Elifaz no.every other case is passing .only the glove isnt
Elifaz Filho
@Elifaz
Jan 28 2016 04:19
@chaitanyaashtekar no, it should return oveglay because you are eliminating all consonant and adding it at the end that’s why your slice property ..method.. needs to be worked on a bit.

@pranavdoshi .pig latin.

function translate(str) {
    var a=str.charAt(0);
    if(a==="a"||a==="e"||a==="i"||a==="o"||a==="u"){
        str=str+"way";
    }else{
    str=str.slice(1)+a+"ay”;} // this piece of code is what is killing your function, 
here you are strictly slicing one character out of your argument, 
and adding it to the end with `ay`
    return str;
}

only doest work for translate("glove") should return "oveglay"...any help ??

chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:20
@Elifaz you mean i have to take all the letters until i find a vowel ?? ok will work on it
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:20
@Elifaz hey use a for loop to get numbers and within for loop hav condition mod to check for prime
Elifaz Filho
@Elifaz
Jan 28 2016 04:21

yeah, that’s what I tried, check it out

function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole = false;

  for (var x = 11; x < num; x++) {

    for (var i = 0; i <= primeHolder.length; i++) {

      if (x % primeHolder[i] === 0)
        pole = true;
      else
        pole = false;
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);

the if statement is checking it out...

chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:21
@Elifaz got it.thanks
CamperBot
@camperbot
Jan 28 2016 04:21
chaitanyaashtekar sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 355 | @elifaz | http://www.freecodecamp.com/elifaz
Elifaz Filho
@Elifaz
Jan 28 2016 04:22
@chaitanyaashtekar you got this!
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:22
:smile:
Elifaz Filho
@Elifaz
Jan 28 2016 04:22
@pranavdoshi there are probably some rule that I’m missing in here, or something very silly that is passing through
Pat Lee
@pleedesigner
Jan 28 2016 04:23
im working on: thick-green-border assignment. it says that Your img element should have the class thick-green-border.
Give your image a border width of 10px.
and here is my code:
.thin-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
why is not working?
<img class="thin-green-border smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Danny Johnson
@Djdev7
Jan 28 2016 04:25
you wrote thin-green-border instead of thick-green-border
alice3217
@alice3217
Jan 28 2016 04:25

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

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

  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

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

What should i do?

Danny Johnson
@Djdev7
Jan 28 2016 04:25
@pleedesigner
jpg8127
@jpg8127
Jan 28 2016 04:25
@alice3217 push and shift
Elifaz Filho
@Elifaz
Jan 28 2016 04:25
@pleedesigner instead of thin-green-border you are looking for thick-green-border that’s why you are getting the error
alice3217
@alice3217
Jan 28 2016 04:25
@jpg8127 how
Pat Lee
@pleedesigner
Jan 28 2016 04:25
oh haha
jpg8127
@jpg8127
Jan 28 2016 04:26
@alice3217 push will add something to the end of an array, and shift will remove the first element
Pat Lee
@pleedesigner
Jan 28 2016 04:26
@Elifaz thank you
CamperBot
@camperbot
Jan 28 2016 04:26
pleedesigner sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:star: 356 | @elifaz | http://www.freecodecamp.com/elifaz
jpg8127
@jpg8127
Jan 28 2016 04:26
@alice3217 use push on the array
Elifaz Filho
@Elifaz
Jan 28 2016 04:26
@Djdev7 thanks for helping him out.
CamperBot
@camperbot
Jan 28 2016 04:26
elifaz sends brownie points to @djdev7 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for djdev7
Elifaz Filho
@Elifaz
Jan 28 2016 04:26
@pleedesigner you got it!
alice3217
@alice3217
Jan 28 2016 04:26
@jpg8127 on the return part?
jpg8127
@jpg8127
Jan 28 2016 04:28
@alice3217 ?
Dien Dang
@diendang271
Jan 28 2016 04:28
hi everone
Pat Lee
@pleedesigner
Jan 28 2016 04:29
@Elifaz how to make border-radius of 50%?
alice3217
@alice3217
Jan 28 2016 04:29
 return push, shift;  // Change this line
}
is this what I should write? @jpg8127
Elifaz Filho
@Elifaz
Jan 28 2016 04:29
@alice3217 check out about shift and push on Mozilla Developer Network
jpg8127
@jpg8127
Jan 28 2016 04:29
@alice3217 push the array like this -->> arr.push(item);
@alice3217 that will push the item into the end of the array named arr from the function call
Elifaz Filho
@Elifaz
Jan 28 2016 04:30
@pleedesigner exactly like that
border-radius: 50% check if you are assigning it to the correct class or id.
Pat Lee
@pleedesigner
Jan 28 2016 04:30
@Elifaz cool thank you again!!
CamperBot
@camperbot
Jan 28 2016 04:30
pleedesigner sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
Blake
@Blakerton
Jan 28 2016 04:30
how do I make my link a deadlink with "#"??
CamperBot
@camperbot
Jan 28 2016 04:30
:warning: pleedesigner already gave elifaz points
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:32
guys I have a doubt i want to store random quotes along with author and it shoukd return quote along so how should i store.In array i can store quotes but how should i store author to corresponding quote.
Please answer this
Elifaz Filho
@Elifaz
Jan 28 2016 04:32
@Blakerton you are looking for anchor tags instead of putting the website you will place it with the # that you want.
@pleedesigner no prob. keep it up!
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:33
@pranavdoshi idk.maybe make a array of object ?? or two diff arrays.same indexes for author and quote i think ??
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:34
can u give examples of both
Blake
@Blakerton
Jan 28 2016 04:34
Thank you!
Darius
@ensyde
Jan 28 2016 04:34
@pranavdoshi I'm thinking just an object
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:34
i am not understanding even my friend suggested arrays of object
Elifaz Filho
@Elifaz
Jan 28 2016 04:34
@pranavdoshi how about you create an object, with arrays as values of number keys
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:34
but i am confused when to use objects,arrays of objects and arrays
Shahid Foy
@shahidfoy
Jan 28 2016 04:34
@pranavdoshi put the authors the the same order of the quote array that they are associated with
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:34
guys if u give answer plzz suggest it wid example
Elifaz Filho
@Elifaz
Jan 28 2016 04:35

such as

var quotes  = { 
   1 : [quote, author],
   2 : [quote, author] 
}

and so forth...

Pranav Doshi
@pranavdoshi
Jan 28 2016 04:36
@Elifaz how to access den?
@shahidfoy and @ensyde and @chaitanyaashtekar how do u suggest guys
plzz give example
but i am confused when to use objects,arrays of objects and arrays
Elifaz Filho
@Elifaz
Jan 28 2016 04:37
@pranavdoshi then work your way through to iterate through the object keys using the Math method.
to access them you go by
quotes[1];
Shahid Foy
@shahidfoy
Jan 28 2016 04:37
@pranavdoshi
or you can try with two arrays
var quotes = [quote1, quote2, quote2]
var author = [author1, author2, author3]
when you call Math.random both should appear
cuz they are in the same array position
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:37
@pranavdoshi maybe with arrays.see the link .https://repl.it/Bh6R/0
Elifaz Filho
@Elifaz
Jan 28 2016 04:38
@shahidfoy great option..
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:38
yeah @shahidfoy
Shahid Foy
@shahidfoy
Jan 28 2016 04:38
or you can put both the quote and author in one array idk why no one does that
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:39
but wen i call math.random quote and author will return diff
Elifaz Filho
@Elifaz
Jan 28 2016 04:39
@shahidfoy I did that haha
var quotes = {
1 : ["Tom Landry", "Football is an incredible game. Sometimes it's so incredible, it's unbelievable.”],
}
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:39
@pranavdoshi
var quotes=["hjwebeb","wkebwe","wefwebj"];
var author=["author1","author1","author3"];

// quote on index 1 (i.e quotes[1] has author on index 1 (i.e author[1])

var i=Math.floor(Math.random()*quotes.length);
@pranavdoshi i think this will do
Darius
@ensyde
Jan 28 2016 04:40
would you still need to do + 1?
Elifaz Filho
@Elifaz
Jan 28 2016 04:40
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:40
yeah got it thanks @Elifaz @shahidfoy @chaitanyaashtekar
CamperBot
@camperbot
Jan 28 2016 04:40
pranavdoshi sends brownie points to @elifaz and @shahidfoy and @chaitanyaashtekar :sparkles: :thumbsup: :sparkles:
:star: 357 | @elifaz | http://www.freecodecamp.com/elifaz
Shahid Foy
@shahidfoy
Jan 28 2016 04:40
@Elifaz that one is awesome
CamperBot
@camperbot
Jan 28 2016 04:40
:star: 292 | @chaitanyaashtekar | http://www.freecodecamp.com/chaitanyaashtekar
:star: 354 | @shahidfoy | http://www.freecodecamp.com/shahidfoy
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:41
guys one quest plzz answer dis
when to use objects,arrays of objects and arrays
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:43
@pranavdoshi not fixed man .result can be achieved thought both---object arrays,multiple arrays. do what requires less number of code lines or makes easy access of elements
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:43
i am not asking abt the result
general i am asking
Elifaz Filho
@Elifaz
Jan 28 2016 04:43
@pranavdoshi Well, put simple array will store values, objects will store key and value pairs, with that you can assign a function as a value of a key. And do all sorts of things with it.
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:43
can u give me links to master objects arrays of objects
i feel i am weak
will have to master it
Elifaz Filho
@Elifaz
Jan 28 2016 04:44
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:44
i guess i have not used obajects more till now
Elifaz Filho
@Elifaz
Jan 28 2016 04:47
if anyone knows what the heck is going on on why is not outputing my prime numbers please raise your hand
function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole = false;

  for (var x = 11; x < num; x++) {

    for (var i = 0; i <= primeHolder.length; i++) {

      if (x % primeHolder[i] === 0)
        pole = true;
      else
        pole = false;
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:47
@Elifaz i i think he is asking how to decide what to implement(multiple array or object) if we can do both. @pranavdoshi right na ??
@Elifaz waypoint ???
Elifaz Filho
@Elifaz
Jan 28 2016 04:48
@chaitanyaashtekar Sum All Primes
HARISH PANDAMANENI
@harish436
Jan 28 2016 04:48
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Your p element should have the text "View more " (with a space after it).
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:48
@Elifaz you are way ahead of me man. im just at DNA pairing.
HARISH PANDAMANENI
@harish436
Jan 28 2016 04:49
can any one help.. am not able to complete this
Elifaz Filho
@Elifaz
Jan 28 2016 04:49
@chaitanyaashtekar is not working the way my head is thinking, and that is frustrating, I will figure it out tomorrow...
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:49
@Elifaz get the prime numbers first using the divisibility test
by %
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:50
@pranavdoshi i will tell you what i do. i code using both and see wht seems easy for me..if you do this again and again you will be able to decide
Elifaz Filho
@Elifaz
Jan 28 2016 04:50
@harish436 place your view more within the anchor tag, now is currently outside your anchor tag. Try reversing the order..<a href=“…”> outside, and <p> inside, with the message
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:50
@Elifaz its good to sleep on it. try fresh again in the morning.
Pranav Doshi
@pranavdoshi
Jan 28 2016 04:51
@chaitanyaashtekar wat u talking abt
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:52
nvm
Elifaz Filho
@Elifaz
Jan 28 2016 04:52
@chaitanyaashtekar yeah, that’s what the if statement inside the loop is doing, after I get the primes to add them up will be quick..I will look on boolean tomorrow to see if there is any rule that I’m missing...
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:52
@pranavdoshi just asking .how much have you finished.basic & intermediate algo done ?
Greg D
@mosaic-greg
Jan 28 2016 04:53
@Elifaz you seem pretty smart for a seven year old
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:53
@Elifaz wtf ? you are 7 ???
@mosaic-greg oh i get it.you are joking ?
Elifaz Filho
@Elifaz
Jan 28 2016 04:53
@mosaic-greg I was 7, 19 years ago. Now I’m a bit older than that hahha
Greg D
@mosaic-greg
Jan 28 2016 04:54
ok. nice hat :)
Elifaz Filho
@Elifaz
Jan 28 2016 04:54
best day ever -.-`
@mosaic-greg nice hat...
Greg D
@mosaic-greg
Jan 28 2016 04:55
thank you it's a hat day
Elifaz Filho
@Elifaz
Jan 28 2016 04:55
Guys, I will come back later, gotta go for my run, and think a bit about this exercise
Greg D
@mosaic-greg
Jan 28 2016 04:55
ok cya
Elifaz Filho
@Elifaz
Jan 28 2016 04:56
happy coding y'all
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 04:58
@Elifaz how much of intermediate algo have you done ?? any frontend projects ? I tried doing the projects but I just go blank. Should I do the bootstrap and jquery section again ?
Pranav Doshi
@pranavdoshi
Jan 28 2016 05:00
@chaitanyaashtekar not much dude
Stephen Zukowski
@zukethenuke
Jan 28 2016 05:00
After completing a challenge, is there a way to view how an expierenced programer would have completed it? If not, that would be a nice addition.
Pranav Doshi
@pranavdoshi
Jan 28 2016 05:00
will some time start properly fcc curriculum.
Greg D
@mosaic-greg
Jan 28 2016 05:01
@zukethenuke view the wiki entry for the challenge
fcc wiki has the best solutions
Shahid Foy
@shahidfoy
Jan 28 2016 05:01
@zukethenuke there are many paths one can take to arrive to the same solution
Greg D
@mosaic-greg
Jan 28 2016 05:01
usually multiple
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 05:01
@pranavdoshi okay.Dont get much time from clg ??
Greg D
@mosaic-greg
Jan 28 2016 05:02
wow so zen
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 05:02
@mosaic-greg sometimes the FCC solutions are way over my head
Greg D
@mosaic-greg
Jan 28 2016 05:06
@chaitanyaashtekar yah some things could do with more introduction before the harder challenges. which ones
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 05:08
@mosaic-greg for eg.if in my solution I use split join filter.. They use nested filter ,every, regular expressions .lol.heavy stuff
valerush
@valerush
Jan 28 2016 05:12
Somebody did "Return Early Pattern for Functions"
Tab_BLee
@ivanberry
Jan 28 2016 05:18
This message was deleted
This message was deleted
anyone can help me ?I am stuck in Profile Lookup!

function lookUp(firstName, prop){
// Only change code below this lin
  for(var i = 0; i < contacts.length; i++) {
    //for loops
    var name = contacts[i].firstName,
        value = contacts[i].prop;

    if(firstName === name){
      if(value) {
        return value;
      } else {
        return "No such property!";
      }

    }else {
      return "No such contact!";
    }

  }

}
// Change these values to test your functio
lookUp("Kristian", "lastname");
Jonathan Castiblanco
@streetsworth
Jan 28 2016 05:21
GREETINGS ALL, STUCK IN Use a CSS Class to Style an Element
im having a difficult time understanding this part
Naveen
@naveenkumarkg
Jan 28 2016 05:28
@streetsworth can submit your code here so I can see it to help you
valerush
@valerush
Jan 28 2016 05:29
hi I have Return Early Pattern for Functions

and the code is '''function abTest(a, b) {
// Only change code below this line
if (a < 0) return " ";

// 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 28 2016 05:30
:bulb: to format code use backticks! ``` more info
valerush
@valerush
Jan 28 2016 05:32
function abTest(a, b) {
  // Only change code below this line
  if (a < 0) return " "; 

  // 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);
can you help me guys
with Return Early Pattern for Functions
Cristián Berríos
@crisberrios
Jan 28 2016 05:34
ok
Pranav Doshi
@pranavdoshi
Jan 28 2016 05:34
dude @chaitanyaashtekar finished my grad working.
Cristián Berríos
@crisberrios
Jan 28 2016 05:34
what do you need to know @valerush ?
valerush
@valerush
Jan 28 2016 05:34
@crisberrios abTest(-2,2) should return undefined
and
abTest(2,-2) should return undefined
Cristián Berríos
@crisberrios
Jan 28 2016 05:35
oh... but you're returning a string
return " "
valerush
@valerush
Jan 28 2016 05:36
@crisberrios can you explain please!?
Cristián Berríos
@crisberrios
Jan 28 2016 05:36
you have the following code:
if(a < 0 ) return " ";
valerush
@valerush
Jan 28 2016 05:37
yes
Cristián Berríos
@crisberrios
Jan 28 2016 05:37
test expects undefined but it's getting " "
Jonathan Castiblanco
@streetsworth
Jan 28 2016 05:37

@navinkumarkg <style>
.blue-text {}
h2 {
color:red;
}
</style>

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

Cristián Berríos
@crisberrios
Jan 28 2016 05:37
so, what you are returning is not correct
Jonathan Castiblanco
@streetsworth
Jan 28 2016 05:38
<style>
  .blue-text {}
  h2 {
    color:red;
  }
</style>

<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>
Tab_BLee
@ivanberry
Jan 28 2016 05:38

seriously need help ! Stuck in this for a while


function lookUp(firstName, prop){
// Only change code below this lin
  for(var i = 0; i < contacts.length -1; i++) {
    //for loops

    var name = contacts[i].firstName,
        property = prop,
        value = contacts[i].property;

    if(firstName === name){
      if(value !== undefined) {
        return value;
      } else {
        console.log( "No such property!");
      }

    }else {
      console.log("No such contact!");
    }

  }

}
// Change these values to test your functio
lookUp("Kristian", "lastname");

I cant get the array property value with function arg. what the correct way?

DJ
@qualitymanifest
Jan 28 2016 05:38
@streetsworth so your class is .blue-text but the color is red? and you're not applying it anywhere in your HTML
Cristián Berríos
@crisberrios
Jan 28 2016 05:40
@ivanberry where are you defining contacts?
Tab_BLee
@ivanberry
Jan 28 2016 05:40
@streetsworth you need add a classname to HTML tag some like

<div class="blue-text">some stuff</div>
valerush
@valerush
Jan 28 2016 05:40
@crisberrios thanks got it
CamperBot
@camperbot
Jan 28 2016 05:40
valerush sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:star: 172 | @crisberrios | http://www.freecodecamp.com/crisberrios
Jamuna
@JamunaPurushotham
Jan 28 2016 05:40
How to Target the same element with multiple jQuery Selectors?
Tab_BLee
@ivanberry
Jan 28 2016 05:40
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:40
Hello
I need help with the beginner challenges
Tab_BLee
@ivanberry
Jan 28 2016 05:41
@crisberrios contacts here!
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:41
How to add a space after some text in the text of a paragraph
Cristián Berríos
@crisberrios
Jan 28 2016 05:41
@ivanberry remember that variables are not scoped in ES5, so all var definitions should be on top of the function.
@ivanberry so...
var name;

for(.....) {
name = xxxx;
}
Jaqcui
@JacquiKares
Jan 28 2016 05:43
Hello World
CamperBot
@camperbot
Jan 28 2016 05:43

welcome to FreeCodeCamp @JacquiKares!

Tab_BLee
@ivanberry
Jan 28 2016 05:43
@crisberrios thank you ,but I surely need a function scoped variables
CamperBot
@camperbot
Jan 28 2016 05:43
ivanberry sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:star: 173 | @crisberrios | http://www.freecodecamp.com/crisberrios
Cristián Berríos
@crisberrios
Jan 28 2016 05:44
if you want to "scope" value, you can do something like value = xxxx[i][prop] || null;
then if (value !== null)
Will G
@willgorham
Jan 28 2016 05:45
@venkateshprabhu2 which challenge are you having trouble with?
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:45
Shall I send a screen shot here?
Jamuna
@JamunaPurushotham
Jan 28 2016 05:45
<script>
$(document).ready(function() {
$("button").addClass("animated shake");
$(".btn").addClass("animated shake");
$("#target1").addClass("animated shake");
});
</script>
Need Help
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:45
"Nest an anchor element within a paragraph" @willgorham
DJ
@qualitymanifest
Jan 28 2016 05:46
@venkateshprabhu2 just paste your code
Will G
@willgorham
Jan 28 2016 05:46
@JamunaPurushotham What errors are you getting?
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:46

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<p><a href="http://www.freecatphotoapp.com">cat photos</a>View more </p>

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

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

DJ
@qualitymanifest
Jan 28 2016 05:46
@JamunaPurushotham you only need to add one class for each one. if i remember correctly they should be animated, shake, and btn-primary
Jamuna
@JamunaPurushotham
Jan 28 2016 05:47
@willgorham This one "Only add one class with each of your three selectors."
Tab_BLee
@ivanberry
Jan 28 2016 05:47
@crisberrios I cant get the value of array with function arg by using dot? is this right?
DJ
@qualitymanifest
Jan 28 2016 05:47
@JamunaPurushotham the reason for this is that .btn is a button so it will already have animated, and #target1 is a button with the class .btn so it will already have animated and shake
Tab_BLee
@ivanberry
Jan 28 2016 05:47
@crisberrios must usr [xxx]?
Will G
@willgorham
Jan 28 2016 05:48
@venkateshprabhu2 you need 'View more' to come before the <a> tag, not after
DJ
@qualitymanifest
Jan 28 2016 05:48
@venkateshprabhu2 it should be "View more cat photos". you have "cat photos View more"
venkatesh prabhu
@venkateshprabhu2
Jan 28 2016 05:48
Oh.. alright. Thanks @willgorham
CamperBot
@camperbot
Jan 28 2016 05:48
venkateshprabhu2 sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:star: 454 | @willgorham | http://www.freecodecamp.com/willgorham
Cristián Berríos
@crisberrios
Jan 28 2016 05:49
@ivanberry you can, just a more versatile syntax in some cases, but the same in this case
Jamuna
@JamunaPurushotham
Jan 28 2016 05:49
@qualitymanifest which class should i add?
DJ
@qualitymanifest
Jan 28 2016 05:50
@JamunaPurushotham i just told you, and it's in the instructions. the first one gets animated, the second one gets shake, the third one gets btn-primary
Tab_BLee
@ivanberry
Jan 28 2016 05:50
@crisberrios get it! I will try to fix my problem
Cristián Berríos
@crisberrios
Jan 28 2016 05:50
@ivanberry but if you want "property" you must use that syntax, otherwise what you're doing is search for "property" instead of the actual variable
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 05:51
@pranavdoshi okay !
Cristián Berríos
@crisberrios
Jan 28 2016 05:51
so... a.property will search for {"property": true}
and a[property] will go to whatever string is in the variable "property", which I believe is what you're trying to do.
Tab_BLee
@ivanberry
Jan 28 2016 05:52
@crisberrios yeah, yah
with my code the name is undefined? I cant understand ! @crisberrios .
function lookUp(firstName, prop){
// Only change code below this lin
  for(var i = 0; i < contacts.length -1; i++) {
    //for loops

    var name = contacts[i][firstName],
        value = contacts[i][prop];

    if(firstName === name){
      if(value !== undefined) {
        return value;
      } else {
        console.log( "No such property!");
      }

    }else {
      console.log("No such contact!");
    }

  }
Minhazul Islam
@Minhazul-islam
Jan 28 2016 05:56
I am on Counting Card. My code below. Plz help
var count = 0;
var myStr = "";

function cc(card) {
  // Only change code below this line
  switch( card){
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    count++;
    myStr = "5 Bet";
     break;

    case 7:
    case 8:
    case 9:
      myStr = "0 Hold";
      break;
    case 10:
    case "J":
    case "Q":
    case "K":
      myStr = "-5 Hold";
      break;
    case 3:
    case 2:
    case "A":
    case 10:
      myStr = "-1 Hold";
      break;


  }

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

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
Cristián Berríos
@crisberrios
Jan 28 2016 05:57
@ivanberry now you changed both.
Tab_BLee
@ivanberry
Jan 28 2016 05:58
@crisberrios with dot, the name can get the value, but [prop] did not
Cristián Berríos
@crisberrios
Jan 28 2016 05:58
@ivanberry you need name to point to contacts[i].firstName, since you want the value and it will always be in "firstName". Then you want a dynamic prop, so for that one you want the brackets syntax
still, you need to move variable declarations to the beginning of the function.
Will G
@willgorham
Jan 28 2016 05:59
@Minhazul-islam inside your siwtch statement you shouldn't be changing myStr, just incrementing or decrementing the count
you've also doubled cases for 2,3,10,
lpix
@lpix
Jan 28 2016 06:01
Hi @Minhazul-islam , I haven't done this exercise but I noticed your spacing of myStr, count and break are inconsistent with the rest...maybe that is the problem?
Tab_BLee
@ivanberry
Jan 28 2016 06:01
@crisberrios Thanks for your patinet
```js
CamperBot
@camperbot
Jan 28 2016 06:01
ivanberry sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:warning: ivanberry already gave crisberrios points
Will G
@willgorham
Jan 28 2016 06:01
The spacing doesn't really matter to be honest
Tab_BLee
@ivanberry
Jan 28 2016 06:02
@crisberrios I have moved it to the beginning, but the value still undefined; sry
Will G
@willgorham
Jan 28 2016 06:03
@Minhazul-islam You need three case 'groups'. the first one (2,3,4,5,6) and second one (7,8,9) are ok. The third should be 10, J, K, Q, A. and you shouldn't have a fourth group
Minhazul Islam
@Minhazul-islam
Jan 28 2016 06:05
@willgorham @lpix Thnx guys for ur valuable response. Could u plz tell me that how can I return string "Bet" and "Hold". I am confused here.
CamperBot
@camperbot
Jan 28 2016 06:05
minhazul-islam sends brownie points to @willgorham and @lpix :sparkles: :thumbsup: :sparkles:
:star: 455 | @willgorham | http://www.freecodecamp.com/willgorham
Tab_BLee
@ivanberry
Jan 28 2016 06:07
undefined
@crisberrios
Will G
@willgorham
Jan 28 2016 06:08
@Minhazul-islam In the switch statement you should only be incrementing or decrementing 'count', not changing myStr. Then after the switch, you can check the value of count, e.g.
if (count > 0) {
//do stuff
}
else if (count === 0) {
// do other stuff
}
else {
//do the last stuff
}
Tab_BLee
@ivanberry
Jan 28 2016 06:08
@crisberrios but I try contacts[i]["lastName'], it works
Minhazul Islam
@Minhazul-islam
Jan 28 2016 06:09
@willgorham Thnx now i got it.
CamperBot
@camperbot
Jan 28 2016 06:09
minhazul-islam sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:warning: minhazul-islam already gave willgorham points
Cristián Berríos
@crisberrios
Jan 28 2016 06:09
I was going to tell you that
it's a typo
there's no "lastname" property, only "lastName"
Will G
@willgorham
Jan 28 2016 06:09
@Minhazul-islam :+1: nice
Tab_BLee
@ivanberry
Jan 28 2016 06:11
@crisberrios :worried: Thank your sincerely
CamperBot
@camperbot
Jan 28 2016 06:11
ivanberry sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:warning: ivanberry already gave crisberrios points
Cristián Berríos
@crisberrios
Jan 28 2016 06:12
np :)
Tab_BLee
@ivanberry
Jan 28 2016 06:13
@crisberrios but now I want check for loops , it failed
lpix
@lpix
Jan 28 2016 06:14
@Minhazul-islam :worried: sorry, I can't help you there
Drew Luper
@LupDre
Jan 28 2016 06:17
hello there!
need help w/ the "Stand in Line" problem, please.
DJ
@qualitymanifest
Jan 28 2016 06:18
@LupDre do you have any code for it
Drew Luper
@LupDre
Jan 28 2016 06:18
there's nothing in the Mozilla Dev Net about queues so i'm wondering if the solution is using an array method.
DJ
@qualitymanifest
Jan 28 2016 06:18
@LupDre you need to use .push() and .shift()
@LupDre you will .push() item into the array. that adds item onto the end of the array. .shift() removes the first part of the array if used alone - or if you assign it to a variable or return it, it will give you the first part of the array.
Minhazul Islam
@Minhazul-islam
Jan 28 2016 06:21
@lpix It's alright man.I liked ur response and I hope u will be able to help in future.
Drew Luper
@LupDre
Jan 28 2016 06:26
@qualitymanifest thx! still working on it.
CamperBot
@camperbot
Jan 28 2016 06:26
lupdre sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 847 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Aaron Keisler
@brityank
Jan 28 2016 06:30
https://gyazo.com/8bcaade32e6681f3de83eb94c187121c
having a bit of trouble with this one
lpix
@lpix
Jan 28 2016 06:31
@Minhazul-islam :+1: will do
Drew Luper
@LupDre
Jan 28 2016 06:32

function queue(arr, item) {
// Your code here
testArr.push(item).shift();
return queue; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

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

I don't know what i'm doing wrong here...

DJ
@qualitymanifest
Jan 28 2016 06:32
@brityank don't put checkprop in quotation marks. when you do it treats it as a string, instead of a variable
Aaron Keisler
@brityank
Jan 28 2016 06:33
ah that makes sense.
it’s still not functioning.
Drew Luper
@LupDre
Jan 28 2016 06:33
MDN is no help whatsoever.
DJ
@qualitymanifest
Jan 28 2016 06:33
@LupDre you need to use arr, the one that was passed into the function here function queue(arr, item)
@LupDre and it's a two step thing, you push item into arr, then you return the shift of arr
@LupDre MDN is fantastic it's just very hard to read when you start out
Aaron Keisler
@brityank
Jan 28 2016 06:35

'// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};
function checkObj(checkProp) {
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return "Change Me!";
}
}

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

`// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};
function checkObj(checkProp) {
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return "Change Me!";
}
}

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

Enrique Cahua
@enriquecahua
Jan 28 2016 06:35
wiki format
CamperBot
@camperbot
Jan 28 2016 06:35

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Drew Luper
@LupDre
Jan 28 2016 06:36
I've done a problem with these methods before on here and the instructions were a bit more clear than this problem
DJ
@qualitymanifest
Jan 28 2016 06:36
@brityank is it still not working? if so send the link
I stuck in here :worried:
Enrique Cahua
@enriquecahua
Jan 28 2016 06:37
@ivanberry that one was tough
Aaron Keisler
@brityank
Jan 28 2016 06:38
@qualitymanifest still not working. trying to paste the code in here, but not quite getting the markdown right.
Tab_BLee
@ivanberry
Jan 28 2016 06:38
if for while do--while , That's petty... You konw what I want to say @enriquecahua
DJ
@qualitymanifest
Jan 28 2016 06:38
@brityank just paste your URL. i don't remember what exactly this challenge requires
Aaron Keisler
@brityank
Jan 28 2016 06:39
@qualitymanifest wait figured it out. wasn’t changing the else return to "Not Found"
thanks for your help!
Drew Luper
@LupDre
Jan 28 2016 06:39
function queue(arr, item) {
  // Your code here
  arr.push(item).shift();
  return arr;  // Change this line
}
still not working
Enrique Cahua
@enriquecahua
Jan 28 2016 06:39
@ivanberry I do not compute
@ivanberry lets see your code
Drew Luper
@LupDre
Jan 28 2016 06:41
maybe i'm doing the return correctly?
Viraj Nandoskar
@virajbnandoskar
Jan 28 2016 06:42
HI I am faing errors
@enriquecahua
Viraj Nandoskar
@virajbnandoskar
Jan 28 2016 06:42
Nest your text input element within a form element.
DJ
@qualitymanifest
Jan 28 2016 06:42
@LupDre it's a two step thing... in the first step, you push item into arr. in the second step, you return the result of arr.shift()
Drew Luper
@LupDre
Jan 28 2016 06:42
okay, i've done step one...
Enrique Cahua
@enriquecahua
Jan 28 2016 06:43
@ivanberry highlight your entire code, when the menu to copy and paste comes up choose copy as pretty code, paste it here
DJ
@qualitymanifest
Jan 28 2016 06:43
@LupDre https://repl.it/Bh7V hit the run button to see it work
Tab_BLee
@ivanberry
Jan 28 2016 06:45
@enriquecahua Thanks. it's the logical problem, I want some try by myself
CamperBot
@camperbot
Jan 28 2016 06:45
ivanberry sends brownie points to @enriquecahua :sparkles: :thumbsup: :sparkles:
:star: 317 | @enriquecahua | http://www.freecodecamp.com/enriquecahua
Enrique Cahua
@enriquecahua
Jan 28 2016 06:45
okay
Tab_BLee
@ivanberry
Jan 28 2016 06:46
@enriquecahua it's about the logical but not js syntax error, Thank you
CamperBot
@camperbot
Jan 28 2016 06:46
ivanberry sends brownie points to @enriquecahua :sparkles: :thumbsup: :sparkles:
:warning: ivanberry already gave enriquecahua points
Drew Luper
@LupDre
Jan 28 2016 06:48
function queue(arr, item) {
  // Your code here
  arr.push(item);
  return arr.shift();  // Change this line
}
still not working.
Enrique Cahua
@enriquecahua
Jan 28 2016 06:51
@virajbnandoskar your form elemeents are out of place
Brian
@sludge256
Jan 28 2016 06:51
@LupDre refresh the page
Drew Luper
@LupDre
Jan 28 2016 06:52
@sludge256 thanks, that worked!
CamperBot
@camperbot
Jan 28 2016 06:52
lupdre sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1110 | @sludge256 | http://www.freecodecamp.com/sludge256
Drew Luper
@LupDre
Jan 28 2016 06:54
what the heck?
Brian
@sludge256
Jan 28 2016 07:11
?
need some help, I cant achieve the goal
function lookUp(firstName, prop){
// Only change code below this line
var name, value;
    for (var i = 0; i < contacts.length; i++) {
        name = contacts[i].firstName;
        value = contacts[i][prop];
    }

if (firstName === name) {
    if (value !== undefined) {
        return value;
    }else {
        return "No Such property!";
    }
}else {
    return "No suck contact!";
}


// Only change code above this line
}

// Change these values to test your function
lookUp("Akira", "likes")
the "i" always be 4
Will G
@willgorham
Jan 28 2016 07:21
@ivanberry think about your for loop and what the values of things are when it ends
you loop through it resetting name and value each time without using those variables
Tab_BLee
@ivanberry
Jan 28 2016 07:22
yeah I know the for loop is failed, but I cant get another one to fix this
:worried:
@willgorham give me some tips thanks
CamperBot
@camperbot
Jan 28 2016 07:23
ivanberry sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:star: 456 | @willgorham | http://www.freecodecamp.com/willgorham
Tab_BLee
@ivanberry
Jan 28 2016 07:24
@willgorham how can i fix this wisely?
Will G
@willgorham
Jan 28 2016 07:24
one sec, I need to look at what the challenge is asking
@willgorham
@willgorham maybe easy one But I am stucked.
Will G
@willgorham
Jan 28 2016 07:27
ok, it's late and I'm tired so this definitely won't be the most efficient solution, haha, but here we go:
Tab_BLee
@ivanberry
Jan 28 2016 07:27
@willgorham let me punch it!
Ciprian
@Cipriot
Jan 28 2016 07:31
Hello friends!!!
Will G
@willgorham
Jan 28 2016 07:31
first you need to check if the contact exists, right? so loop through the 'contacts' array (like you're doing), and if contacts[i].firstName equals the firstName parameter you should then do your conditional
Tab_BLee
@ivanberry
Jan 28 2016 07:31
@willgorham I try to set the fisrtName or prop to be an array, but failed
if nest condition
Will G
@willgorham
Jan 28 2016 07:33
something like this:
for (var i = 0; i < contacts.length; i++) {
 if (contacts[i].firstName === firstName) {
 //you found it - do stuff
 }
}
//if you get here (outside the loop) you didn't find it
// so return 'No such contact'
Tab_BLee
@ivanberry
Jan 28 2016 07:34
if nest condition "if" in the "for" loop , it cant get the correct answer, because... sorry I dont know
I am trying
Will G
@willgorham
Jan 28 2016 07:34
no worries! coding is hard
the goal is to step through the 'contacts' array and check if each one is the contact you're looking for
does that make sense so far?
Tab_BLee
@ivanberry
Jan 28 2016 07:35
secs trying
Will G
@willgorham
Jan 28 2016 07:37
I think it's confusing that they use firstName as a key in the contacts array, and as a parameter for the function, ah well
Tab_BLee
@ivanberry
Jan 28 2016 07:38
maybe we want make a issue to the reposi
@willgorham sorry for late
function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i][prop] !== undefined) {

        return contacts[i][prop];

    }else {

        return "No Such property!";
    }
}
  //loop ends
  return "No such contact!";
}

}
// Change these values to test your function
lookUp("Akira", "likes");
yeah It will return a Array with the function arg "like".
Will G
@willgorham
Jan 28 2016 07:45
Think about when i=0
the first time through the loop
Tab_BLee
@ivanberry
Jan 28 2016 07:45

@willgorham somechange

function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i][prop] !== undefined) {

        return contacts[i][prop];

    }else {

        return "No Such property!";
    }
}
}
  //loop ends
  return "No such contact!";
}

// Change these values to test your function
lookUp("Akira", "likes");

and the first three goal achieve

when i = 0 , the firstName(arg) matchs the contacts[0].firstName. so it's OK
Will G
@willgorham
Jan 28 2016 07:48
yeah, ignore that, I read the wrong thing
you should use .hasOwnProperty(prop) instead of !== undefined
Tab_BLee
@ivanberry
Jan 28 2016 07:48
get return a Array of contackts[0].likes
still there
function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i].hasOwnProperty(prop)) {

        return contacts[i][prop];

    }else {

        return "No Such property!";
    }
}
}
  //loop ends
  return "No such contact!";
}

// Change these values to test your function
lookUp("Akira", "likes");
Will G
@willgorham
Jan 28 2016 07:51
yes, it's functionally the same for this problem, but it's better in practice becasue a property could be present but set to undefined
@ivanberry remove the exclamation points from no such contact / no such property
Tab_BLee
@ivanberry
Jan 28 2016 07:52
yeah , Remeber it!
Will G
@willgorham
Jan 28 2016 07:53
and change Such to such
Tab_BLee
@ivanberry
Jan 28 2016 07:55
use,
Will G
@willgorham
Jan 28 2016 07:55
@ivanberry remove the exclamation points from no such contact / no such property
and change Such to such
the rest of your code is ok
Tab_BLee
@ivanberry
Jan 28 2016 07:57
just delete them all?
Will G
@willgorham
Jan 28 2016 07:57
these guys: !
you don't need them
Tab_BLee
@ivanberry
Jan 28 2016 07:57
done
sry for my unclever
function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i].hasOwnProperty(prop)) {

        return contacts[i][prop];

    }
}
}

}
SergeyWebDeveloper
@SergeyWebDeveloper
Jan 28 2016 07:58
Screenshot_1.png
Will G
@willgorham
Jan 28 2016 07:58
@ivanberry no, don't delete the whole line
SergeyWebDeveloper
@SergeyWebDeveloper
Jan 28 2016 07:58
gues,please help me
Will G
@willgorham
Jan 28 2016 07:59
change return 'No such contact! to return 'No such contact'
SergeyWebDeveloper
@SergeyWebDeveloper
Jan 28 2016 07:59
what's wrong
Tab_BLee
@ivanberry
Jan 28 2016 08:00
function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i].hasOwnProperty(prop)) {

        return contacts[i][prop];

    }else {

        return "No such property!";
    }
}
}
  //loop ends

}
@willgorham
budimanfix
@budimanfix
Jan 28 2016 08:01

would you give the answer for this one? what i miss here?```html

<form action="/submit-cat-photo">
<div class="col-xs-6"> <label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6"> <label><input type="radio" name="indoor-outdoor"> Outdoor</label></div>

```

Tab_BLee
@ivanberry
Jan 28 2016 08:01
poor English here
@budimanfix "```html" to another line
Will G
@willgorham
Jan 28 2016 08:02
@ivanberry
function lookUp(firstName, prop){
// Only change code below this line

for (var i = 0; i < contacts.length; i++) {
  //loop
if (contacts[i].firstName === firstName) {
    if (contacts[i].hasOwnProperty(prop)) {

        return contacts[i][prop];

    }else {

        return "No such property"; // I changed this line
    }
}
}
  //loop ends
  return "No such contact"; // I changed this line too
}

// Change these values to test your function
lookUp("Akira", "likes");
Tab_BLee
@ivanberry
Jan 28 2016 08:03
@willgorham remove the "!" ?:clap:
wow, why ? it works
Will G
@willgorham
Jan 28 2016 08:03
because that's what they ask you to return in the instructions
Tab_BLee
@ivanberry
Jan 28 2016 08:04
the ! is such a bad boy!
Will G
@willgorham
Jan 28 2016 08:04
@budimanfix what is the title of the challenge?
Tab_BLee
@ivanberry
Jan 28 2016 08:04
@willgorham Thank you sooooooooooooooooooooooo much
CamperBot
@camperbot
Jan 28 2016 08:04
ivanberry sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:warning: ivanberry already gave willgorham points
Tab_BLee
@ivanberry
Jan 28 2016 08:06
@budimanfix show your title of challenge here
Don't tell me alone, someone else can help you , I am new newbie
sanwalatta
@sanwalatta
Jan 28 2016 08:13
any body help me left-well element should have a red background.
tatenda hillary makuwerere
@tmhillary
Jan 28 2016 08:15
anybody help me, is it possible to put an image url and a class for adjusting image pixels in the same img element
i'm failing to put an image of 100 px but my browser is at 100% zoom
Tab_BLee
@ivanberry
Jan 28 2016 08:21
@tmhillary show the code may be helpfull for us
sanwalatta
@sanwalatta
Jan 28 2016 08:23
@ivanberry
$("#left-well").css("background-color", "red"); is not working well
tatenda hillary makuwerere
@tmhillary
Jan 28 2016 08:24

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

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

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
.smaller-image{
width:100px;
} ///this is the class to reduce the image to 100px
</style>

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

<img src="https://bit.ly/fcc-relaxing-cat"> ////this is the image
<img class="smaller-image"> ////this is where i call the class

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

just highlighted the areas with forward slashes
Tab_BLee
@ivanberry
Jan 28 2016 08:28
@tmhillary your .smaller-image element did not have a src url?
@sanwalatta code are correct ,maybe YOU HTML or else demo
budimanfix
@budimanfix
Jan 28 2016 08:51
Pranjal Singh
@pr4njal
Jan 28 2016 08:51
@tmhillary you have to put your class in src...
<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" >
budimanfix
@budimanfix
Jan 28 2016 08:52
<div> <div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4"> 
  <label><input type="checkbox" name="personality"> Lazy</label>
  </div>

  <div class="col-xs-4">
    <label><input type="checkbox" name="personality"> Crazy</label>
 </div>
Wich <div i miss here guy??
Pranjal Singh
@pr4njal
Jan 28 2016 08:53
@budimanfix not here but may be somewhere in upper code.. Try to check your code from the top

@budimanfix

<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>

  <div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
  </div>

  <div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
  </div>

</div>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>

Ashish Srivastava
@fortcollinsashish
Jan 28 2016 09:00
How should I nest the form into my script?
<form action="/submit-cat-photo"? <input type="text" placeholder="cat photo URL">
</form>
tatenda hillary makuwerere
@tmhillary
Jan 28 2016 09:00
@ivanberry i got it ,thanks
CamperBot
@camperbot
Jan 28 2016 09:00
tmhillary sends brownie points to @ivanberry :sparkles: :thumbsup: :sparkles:
:star: 51 | @ivanberry | http://www.freecodecamp.com/ivanberry
budimanfix
@budimanfix
Jan 28 2016 09:12
@pr4njal Thank you
CamperBot
@camperbot
Jan 28 2016 09:12
budimanfix sends brownie points to @pr4njal :sparkles: :thumbsup: :sparkles:
:star: 228 | @pr4njal | http://www.freecodecamp.com/pr4njal
Luis
@zdrifted
Jan 28 2016 09:13
<script $(document).ready(function() { });> </script> Hmm it's not accepting this code
Pranjal Singh
@pr4njal
Jan 28 2016 09:15

@Rushh This is because you are writing the script inside tag without closing it..

<script $(document).ready(function() { });> </script>

you have to write like this:

<script> $(document).ready(function() {
}); </script>

@fortcollinsashish Please explain your problem
Luis
@zdrifted
Jan 28 2016 09:18
Oh I thought that is what they wanted me to do. I misunderstood the directions. Thank you!
Man I must be tired
Aakash Yadav
@crypterx
Jan 28 2016 09:21
i cant run the code
what to do...
Pranjal Singh
@pr4njal
Jan 28 2016 09:23
@crypterx which one?
Shahriar raju
@Rajudevo
Jan 28 2016 09:23
114 jquery help plz
Pranjal Singh
@pr4njal
Jan 28 2016 09:23
@Rajudevo which one?
Shahriar raju
@Rajudevo
Jan 28 2016 09:24
114 step - Target the same element with multiple jQuery Selectors
Pranjal Singh
@pr4njal
Jan 28 2016 09:27
@Rajudevo so whats the problem?
Shahriar raju
@Rajudevo
Jan 28 2016 09:29
<script>
$(document).ready(function() {
$("button").addClass(animated);
$(".btn").addClass(shake);
$("#target1").addClass(animated shake btn-primary);

});
</script>

Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

Add the btn-primary class to the button with id #target1.

Pranjal Singh
@pr4njal
Jan 28 2016 09:30

@Rajudevo this is solution:

<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");
});
</script>

<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" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#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" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Tab_BLee
@ivanberry
Jan 28 2016 09:31
@Rajudevo you may try use the Markdown syntax html
<div>some stuff</div>
Shahriar raju
@Rajudevo
Jan 28 2016 09:33
Thanks @pr4njal
CamperBot
@camperbot
Jan 28 2016 09:34
rajudevo sends brownie points to @pr4njal :sparkles: :thumbsup: :sparkles:
:star: 231 | @pr4njal | http://www.freecodecamp.com/pr4njal
Aakash Yadav
@crypterx
Jan 28 2016 09:42

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

<h2 class=".red-text">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>

This message was deleted
This message was deleted
can't change h1 text to red
what's wrong
Tab_BLee
@ivanberry
Jan 28 2016 09:44
delete the dot
just add class="red-text"
<h2 class="red-text"></h2>
Pranjal Singh
@pr4njal
Jan 28 2016 09:48
@crypterx <h2 class="red-text">CatPhotoApp</h2>
Aakash Yadav
@crypterx
Jan 28 2016 10:10
thnku

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

<style>

.red-text
h {
color: red;font-family:Lobster;
}

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

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

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

how to change lobster font in h2

cannelflow
@cannelflow
Jan 28 2016 10:12
@crypterx which exercise?
you wrote only h in style
Manish Thakur
@manishth
Jan 28 2016 10:13
Hey guys
Aakash Yadav
@crypterx
Jan 28 2016 10:13
h2 is not working
cannelflow
@cannelflow
Jan 28 2016 10:13
@manishth hello
Manish Thakur
@manishth
Jan 28 2016 10:13
I was wondering if anyone could help me understand this:
"Only add one class with each of your three selectors." in the jQuery task "Target the same element with multiple jQuery Selectors"
I have added this in my code:
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("animated shake btn-primary");
});
cannelflow
@cannelflow
Jan 28 2016 10:14
@crypterx which ex?
@manishth Target the same element with multiple jQuery Selectors means you can selece any element by either class or is or by that element also
Aakash Yadav
@crypterx
Jan 28 2016 10:15
@cannelflow Import a Google Font
@cannelflow Your h2 element should use the font Lobster.(error) showing
@cannelflow im begineer
cannelflow
@cannelflow
Jan 28 2016 10:17
@manishth here you has added animated class $("button").addClass("animated"); to button selector so their you have to add only one class
@crypterx np
wiki format
CamperBot
@camperbot
Jan 28 2016 10:17

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

cannelflow
@cannelflow
Jan 28 2016 10:18
@crypterx remove .red-text
h {
color: red;font-family:Lobster;
}
it is like .red-text {
color: red;
}
then for adding font to h2 do like h2{font-family:ahk}
Aakash Yadav
@crypterx
Jan 28 2016 10:20
@cannelflow thanks.. :)
CamperBot
@camperbot
Jan 28 2016 10:20
crypterx sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 611 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Jan 28 2016 10:21
@crypterx :+1:
Manish Thakur
@manishth
Jan 28 2016 10:22
@cannelflow Thanks, I had to add only one class for each of the selectors. Thanks for your help :smile:
CamperBot
@camperbot
Jan 28 2016 10:22
manishth sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 612 | @cannelflow | http://www.freecodecamp.com/cannelflow
Aakash Yadav
@crypterx
Jan 28 2016 10:22
@cannelflow its the best platform to learn coding..i used to learn from w3schools.com
freecodecamp is best
cannelflow
@cannelflow
Jan 28 2016 10:23
@manishth :+1:
@crypterx yupp
like here at FCC if you have doubt you can ask
Aakash Yadav
@crypterx
Jan 28 2016 10:25
yeah...
Aakash Yadav
@crypterx
Jan 28 2016 10:43
@cannelflow are u on quora
cannelflow
@cannelflow
Jan 28 2016 10:47
any idea why it is displaying LATITUDE LONGITUDE data so late or it is slow net problem http://codepen.io/cannelflow/full/eJVjev/
@crypterx yes i read article their
bussiey
@bussiey
Jan 28 2016 10:57
hello world
CamperBot
@camperbot
Jan 28 2016 10:57

welcome to FreeCodeCamp @bussiey!

Josh Ghent
@joshghent
Jan 28 2016 11:06
Hey guys, working on the weather app zipline, do you have to just do a ton of ‘if’ statements to code around the different weather types?
Or is there some way to download a static DB you can search in?
Sarvashwa singh
@sarvashwa
Jan 28 2016 11:11
can anyone help me out with the 87 exercise of add font awesome
??????
HARISH PANDAMANENI
@harish436
Jan 28 2016 11:21
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

  .smaller-image {
    width: 100px;
  }

  .gray-background {
    background-color: gray;
  }
    #cat-photo-element {
  background-color: green;
}
  }


</style>

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<div class="gray-background">
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="/submit-cat-photo" id="cat-photo-form">

  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
Your form element should have the background-color of green.
can any one help about this topic
Ivan Temchur
@ttemcha
Jan 28 2016 11:23
try to remove last } @harish436
@harish436 oh you have different id's in css and html
#cat-photo-element {
  background-color: green;
}
<form action="/submit-cat-photo" id="cat-photo-form">
skyhitblog
@skyhitblog
Jan 28 2016 11:27

Last login: Thu Jan 28 03:10:13 on ttys000

-bash: /Users/avi/.bash_profile: line 1: syntax error near unexpected token then'

-bash: /Users/avi/.bash_profile: line 1:which rbenv > /dev/null; then eval "$(rbenv init -)"; fi'

MacBook-Pro:~ avi$

How can i fix this?

whenever i open terminal i see this
HARISH PANDAMANENI
@harish436
Jan 28 2016 11:30
@ttemcha thank you so much
CamperBot
@camperbot
Jan 28 2016 11:30
harish436 sends brownie points to @ttemcha :sparkles: :thumbsup: :sparkles:
:star: 187 | @ttemcha | http://www.freecodecamp.com/ttemcha
Ivan Temchur
@ttemcha
Jan 28 2016 11:31
@harish436 ur welcome
Sarvashwa singh
@sarvashwa
Jan 28 2016 11:47
@harish436 thx
CamperBot
@camperbot
Jan 28 2016 11:47
sarvashwa sends brownie points to @harish436 :sparkles: :thumbsup: :sparkles:
:star: 57 | @harish436 | http://www.freecodecamp.com/harish436
VladyslavKo
@VladyslavKo
Jan 28 2016 11:49
Hello everyone! i am novice in programming, can you help me how to do a dead link on HTML5? Where I need to put "#" symbol? Can you give me some example, please?
Ivan Temchur
@ttemcha
Jan 28 2016 11:50
<a href="#"></a>
@VladyslavKo влад
HARISH PANDAMANENI
@harish436
Jan 28 2016 11:50
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }

  .orange-text {
    color: orange;
  }


</style>
<h1 class="orange-text pink-text blue-text">Hello World!</h1>
Give your h1 element the id of orange-text.
Create a CSS declaration for your orange-text id
Ivan Temchur
@ttemcha
Jan 28 2016 11:52
<h1 id="orange-text">Hello World</h1>
HARISH PANDAMANENI
@harish436
Jan 28 2016 11:52
Your h1 element should have the class pink-text.
Your h1 element should have the class blue-text.
Give your h1 element the id of orange-text.
Create a CSS declaration for your orange-text id
Do not give your h1 any style attributes.
Your h1 element should be orange.
okay @ttemcha
Ivan Temchur
@ttemcha
Jan 28 2016 11:53
#orange-text {
}
HARISH PANDAMANENI
@harish436
Jan 28 2016 11:54
@ttemcha thank you i got
Raja Gopal
@smrajagopal
Jan 28 2016 11:56
Need help with my zipline. I have content but need to set the content right in the specific pages. Any inputs ?
VladyslavKo
@VladyslavKo
Jan 28 2016 12:00
got it, Thanks!
Timothy Odongkara
@borowest
Jan 28 2016 12:09
need help with targeting the same element with multiple Jquery selectors (clue of the format)
Abdul Awali
@awalthefirst
Jan 28 2016 12:09
@smrajagopal centering depends on different things. take a look at http://www.tipue.com/blog/center-a-div/
@borowest i like what exactly
Timothy Odongkara
@borowest
Jan 28 2016 12:24
failing to represent how to only add one class with each of the three selectors
prashant kumar
@prashantkumar484
Jan 28 2016 12:27
hello people. i have some problem with my project for local weather. The javascript code doesn't work as expected on codepen . But when i paste the js code in the html part in script tags, it starts working after one click
蒲公英の生活
@fewspider
Jan 28 2016 12:28
@prashantkumar484 some test code?
prashant kumar
@prashantkumar484
Jan 28 2016 12:30
the js part doesn't work . Here is the link, have a look
cannelflow
@cannelflow
Jan 28 2016 12:30
@prashantkumar484 what is noe working?
not
you used ip api
prashant kumar
@prashantkumar484
Jan 28 2016 12:31
the javascript code when put in javascript section on codepen, doesn't work
yes, ipinfo.io
蒲公英の生活
@fewspider
Jan 28 2016 12:32
屏幕快照 2016-01-28 20.32.16.png
@prashantkumar484 it seems the jquery problem.
prashant kumar
@prashantkumar484
Jan 28 2016 12:34
yeah, i also thought it to be the problem. should i include it in js section too??? because it didn't work when i included in html section
cannelflow
@cannelflow
Jan 28 2016 12:35
@prashantkumar484 i think it is working now http://codepen.io/cannelflow/full/ZQorWj/
Aakash Yadav
@crypterx
Jan 28 2016 12:37
@cannelflow what is the use of <div>
蒲公英の生活
@fewspider
Jan 28 2016 12:37
Aakash Yadav
@crypterx
Jan 28 2016 12:38
woow! cooll!!!!!
cannelflow
@cannelflow
Jan 28 2016 12:39
@crypterx its a tag just like any other
is not use but what you do inside div
@prashantkumar484 ??

@crypterx The HTML <div> tag is used for defining a section of your document. With the div tag, you can group large sections of HTML elements together and format them with CSS.

The difference between the div tag and the span tag is that the div tag is used with block-level elements whilst the span tag is used with inline elements.

Ulya Penguin
@Ulya07Penguin
Jan 28 2016 12:40
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUp(firstName, prop){
// Only change code below this line
for (var i=0; i<contacts.length; i++){
  for(var j=0; j<contacts.length; j++){

  if(firstName===firstName && contacts[i][j]===prop){
    return firstName;
  }

  else if(firstName!==firstName){
    return "No such contact";
  }
  else if( contacts[i][j]!==prop){
    return "No such property";
  }}
}
// Only change code above this line
}

// Change these values to test your function
lookUp("Akira", "address");
need help

he function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact.

If both are true, then return the "value" of that property.

If firstName does not correspond to any contacts then return "No such contact"

If prop does not correspond to any valid properties then return "No such property"

prashant kumar
@prashantkumar484
Jan 28 2016 12:44
@cannelflow it works the first time you load the page. It should respond on clicking the buttons C and F. But id doesn't. I have used onclick() to call the functions defined in js section
cannelflow
@cannelflow
Jan 28 2016 12:46
@prashantkumar484 its working but responding late http://codepen.io/cannelflow/full/ZQorWj/
w8 for some time
Markus Kiili
@Masd925
Jan 28 2016 12:47
@Ulya07Penguin One contact loop if enough. Then inside the loop you need two nested if clauses. Then just returns on proper places.
cannelflow
@cannelflow
Jan 28 2016 12:48
@prashantkumar484 im also working on same project now at only fetching location but sometimes this also takes time http://codepen.io/cannelflow/pen/eJVjev
蒲公英の生活
@fewspider
Jan 28 2016 12:50
@Ulya07Penguin try this
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUp(firstName, prop){
// Only change code below this line
    for (var x = 0; x < contacts.length; x++){
        if (contacts[x].firstName === firstName) {
            if (contacts[x][prop]) {
                return contacts[x][prop];
            } else {
                return "No such property";
            }
        }
    }
    return "No such contact";
// Only change code above this line
}

// Change these values to test your function
var rs = lookUp("Akira", "firstName");
console.log(rs);
Pekmen
@Pekmen
Jan 28 2016 12:51
thoughts? how to make this thing pretty? http://codepen.io/Pekmen/full/rxjxXP?editors=0100
Markus Kiili
@Masd925
Jan 28 2016 12:52
@fewspider if (contacts[x][prop]) doesn't actually test for property existence, so using hasOwnProperty is better.
cannelflow
@cannelflow
Jan 28 2016 12:52
@Pekmen take search box at center
蒲公英の生活
@fewspider
Jan 28 2016 12:52
@Masd925 nice,thanks a lot
CamperBot
@camperbot
Jan 28 2016 12:52
fewspider sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 837 | @masd925 | http://www.freecodecamp.com/masd925
prashant kumar
@prashantkumar484
Jan 28 2016 12:53
@cannelflow this method of getting location won't work if user declines the browser request. so i used ipinfo
Raja Gopal
@smrajagopal
Jan 28 2016 12:53
Here is my personal portfolio. How do I split content into specific pages ?
http://codepen.io/smrajagopal/full/WrovgW/
cannelflow
@cannelflow
Jan 28 2016 12:53
@prashantkumar484 yes it is but it is more accurate
Ulya Penguin
@Ulya07Penguin
Jan 28 2016 12:56
@fewspider @Masd925 thank you guys
CamperBot
@camperbot
Jan 28 2016 12:56
ulya07penguin sends brownie points to @fewspider and @masd925 :sparkles: :thumbsup: :sparkles:
:star: 16 | @fewspider | http://www.freecodecamp.com/fewspider
:star: 838 | @masd925 | http://www.freecodecamp.com/masd925
cannelflow
@cannelflow
Jan 28 2016 12:56
@prashantkumar484 your project worked ?
蒲公英の生活
@fewspider
Jan 28 2016 12:56
@Ulya07Penguin you are welcome
prashant kumar
@prashantkumar484
Jan 28 2016 12:58
@cannelflow nopes. i tried again. it gives the correct result the first time page loads. but on clicking the buttons , they are not responding.
cannelflow
@cannelflow
Jan 28 2016 12:59
?
@prashantkumar484 you tried my forked link
try changing browser
prashant kumar
@prashantkumar484
Jan 28 2016 13:00
@cannelflow
cannelflow
@cannelflow
Jan 28 2016 13:00
@prashantkumar484 ?
prashant kumar
@prashantkumar484
Jan 28 2016 13:01
@cannelflow yes your version worked fine
what did you change
cannelflow
@cannelflow
Jan 28 2016 13:02
not much added css & js cdn
you had js cdn twice
so try removing your cdn then add it again
may be that is not properly added
due to slow net connection
Blaze
@Blazephoenix
Jan 28 2016 13:03

http://codepen.io/Blazephoenix_/pen/OMvxew

I want the social icons to be listed horizontally, they list horizontally when I decrease the screen resolution but no at fullscreen, help!

rahul jha
@rahulsup30
Jan 28 2016 13:05
how to create monospace in p elements
Blaze
@Blazephoenix
Jan 28 2016 13:05
not*
prashant kumar
@prashantkumar484
Jan 28 2016 13:06
@cannelflow removing the $(document).ready helped
any reasons?
Josh Ghent
@joshghent
Jan 28 2016 13:10
Can anyone help me with my weather app? I don’t seem to be getting a valid return from the API call… http://codepen.io/joshghent/pen/BjxYxm
cannelflow
@cannelflow
Jan 28 2016 13:14
@prashantkumar484 i also noticed in ide writing function inside jquery won't work
thanhthele
@thanhthele
Jan 28 2016 13:31
can anyone help me! I don't know where to put <i class="fa fa-thumb-up"> inside Like Button
Piyush Danej
@piyushdanej
Jan 28 2016 13:31
hi guys , my div elements are alligned from centre half of the container div
any idea why is that happening ?
<div id = "four">
  <p>hello</p>
  <a href="#"><div class ="pall"></div></a>
  <a href="#"><div class ="pall"></div></a>
  <a href="#"><div class ="pall"></div></a>
  <a href="#"><div class ="pall"></div></a>

  </div>
#four{
  position: relative;
  top: 400px;
  border: 2px black dotted;
}
.pall{
  height: 100px;
  width: 100px;
  border : 2px blue solid;
  display: inline-block;
  position: ;

  }
#four p{
  font-size: 40px;
  float: left;
}
all the four .pall are being aligned from the centre half of the screen .
thanhthele
@thanhthele
Jan 28 2016 13:36
I am on section of Add Font Awesome Icon and don't know where to put <i class="fa fa-thumb-up" inside a button<button class="btn btn-block btn-primary"></button>. May anyone help me please!
Elifaz Filho
@Elifaz
Jan 28 2016 13:40
@chaitanyaashtekar I think I’m about in the middle, I haven’t gone through the intermediate zipline, but so far I found that by really exploring is how you can figure things faster, instead of learning a lot and then a applying, I start building and learning little by little on the go. It all changes depending on how you feel comfortable learning.
yellott
@yellott
Jan 28 2016 13:42
@thanhthele You should insert icon inside button tag.
@thanhthele Tell me if you have it done
Sanjeev Dhakal
@dhakalsanjeev
Jan 28 2016 13:50
How hard is JS for beginner ?
yellott
@yellott
Jan 28 2016 13:51
@dhakalsanjeev Not so hard as it may seems, if you don't start with its tricky part
budimanfix
@budimanfix
Jan 28 2016 13:51
yellott
@yellott
Jan 28 2016 13:51
@budimanfix What's up?
budimanfix
@budimanfix
Jan 28 2016 13:54

@yellott ```html

<button type="submit"><i class="fa fa-paper-plane"> Submit</i></button>
</form>
```

yellott
@yellott
Jan 28 2016 13:55
@budimanfix Submit should be outsite i tag
@budimanfix <button type="submit"><i class="fa fa-paper-plane"> </i> Submit </button>
budimanfix
@budimanfix
Jan 28 2016 13:57
@yellott Thank you :+1:
CamperBot
@camperbot
Jan 28 2016 13:57
budimanfix sends brownie points to @yellott :sparkles: :thumbsup: :sparkles:
:star: 176 | @yellott | http://www.freecodecamp.com/yellott
Kuuhaku722
@Kuuhaku722
Jan 28 2016 14:00

<input type="text" placeholder="cat photo URL">

<form action="/submit-cat-photo"></form>
how to nest the text input element within a form element ?

yellott
@yellott
Jan 28 2016 14:01
@Kuuhaku722 Insert input inside form tag
Manish Giri
@Manish-Giri
Jan 28 2016 14:01
@Kuuhaku722
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>
Kuuhaku722
@Kuuhaku722
Jan 28 2016 14:02
thx
HARISH PANDAMANENI
@harish436
Jan 28 2016 14:21
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

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

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

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
Create a new button element with the text "Like".
Your new button should have the class btn.
Make sure all your button elements have a closing tag
manibharathitn
@manibharathitn
Jan 28 2016 14:22
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

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

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

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
<button class="btn">Like</button>
HARISH PANDAMANENI
@harish436
Jan 28 2016 14:24
@manibharathitn thank u
CamperBot
@camperbot
Jan 28 2016 14:24
harish436 sends brownie points to @manibharathitn :sparkles: :thumbsup: :sparkles:
:star: 18 | @manibharathitn | http://www.freecodecamp.com/manibharathitn
heatherwerner15
@heatherwerner15
Jan 28 2016 14:27
can anyone help me with javascript? this is what they give me to start with
and this is the instructions "Write a function queue which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The queue function should then return the element that was removed." I have no idea what to do
function queue(arr, item) {
  // Your code here

  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
manibharathitn
@manibharathitn
Jan 28 2016 14:32
function queue(arr, item) {
// Your code here
arr.push(item);
var item = arr[0];
arr.shift();
return item; // Change this line
}
@can anyone help me with javascript? this is what they give me to start with
and this is the instructions "Write a function queue which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The queue function should then return the element that was removed." I have no idea what to do
@heatherwerner15
Elifaz Filho
@Elifaz
Jan 28 2016 14:32
@heatherwerner15 check out on MDN about array.prototype.shift() and array.prototype.push()
mohamed khatab
@mohamedkhatab
Jan 28 2016 14:33
??
Manish Giri
@Manish-Giri
Jan 28 2016 14:33
@manibharathitn use .push() to add item to the end of arr
@manibharathitn then use .shift() to remove the first element from arr
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 14:34
@Elifaz what ? u have said some thing abt and hour ago ?? i just came online.i cant understand the context
Elifaz Filho
@Elifaz
Jan 28 2016 14:34
@chaitanyaashtekar nothing much, just saying I’m at the middle of the intermediate bonfire, you asked me yesterday after I left.
DanishKalim
@DanishKalim
Jan 28 2016 14:35
function queue(arr, item) {
  // Your code here

  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

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

queue(2, 1) should return 2
queue([5,6,7,8,9], 1) should return 5
After queue(testArr, 10), myArr[4] should be 10

plz help

chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 14:35
@Elifaz for me its today (8:05 pm)still the same day.!!! did you complete it then ??
heatherwerner15
@heatherwerner15
Jan 28 2016 14:35
@manibharathitn thank you!
CamperBot
@camperbot
Jan 28 2016 14:35
heatherwerner15 sends brownie points to @manibharathitn :sparkles: :thumbsup: :sparkles:
:star: 21 | @manibharathitn | http://www.freecodecamp.com/manibharathitn
manibharathitn
@manibharathitn
Jan 28 2016 14:36
@heatherwerner15 :)
heatherwerner15
@heatherwerner15
Jan 28 2016 14:36
@DanishKalim lol what i was just asking
Elifaz Filho
@Elifaz
Jan 28 2016 14:36
@chaitanyaashtekar yeah, not yet. Still working on it.
heatherwerner15
@heatherwerner15
Jan 28 2016 14:36
@DanishKalim arr.push(item);
var item = arr[0];
arr.shift();
chaitanya ashtekar
@chaitanyaashtekar
Jan 28 2016 14:37
@Elifaz enjoy :-p.
Samantha Parker
@sparker22
Jan 28 2016 14:37
@manibharathitn This line: var item = arr[0]; did work so i took var out and it work (it said item was already defined. I understand the .push and .shift but what does that line mean exactly...? that each item entered in the array is at the beginning or end?
*didn't
Elifaz Filho
@Elifaz
Jan 28 2016 14:39
@sparker22 each item that you want to .push() into an array goes through the back, now if you want to push it at the beginning of the array you are probably looking for something like .unshift();, to remove out of the front of the array you are looking for .shift()
manibharathitn
@manibharathitn
Jan 28 2016 14:40
var is a js keyword that declares a variable
i made a mistake by defining the variable 'item' again.
@sparker22
Ramazani17
@Ramazani17
Jan 28 2016 14:41
i am new to coding but i just wanted to know how i can change a text color?
Samantha Parker
@sparker22
Jan 28 2016 14:41
Ok, I get it now
@manibharathitn thanks!
@Elifaz Thanks!
CamperBot
@camperbot
Jan 28 2016 14:41
sparker22 sends brownie points to @manibharathitn and @elifaz :sparkles: :thumbsup: :sparkles:
:star: 358 | @elifaz | http://www.freecodecamp.com/elifaz
:star: 23 | @manibharathitn | http://www.freecodecamp.com/manibharathitn
Elifaz Filho
@Elifaz
Jan 28 2016 14:43
@Ramazani17 just like that, you almost got it, it’s very intuitive:
color: green;
color: yellow;
color: blue;
color: dark-grey;
@Ramazani17 for more on font stylying, check this out
@sparker22 you got it, just an append to what I wrote up there, to remove an item out of the back of the array you then will be looking for .pop(),
Sarvashwa singh
@sarvashwa
Jan 28 2016 14:47
how to use the jquery addClass() function
in 111 ?????
Elifaz Filho
@Elifaz
Jan 28 2016 14:48
@sarvashwa check the example right at the beginning of the page.
Jerry R.
@Jerry8782
Jan 28 2016 14:48
quick question for you guys.. can i have something along the lines of
Conflict
@prusso
Jan 28 2016 14:49
@sarvashwa .addClass("class")
Jerry R.
@Jerry8782
Jan 28 2016 14:49
class = "whatever1","whatever2" or do i have to break it down like class="whatever1" class="whatever2"
Samantha Parker
@sparker22
Jan 28 2016 14:49
Yup I figured it out, thank you @Elifaz
CamperBot
@camperbot
Jan 28 2016 14:49
sparker22 sends brownie points to @elifaz :sparkles: :thumbsup: :sparkles:
:warning: sparker22 already gave elifaz points
Elifaz Filho
@Elifaz
Jan 28 2016 14:50
@Jerry8782 no you can do that, just skip the , in it, then you have something like class=" number1 number2 ”
Samantha Parker
@sparker22
Jan 28 2016 14:50
whoops lol btw for the golf code, with the par and strokes would it be easier to use chaining if statements or a switch statement?
Jerry R.
@Jerry8782
Jan 28 2016 14:50
ah cool, thanks
Conflict
@prusso
Jan 28 2016 14:50
@Jerry8782 you can do class="class1 class2"
Elifaz Filho
@Elifaz
Jan 28 2016 14:52
@sparker22 if feel switch could work well on that one.
Sarvashwa singh
@sarvashwa
Jan 28 2016 14:52
hey can you explain it pls @prusso
???
Conflict
@prusso
Jan 28 2016 14:52
There is an example right on the page
Sarvashwa singh
@sarvashwa
Jan 28 2016 14:53
but its showing syntax error
Conflict
@prusso
Jan 28 2016 14:53
Paste the code you wrote
Elifaz Filho
@Elifaz
Jan 28 2016 14:53
@sparker22 actually you will be evaluating scenarios, perhaps doing with if/if else would be the best way to go.
Sarvashwa singh
@sarvashwa
Jan 28 2016 14:54

<script>

$("button").addclass("animated bounce");


</script>

<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" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#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" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target addclass" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Conflict
@prusso
Jan 28 2016 14:54
Capitalize the C in addClass
slizzard00
@slizzard00
Jan 28 2016 14:54
Hello people :) Can someone help me? Im new in this camp and actually new also to the whole coding thing.
im stuck in the size your image
exercise
Jatin Parmar
@JatinParmar
Jan 28 2016 14:56
@slizzard00 what's the issue ?
Conflict
@prusso
Jan 28 2016 14:56
@sarvashwa $("button").addclass("animated bounce");
Should be addClass not addclass
slizzard00
@slizzard00
Jan 28 2016 14:57
Well it says the image should be at 100px wide and I already did that but it still says error
yellott
@yellott
Jan 28 2016 14:57
@slizzard00 show your html
Vivienne Sales
@Natto278
Jan 28 2016 14:57
Re: Targeting the Parent of an Element Using jQuery--> Can anyone explain to me why you DON'T use the parent() function to add a red background for the left well element?
slizzard00
@slizzard00
Jan 28 2016 14:57

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

<h2 class="red-text">CatPhotoApp</h2>
<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">

yellott
@yellott
Jan 28 2016 14:57
.smaller-image {
width: 100px;
}
Conflict
@prusso
Jan 28 2016 14:58
Add the .
yellott
@yellott
Jan 28 2016 14:58
classes starts with dot
slizzard00
@slizzard00
Jan 28 2016 14:58
Yeah that fixed it :) Thanks a loot guys
Samantha Parker
@sparker22
Jan 28 2016 14:58
@Elifaz alright I was just wondering which strategy to use
heatherwerner15
@heatherwerner15
Jan 28 2016 14:59
@sparker22 thank you!
CamperBot
@camperbot
Jan 28 2016 14:59
heatherwerner15 sends brownie points to @sparker22 :sparkles: :thumbsup: :sparkles:
:star: 231 | @sparker22 | http://www.freecodecamp.com/sparker22
yellott
@yellott
Jan 28 2016 14:59
@slizzard00 you're welcome
Samantha Parker
@sparker22
Jan 28 2016 14:59
No problem :D @heatherwerner15
Conflict
@prusso
Jan 28 2016 14:59
/nick spooktooth
Elifaz Filho
@Elifaz
Jan 28 2016 15:05
I keep looking at this code and I just don’t get it why is not working.
function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole;

  for (var x = 12; x < num; x++) {

    for (var i = 0; i < primeHolder.length; i++) {
      pole = (x % primeHolder[i] !== 0);
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);
by the way, before I get the sum of all primes I need to get them in the array that’s what I am doing on this code.
Sarvashwa singh
@sarvashwa
Jan 28 2016 15:06

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
});
$(document).ready(function(){$(".text-primary").addClass("animated shake");
});
</script>

<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" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#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" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

pls help to fix this
Elifaz Filho
@Elifaz
Jan 28 2016 15:07
@sarvashwa please use the formatting tool on gitter to paste your code.
``` one line before and after your code.
Conflict
@prusso
Jan 28 2016 15:09
@sarvashwa don't just paste your code and say "fix this". Explain where you are stuck and show that you at least tried yourself before asking for help.
Elifaz Filho
@Elifaz
Jan 28 2016 15:11
@prusso Check this out.
Is there any boolean rule that I’m missing on this code? The evaluation is not even throwing any number in the array. Strange behavior.
I keep looking at this code and I just don’t get it why is not working.
function sumPrimes(num) {
  var primeHolder = [2, 3, 5, 7, 11], pole;

  for (var x = 12; x < num; x++) {

    for (var i = 0; i < primeHolder.length; i++) {
      pole = (x % primeHolder[i] !== 0);
    }

    if (pole)
      primeHolder.push(x);

  }
    console.log(primeHolder);
}

sumPrimes(200);
Sarvashwa singh
@sarvashwa
Jan 28 2016 15:11
its saying to use addd jquery function to give the classes animated and shake to all your elements with the class well
Elifaz Filho
@Elifaz
Jan 28 2016 15:11
This message was deleted
Sarvashwa singh
@sarvashwa
Jan 28 2016 15:12
but i am unable to understand how
??
Conflict
@prusso
Jan 28 2016 15:14
@Elifaz the array is not even being populated?
Samantha Parker
@sparker22
Jan 28 2016 15:14
S**t...I'm so close lol Can anyone tell me why this won't work but it works..but doesn't work at the same time lol
function golfScore(par, strokes) {
  // Only change code below this line
  if (par, strokes === 1){
    return "Hole-in-one";
  } else if (par, strokes <= par - 2) {
    return "Eagle";
  } else if (par, strokes === par - 1) {
    return "Birdie";
  } else if (par, strokes === par) {
    return "Par";
  } else if (par, strokes === par + 1) {
    return "Bogey";
  } else if (par, strokes === par + 2) {
    return "Double Bogey";
  } else {
    return "Go Home!";

  }
  // Only change code above this line
}

// Change these values to test
golfScore(4, 1);
Elifaz Filho
@Elifaz
Jan 28 2016 15:16
@prusso yeah, is being populated with false which means on this case that all of the numbers are being restricted as incompatible to evaluation, there supposed to be only a few of them even if the request was wrong.
this is the output
2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106…]
Tamisha Wallace
@hautemum36
Jan 28 2016 15:17
I am having trouble with adding borders around my image
Elifaz Filho
@Elifaz
Jan 28 2016 15:19
@sparker22 you don’t necessarily have to use else for all your if statements, try to evaluate on your last one if else strokes are more or equal to par plus three
Conflict
@prusso
Jan 28 2016 15:19
Hmm that's strange, I just ran it on my box too....
Gerivan
@Gerivan
Jan 28 2016 15:19
@hautemum36 Where is the code?
Elifaz Filho
@Elifaz
Jan 28 2016 15:20
@prusso there probably is some native rule on boolean that I am missing, I will have to check the documentation, either that or the remainder / Modulus Operator
@sparker22 but like you said, you’re almost there.
Tamisha Wallace
@hautemum36
Jan 28 2016 15:21
<img class="class1 class2">
Gerivan
@Gerivan
Jan 28 2016 15:21

Please where is the error? <label><input tipe="checkbox" name="personality">
</label>

<label><input tipe="checkbox" name="personality">
</label>

<label><input tipe="checkbox" name="personality">
</label>

Tamisha Wallace
@hautemum36
Jan 28 2016 15:21
@Gerivan
Gerivan
@Gerivan
Jan 28 2016 15:22
it says: Your page should have three checkbox elements.
Each of your three checkbox elements should be nested in its own label element. Give your checkboxes the name attribute of personality.
Elifaz Filho
@Elifaz
Jan 28 2016 15:22

@Gerivan

Please where is the error?
 <label><input tipe="checkbox" name="personality">
</label>

<label><input tipe="checkbox" name="personality">
</label>

<label><input tipe="checkbox" name="personality">
</label>

type you have a syntax error.

Gerivan
@Gerivan
Jan 28 2016 15:23
Flawless victory! Thankyou!
i'm from Brazil, i dont talk so good inglish, so i have problems whit sintax sometime!
Sarvashwa singh
@sarvashwa
Jan 28 2016 15:24
thx @prusso bt i got my answer
CamperBot
@camperbot
Jan 28 2016 15:24
sarvashwa sends brownie points to @prusso :sparkles: :thumbsup: :sparkles:
:star: 143 | @prusso | http://www.freecodecamp.com/prusso
Elifaz Filho
@Elifaz
Jan 28 2016 15:25
@Gerivan Same here, eu sou brasileiro tambem, Ingles pode ser complicado, e so uma questao de continuar tentando e errando, tentando e acertando.
Gerivan
@Gerivan
Jan 28 2016 15:26
Obrigado pelo incentivo @Elifaz !
Aakash Yadav
@crypterx
Jan 28 2016 15:27
@caffiene how to assign css class to <div> ..exercise 42
Luciano Hakime Dutra
@lucianohd
Jan 28 2016 15:28
@Gerivan oh look a brazilian! :D Eu aprendi inglês com o pessoal me corrigindo, com o tempo vc melhora!
Gerivan
@Gerivan
Jan 28 2016 15:28
kk Valeu @lucianohd !
rahul jha
@rahulsup30
Jan 28 2016 15:30

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

how to make class into class
and set the border
Elifaz Filho
@Elifaz
Jan 28 2016 15:31
@rahulsup30 make sure you paste your code in here using the pretty code copy from freeCodeCamp or by using
```
one line above and one line below.
```
Aakash Yadav
@crypterx
Jan 28 2016 15:33
@Gerivan replace "tipe with "type"