These are chat archives for FreeCodeCamp/Help

22nd
Jan 2016
JuanFer253
@juanfer25
Jan 22 2016 00:01
hii i need help with background-color in my dive where going this?
max77p
@max77p
Jan 22 2016 00:04
can someone help me with testing for objects problem?
Bill
@kirah1314
Jan 22 2016 00:04
@smmcguinness you're welcome and you're very close to solving it so don't give up!
max77p
@max77p
Jan 22 2016 00:04
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

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

}

// Test your code by modifying these values
checkObj("gift");
in this case, why doesnt myObj.checkProp work?
this code produces the right answer, but wondering why i have to have it in brackets and not dot notation
JuanFer253
@juanfer25
Jan 22 2016 00:05
heey someone help me ?
Pattri
@pttvntrdz
Jan 22 2016 00:06
@max77p because checkProp is a string
Franco Zapata
@Francozt01
Jan 22 2016 00:06
@max77p only use inside the if statement myObj.hasOwnProperty(checkProp) delte the " === true"
max77p
@max77p
Jan 22 2016 00:06
@pttvntrdz when would i use dot notation then?
Pattri
@pttvntrdz
Jan 22 2016 00:06
and you need the value of checkProp, the string it contains to go to the property of the object,
@max77p when you have the name of the property directly,
max77p
@max77p
Jan 22 2016 00:07
@Francozt01 if i don't put the === true part then it automatically assumes first is if true?
Franco Zapata
@Francozt01
Jan 22 2016 00:07
yes
Pattri
@pttvntrdz
Jan 22 2016 00:07
@max77p yes you dont need the ===
max77p
@max77p
Jan 22 2016 00:07
@pttvntrdz ohh ok..perfect thanks! and @Francozt01
CamperBot
@camperbot
Jan 22 2016 00:07
max77p sends brownie points to @pttvntrdz and @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 478 | @francozt01 | http://www.freecodecamp.com/francozt01
:star: 240 | @pttvntrdz | http://www.freecodecamp.com/pttvntrdz
Franco Zapata
@Francozt01
Jan 22 2016 00:07
np :+1:
Pattri
@pttvntrdz
Jan 22 2016 00:08
:smile:
JuanFer253
@juanfer25
Jan 22 2016 00:08
@pttvntrdz
Pattri
@pttvntrdz
Jan 22 2016 00:08
@juanfer25 yes what's your problem? :smile:
Franco Zapata
@Francozt01
Jan 22 2016 00:09
patri vives en palo alto?
E
@1Emre-K
Jan 22 2016 00:10
Could someone help me with "Using Objects for Lookups" please?
function phoneticLookup(val) {
  var result = "";

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

  return result;
}

// Change this value to test
phoneticLookup("alpha");
Pattri
@pttvntrdz
Jan 22 2016 00:10
@1Emre-K sure!
E
@1Emre-K
Jan 22 2016 00:10
This message was deleted
Pattri
@pttvntrdz
Jan 22 2016 00:10
@Francozt01 estoy entre palo alto y madrid ^^
Franco Zapata
@Francozt01
Jan 22 2016 00:11
por trabajo o estudio
Pattri
@pttvntrdz
Jan 22 2016 00:11
@1Emre-K you need to change your return value
trabajo
Franco Zapata
@Francozt01
Jan 22 2016 00:11
cool :D
Pattri
@pttvntrdz
Jan 22 2016 00:11
haha :smile:
E
@1Emre-K
Jan 22 2016 00:12
@pttvntrdz to what exactly?
Pattri
@pttvntrdz
Jan 22 2016 00:13
@1Emre-K result should be equals to lookup[val] so you return the value of the property you're interested in
JuanFer253
@juanfer25
Jan 22 2016 00:13
alguien habla español ?
Franco Zapata
@Francozt01
Jan 22 2016 00:13
what do u do? mobile apps, websites or a startup?
juan hay una sala de español
Pattri
@pttvntrdz
Jan 22 2016 00:14
something like
return result = lookup[val];
haha ninguna! trabajo para la nasa
Franco Zapata
@Francozt01
Jan 22 2016 00:14
@juanfer25 busca la sala de español en el buscador arriba a tu derecha coloca freecodecamp/espanol
JuanFer253
@juanfer25
Jan 22 2016 00:14
ala gracias
Franco Zapata
@Francozt01
Jan 22 2016 00:14
np
@1Emre-K did it work? ^^
JuanFer253
@juanfer25
Jan 22 2016 00:15
gracias
E
@1Emre-K
Jan 22 2016 00:16
@pttvntrdz it worked, but I'm having trouble understand why that would be the case
JuanFer253
@juanfer25
Jan 22 2016 00:17
@pttvntrdz hablas español?
Pattri
@pttvntrdz
Jan 22 2016 00:17
@juanfer25 sip
Franco Zapata
@Francozt01
Jan 22 2016 00:21
@pttvntrdz en q trabajas mobile apps, websites o startup?
Pattri
@pttvntrdz
Jan 22 2016 00:22
@Francozt01 nada nada d eso, aerodinámica y robotica
Franco Zapata
@Francozt01
Jan 22 2016 00:23
Wow! genial : :o:
tommy
@tommygebru
Jan 22 2016 00:23
@max77p this is a great explanation, it is really fast and to the point :smile:
https://medium.com/@prufrock123/js-dot-notation-vs-bracket-notation-797c4e34f01d#.s706fmync
JAVASCRIPT: Dot Notation vs Bracket Notation ?
Pattri
@pttvntrdz
Jan 22 2016 00:25
:smile:
derekng98
@derekng98
Jan 22 2016 00:30
how do i give my h1 element the class of pink-text?
<h1>Hello World!</h1>
Franco Zapata
@Francozt01
Jan 22 2016 00:31
@derekng98 after <h1 class="pink-text"
<h1 class="class name goes here" > Title Name </h1>
derekng98
@derekng98
Jan 22 2016 00:32
thanks!
Franco Zapata
@Francozt01
Jan 22 2016 00:33
np problem
same for ID id="ID name"
Josue Godoy Lechuga
@josue1080
Jan 22 2016 00:34
how i can do de fase 59
renu shinde
@renushinde
Jan 22 2016 00:36
pls help me in this:exercise 29 <p>Click here for <a href=#> <img src="http://bit.ly/fcc-running-cats">cat photos</a></p>
;Nest the existing img element within an a elementthe error is
JuanFer253
@juanfer25
Jan 22 2016 00:37
please help in the exercise number 43
mormanguy
@mormanguy
Jan 22 2016 00:38
i need help
Josue Escobar
@jees10
Jan 22 2016 00:38
i need help i cant make this Add a div element with the class well inside each of your div elements with the class "col-xs-6"
JuanFer253
@juanfer25
Jan 22 2016 00:39
how i can place the id a my label <form>
<form id="cat-photo-app" action="/submit-cat-photo"> what is the fail ?
ok already
thanks
Franco Zapata
@Francozt01
Jan 22 2016 00:42
q paso entocnes juan xd
JuanFer253
@juanfer25
Jan 22 2016 00:42
ya pude
gracias
Josue Escobar
@jees10
Jan 22 2016 00:42
vos sos jaunfer gonzales
Franco Zapata
@Francozt01
Jan 22 2016 00:43
@renushinde <a href=" LInk goes here " > <imgsrc="Image link or location goes Here" /></a> check this
JuanFer253
@juanfer25
Jan 22 2016 00:44
chaooo
que pedoo
Franco Zapata
@Francozt01
Jan 22 2016 00:44
@juanfer25 de nada preferiblemente usa@ mas el nombre de a quien quieres agradecer y luego dices thanks para que les des un punto a quien te ayude o colabore
CamperBot
@camperbot
Jan 22 2016 00:44
francozt01 sends brownie points to @juanfer25 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for juanfer25
JuanFer253
@juanfer25
Jan 22 2016 00:44
@Francozt01 thsnks
Franco Zapata
@Francozt01
Jan 22 2016 00:45
wrong spelling xD
JuanFer253
@juanfer25
Jan 22 2016 00:45
exactly
mi ingles es pesimo
Josue Escobar
@jees10
Jan 22 2016 00:45
contestame vos
JuanFer253
@juanfer25
Jan 22 2016 00:45
pero me entienden creo}
Franco Zapata
@Francozt01
Jan 22 2016 00:45
el mio es mas o menos
Eli Taliafero
@elitaliafero
Jan 22 2016 00:45
I need help with "Using Objects for Lookups"
Josue Escobar
@jees10
Jan 22 2016 00:45
te estoy llamando
JuanFer253
@juanfer25
Jan 22 2016 00:45
voy
Franco Zapata
@Francozt01
Jan 22 2016 00:45
lol son amigos
mormanguy
@mormanguy
Jan 22 2016 00:45
i need help on chang the front size of an element?
Franco Zapata
@Francozt01
Jan 22 2016 00:46
por cierto si van a hablar full español vayan al chat de spanol o hablen por privado aqui los pueden banear
@mormanguy font-size u mean?
mormanguy
@mormanguy
Jan 22 2016 00:46
yes
Franco Zapata
@Francozt01
Jan 22 2016 00:46
@elitaliafero what u need
@mormanguy share your link pls
Eli Taliafero
@elitaliafero
Jan 22 2016 00:46
I can't figure out what I'm doing wrong @Francozt01
JuanFer253
@juanfer25
Jan 22 2016 00:46
chao metete al chat en español
Eli Taliafero
@elitaliafero
Jan 22 2016 00:46
here is what I have
// Setup
function phoneticLookup(val) {
  var result = "";

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

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

// Change this value to test
phoneticLookup("charlie");
mormanguy
@mormanguy
Jan 22 2016 00:46
how to chang the size
Franco Zapata
@Francozt01
Jan 22 2016 00:48
@elitaliafero the object with the names should be var lookup
instead of var result again
also u have to return that variable of the object with [val]
change the name of the object variable from result to var lookup and return lookup[val];
@elitaliafero try that
@mormanguy did u changed the size already?
Pattri
@pttvntrdz
Jan 22 2016 00:52
@elitaliafero first the object should be called
lookedup ={
"alpha":"Adams",
...
};

and then you also need to change your result, so when you do:

return result

you return something more than '" "'

Franco Zapata
@Francozt01
Jan 22 2016 00:56
ese se fue afk creo yo xd
mormanguy
@mormanguy
Jan 22 2016 00:57
how to Change the Font Size of an Element
how do you?
Alexander Køpke
@alexanderkopke
Jan 22 2016 00:58
what element?
ah font size
mormanguy
@mormanguy
Jan 22 2016 00:58
ya
Franco Zapata
@Francozt01
Jan 22 2016 00:59
select the element inside the tags <style> here </style>
mormanguy
@mormanguy
Jan 22 2016 00:59
i don't know how to or where to put it
Franco Zapata
@Francozt01
Jan 22 2016 00:59
if ur element is <h2> Title Name </h2>
mormanguy
@mormanguy
Jan 22 2016 00:59

<style>
.red-text {
color: red;
}
</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, sleep in the sink fluffy fur catnip scratched </p>

Alexander Køpke
@alexanderkopke
Jan 22 2016 00:59
you select the element.. for example h1 and then give it font-size: 2em; this would look like this: h1{font-size:2em;}
Franco Zapata
@Francozt01
Jan 22 2016 00:59
u use h2 { font-size: "write the numer of pixels here" ; }
inside the <style> tags.....
mormanguy
@mormanguy
Jan 22 2016 01:00
oh ok
Franco Zapata
@Francozt01
Jan 22 2016 01:00
under color:red; write font-size: 20px ;
Iyad87
@Iyad87
Jan 22 2016 01:02

function myFunction() {

console.log("myVar");
var loc = "";
}
myFunction("loc");

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

/

function myFunction() {
var loc = "foo";
console.log(loc);

}
myFunction();

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

Utkarsh Bhimte
@Utkarshbhimte
Jan 22 2016 01:02
Do anybody know how can I use string.replace() globally to replace spaces in a string into "-".
mormanguy
@mormanguy
Jan 22 2016 01:04
-francoz01
Franco Zapata
@Francozt01
Jan 22 2016 01:06
@mormanguy what
@Utkarshbhimte look
var res = str.replace("Microsoft", "W3Schools");
an example
mormanguy
@mormanguy
Jan 22 2016 01:07
can you post what you did because i tried but it didnt work
Jenni
@BookSprite
Jan 22 2016 01:07
How do I change a linked heading back to black text?
Franco Zapata
@Francozt01
Jan 22 2016 01:08
@Utkarshbhimte u write a variable and assign the variable of thee string with the property replace() inside the () firsr write the 2 "" with a space a comma , and then between "" u write -> - (" ", "-")
@mormanguy give me the link of the exercise
@Utkarshbhimte var str = "Visit Microsoft!";
var res = str.replace("Microsoft", "W3Schools");
mormanguy
@mormanguy
Jan 22 2016 01:10
#6 Change the Font Size of an Element
Franco Zapata
@Francozt01
Jan 22 2016 01:10
Utkarsh Bhimte
@Utkarshbhimte
Jan 22 2016 01:10
and how can I do this freeCodeCamp into free-code-camp
Franco Zapata
@Francozt01
Jan 22 2016 01:10
try .replace("-","");
Jenni
@BookSprite
Jan 22 2016 01:11
I got it, nvrmnd
mormanguy
@mormanguy
Jan 22 2016 01:12

<style>
.red-text {
color: red;
front-size: 16px;
}
</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, sleep in the sink fluffy fur catnip scratched </p>

what do i chang
Franco Zapata
@Francozt01
Jan 22 2016 01:12
p { font-size:16px;}
delete fron-size:16px;
delete the front-size:16px; and write under the curly bracket } p { font-size:16px;}
mormanguy
@mormanguy
Jan 22 2016 01:15

<style>
.red-text {
color: red;
p {front-size:16px;}
</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, sleep in the sink fluffy fur catnip scratched </p>

Andrew Kemp
@andrewtkemp1
Jan 22 2016 01:16
@mormanguy you need to close your red text style with a }
no?
Franco Zapata
@Francozt01
Jan 22 2016 01:17
@mormanguy i said under the } and u delete the } too xd
over p write a }
mormanguy
@mormanguy
Jan 22 2016 01:17
ok
Franco Zapata
@Francozt01
Jan 22 2016 01:18
@mormanguy u should search in youtube for a tutorial about css basics
Andrew Kemp
@andrewtkemp1
Jan 22 2016 01:18
Has anyone completed the Replacing If Else Chains with Switch test?
I'm confused as to what I am missing from my switch statement.
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:19
@andrewtkemp1 Post your code
Andrew Kemp
@andrewtkemp1
Jan 22 2016 01:20
function myTest(val) {
  var answer = "";
  // Only change code below this line
  switch(val){
   case "bob":
     answer = "Marley";
     break;
    case 42:   
     answer = "The Answer";
     break;
    case 1: 
      answer = "There is no #1";
      break;
    case 99:
      answer = "Missed me by this much!";
      break;
    case 7:  
      answer = "Ate Nine";
  // Only change code above this line  
  return answer;
  }
}

// Change this value to test
myTest(99);
@DevPoetsSociety so Case 7 works, the rest return blank.
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:22
You need a } after the last case
That's why Case 7 works. It thinks that's part of the same Case
Mahtab
@RoadToCode822
Jan 22 2016 01:23
I need help with a D3.js sunburst chart. Can anyone help?
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:24
Is it throwing you a caution sign @andrewtkemp1 ?
Is that a challenge @RoadToCode822 ?
Mahtab
@RoadToCode822
Jan 22 2016 01:24
its not
Andrew Kemp
@andrewtkemp1
Jan 22 2016 01:24
@DevPoetsSociety no. Should there be?
Mahtab
@RoadToCode822
Jan 22 2016 01:24
its a personal project
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:25
@andrewtkemp1 Probably. Add the } in there after the last case but before return and it should work.
Mahtab
@RoadToCode822
Jan 22 2016 01:25
I took https://www.khanacademy.org/math/trigonometry and converted it into the puzzle wheel in codepen
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:25
Your logic is sound
William
@derpmanwilliam
Jan 22 2016 01:26
hey guys got a question
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:26
Just ask it @derpmanwilliam
Mahtab
@RoadToCode822
Jan 22 2016 01:26
@DevPoetsSociety can u help me out bud?
William
@derpmanwilliam
Jan 22 2016 01:26
well I nested my input element within a form element and its not saying I did
want to see?
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:27
@RoadToCode822 Not familiar with khan academy or trig, sorry.
Andrew Kemp
@andrewtkemp1
Jan 22 2016 01:27
@DevPoetsSociety ah that worked! I put it in the wrong bracket. Thanks dude
CamperBot
@camperbot
Jan 22 2016 01:27
andrewtkemp1 sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
:star: 418 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
Mahtab
@RoadToCode822
Jan 22 2016 01:27
are you familiar with Angular?
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:27
Nope
Mahtab
@RoadToCode822
Jan 22 2016 01:27
oh ok no prob thanks :)
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:27
@derpmanwilliam Post your code. Use formatting
help format
CamperBot
@camperbot
Jan 22 2016 01:27

: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

DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:28
@RoadToCode822 You might try HelpZiplines, there's more people with wider experience there.
Mahtab
@RoadToCode822
Jan 22 2016 01:29
what is the link to that chatroom?
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:30
Go to the main chat and hover over the title. It'll link you to a list.
Mahtab
@RoadToCode822
Jan 22 2016 01:30
i’m using gitter app on mac
where is the main chat
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:31
"FreeCodeCamp" Don't know hot to link to them
HOW
Herman Fassett
@HermanFassett
Jan 22 2016 01:32
Note, HelpZiplines is being replaced by HelpFrontEnd
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:32
Bleh. HelpZiplines Forever!
Herman Fassett
@HermanFassett
Jan 22 2016 01:33
:P Yeah it's probably still more active anyway
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 01:34
Oh, just use the URL, duh. I keep thinking of this as IRC lite.
Franco Zapata
@Francozt01
Jan 22 2016 01:35
@RoadToCode822 search for freecodecamp
in the gitter app search to the right
Mahtab
@RoadToCode822
Jan 22 2016 01:35
@Francozt01 search for what?
oh
Franco Zapata
@Francozt01
Jan 22 2016 01:35
main chat
nice project btw
Thomas Schmidt
@sittingpilgrim
Jan 22 2016 01:40
A
Mahtab
@RoadToCode822
Jan 22 2016 01:40
thanks @Francozt01
CamperBot
@camperbot
Jan 22 2016 01:40
roadtocode822 sends brownie points to @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 479 | @francozt01 | http://www.freecodecamp.com/francozt01
Mahtab
@RoadToCode822
Jan 22 2016 01:41
It’s a small piece of my social media for online education startup called unpuzzled
JuanFer253
@juanfer25
Jan 22 2016 01:43
VICTORIO METETE A ESTE EN ESPAÑOL https://gitter.im/FreeCodeCamp/Espanol
KillerBEE6
@KillerBEE6
Jan 22 2016 01:44
que onda
JuanFer253
@juanfer25
Jan 22 2016 01:44
METETE A ESE LINK Y HABLAMOS AHI
KillerBEE6
@KillerBEE6
Jan 22 2016 01:44
esas son mamadas pero ya voy
Josue Escobar
@jees10
Jan 22 2016 01:59
i need help Use the jQuery addClass() function to give the classes animated and bounce to your button elements.
cannelflow
@cannelflow
Jan 22 2016 02:04
@jees10 TRIES SOMETHING?
which exercise ?
Josue Escobar
@jees10
Jan 22 2016 02:04
dont worry i found the answer
jmesa92
@jmesa92
Jan 22 2016 02:25
having issues with "Iterate over Arrays with map"
var oldArray = [1,2,3,4,5];
var newArray = [];

// Only change code below this line.
var plusThree = oldArray.map(function(newArray){
   return newArray + 3;
    });
newArray = oldArray;
It isn't adding 3 to each value in the array
Logan Hampton
@loganch
Jan 22 2016 02:27
@jmesa92 .map() creates a whole new array, so you're just setting newArray to be the old one at the end
cooper-t
@cooper-t
Jan 22 2016 02:27
```
jmesa92
@jmesa92
Jan 22 2016 02:28
@loganch ohh
cooper-t
@cooper-t
Jan 22 2016 02:28

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

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

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

any idea what I'm doing wrong
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 02:30
@cooper-t
Logan Hampton
@loganch
Jan 22 2016 02:30
@cooper-t Well I think you're sending the wrong string to checkObj(), and take a second look at what your if statement is evaluating.
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 02:30
help format
CamperBot
@camperbot
Jan 22 2016 02:30

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

cooper-t
@cooper-t
Jan 22 2016 02:32
thanks @DevPoetsSociety I'm struggling tonight
CamperBot
@camperbot
Jan 22 2016 02:32
cooper-t sends brownie points to @devpoetssociety :sparkles: :thumbsup: :sparkles:
:star: 420 | @devpoetssociety | http://www.freecodecamp.com/devpoetssociety
cooper-t
@cooper-t
Jan 22 2016 02:33
I'll look it over again @loganch
Jake Marcus
@jake-marcus
Jan 22 2016 02:34

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

<style>
.smaller-image {width: 100px}
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

what am I doing wrong to make the image smaller
cannelflow
@cannelflow
Jan 22 2016 02:35
@jake-marcus add class smaller-image here <img src="https://bit.ly/fcc-relaxing-cat">
Jake Marcus
@jake-marcus
Jan 22 2016 02:37
@cannelflow what?
FarionLord
@FarionLord
Jan 22 2016 02:37
hmmm the instructions in FreeCodeCamp is a bit not clear and is not as good as KhanAcademy but thats okay since FCC started later and it has this wonderful help chat.
Ulan
@ulans
Jan 22 2016 02:38
Hi guys, could you help me with Waypoint Nesting For Loops. I'm trying to multiply variable by each number but I don't get output
FarionLord
@FarionLord
Jan 22 2016 02:38
@ulans here at the bottom it might be there. https://www.youtube.com/user/pizzapokerguy87/playlists
cannelflow
@cannelflow
Jan 22 2016 02:39
@jake-marcus you don,t have class in img tag
Bill
@kirah1314
Jan 22 2016 02:39
@ulans have you tried anything? show your codes?
cannelflow
@cannelflow
Jan 22 2016 02:40
@jake-marcus do like <img class="smaller-image"src="https://bit.ly/fcc-relaxing-cat">
FarionLord
@FarionLord
Jan 22 2016 02:40
basically as @cannelflow said try
<img class="smaller-image
also
wiki format
CamperBot
@camperbot
Jan 22 2016 02:41

: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

FarionLord
@FarionLord
Jan 22 2016 02:42
@ulans tell me what exercise you are working on and I will copy and paste your code and see what is wwrong.
-w*
cannelflow
@cannelflow
Jan 22 2016 02:43
wiki format
CamperBot
@camperbot
Jan 22 2016 02:43

: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 22 2016 02:43
@ulans
^
@jake-marcus ?
Ulan
@ulans
Jan 22 2016 02:45
This message was deleted
Jake Marcus
@jake-marcus
Jan 22 2016 02:45

<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;
}
</style>

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

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

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

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<img class= "smaller-image" {width: 100px}

it keeps saying the image isn't 100px
Ulan
@ulans
Jan 22 2016 02:46
This message was deleted
cannelflow
@cannelflow
Jan 22 2016 02:46
@jake-marcus remove this <img class= "smaller-image" {width: 100px}
Jake Marcus
@jake-marcus
Jan 22 2016 02:46
ok @cannelflow
cannelflow
@cannelflow
Jan 22 2016 02:46
@jake-marcus now you have <img src="https://bit.ly/fcc-relaxing-cat"> add class="smaller-image" their
Joshua Gammage
@MrMagma
Jan 22 2016 02:47
@ulans Remove the var product = 1; from the top and replace "product" with "arr"
Jake Marcus
@jake-marcus
Jan 22 2016 02:47
@cannelflow where do I add the class at
Ulan
@ulans
Jan 22 2016 02:47
@FarionLord
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (i = 0; i < product.length; i++) {
    for (j = 0; j < product[i].length; j++) {
      product = product[i] * product[j];

    }


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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
cannelflow
@cannelflow
Jan 22 2016 02:48
@jake-marcus do like <img class="smaller-image"src="https://bit.ly/fcc-relaxing-cat"> their
Ulan
@ulans
Jan 22 2016 02:48
This message was deleted
cannelflow
@cannelflow
Jan 22 2016 02:52
@jake-marcus ?
Ulan
@ulans
Jan 22 2016 02:53
Guys could you help me?
@kirah1314
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (i = 0; i < product.length; i++) {
    for (j = 0; j < product[i].length; j++) {
      product = product[i] * product[j];

    }


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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Heloooo someone!
Please, help me!
cannelflow
@cannelflow
Jan 22 2016 02:57
@jake-marcus worked ?
Ulan
@ulans
Jan 22 2016 02:58
@cannelflow Could you help me?
Franco Zapata
@Francozt01
Jan 22 2016 02:59
@ulans give the link to the exercise
Rae
@cs-knight
Jan 22 2016 02:59
how do i give the text input form-control?
Franco Zapata
@Francozt01
Jan 22 2016 03:00
@ulans u have an error
Ulan
@ulans
Jan 22 2016 03:00
@Francozt01 I know. What error?
Franco Zapata
@Francozt01
Jan 22 2016 03:00
u need to loop through the arr parameter not the product variable...
for (var i = 0; i < arr.length; i++) the other is j < arr[i]; j++
Jake Marcus
@jake-marcus
Jan 22 2016 03:01
@cannelflow no
Franco Zapata
@Francozt01
Jan 22 2016 03:01
after that ... product = product * arr[i][j];
@ulans
cannelflow
@cannelflow
Jan 22 2016 03:02
@ulans let me see what i did btw which exercise ? after that i will try
Nick
@NickHDYT
Jan 22 2016 03:02
dd class="smaller-image" their
cannelflow
@cannelflow
Jan 22 2016 03:02
@jake-marcus what happened?
Diwakar Serala
@diwpro007
Jan 22 2016 03:03
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i=0; i < arr.length; i++) {
    for (var j=0; j < arr[i].length; j++) {
      product = product * arr[i][j];
    }
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
if anyone requires this
cannelflow
@cannelflow
Jan 22 2016 03:03
@jake-marcus show me the code
Franco Zapata
@Francozt01
Jan 22 2016 03:03
@diwpro007 i just xplain to @ulans how to do that and what was his error
Ulan
@ulans
Jan 22 2016 03:03
@Francozt01 Thank you so much!!! I was trying for a long time!
CamperBot
@camperbot
Jan 22 2016 03:03
ulans sends brownie points to @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 480 | @francozt01 | http://www.freecodecamp.com/francozt01
Diwakar Serala
@diwpro007
Jan 22 2016 03:04
ok good I just logged into chat
Nick
@NickHDYT
Jan 22 2016 03:04

<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;
}
</style>

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

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

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

Diwakar Serala
@diwpro007
Jan 22 2016 03:04
just didn't checked the history
Franco Zapata
@Francozt01
Jan 22 2016 03:04
@ulans no problem! remember to watch ur code again later and always try to understand the whole procces of how it works
Nick
@NickHDYT
Jan 22 2016 03:04
Can somebody jelp me with that
Franco Zapata
@Francozt01
Jan 22 2016 03:05
@diwpro007 :+1: :D
Nick
@NickHDYT
Jan 22 2016 03:05
*help
CamperBot
@camperbot
Jan 22 2016 03:05

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

cannelflow
@cannelflow
Jan 22 2016 03:05
@NickHDYT remove <img src="https://bit.ly/fcc-relaxing-cat"> <add class="smaller-image">
Ulan
@ulans
Jan 22 2016 03:05
@Francozt01 ok! I appreciate it!
cannelflow
@cannelflow
Jan 22 2016 03:05
@NickHDYT and do like <img class="smaller-image"src="https://bit.ly/fcc-relaxing-cat"> their
@NickHDYT create smaller-class in style tag also and give property
Nick
@NickHDYT
Jan 22 2016 03:08
Thanks I appreciate it
Arcrunner819
@Arcrunner819
Jan 22 2016 03:11
hey guys, does anyone have a second to help figure out a little issue? I'm working on targeting a child of an element (jQuery)
Diwakar Serala
@diwpro007
Jan 22 2016 03:11
@andrewtkemp1 well that is specified int he comment
Randall Guy
@RandallGuy
Jan 22 2016 03:11
Thanks @cannelflow . I was on same problem as @NickHDYT . fixed ti!
CamperBot
@camperbot
Jan 22 2016 03:11
randallguy sends brownie points to @cannelflow and @nickhdyt :sparkles: :thumbsup: :sparkles:
:star: 24 | @nickhdyt | http://www.freecodecamp.com/nickhdyt
:star: 502 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Jan 22 2016 03:14
@RandallGuy :+1: @NickHDYT worked?
Nick
@NickHDYT
Jan 22 2016 03:14
Yes, thanks
Vadim Grigorov
@Chichavl
Jan 22 2016 03:15

Hi, I am stuck with Bonfire Where art thou here is my code

function where(collection, source) {
  var arr = [];
  var sourceProps = Object.getOwnPropertyNames(source);
  // What's in a name?
  arr = collection.filter(function(element) {

    var collectionProps = Object.getOwnPropertyNames(element);

    if (collectionProps.length != sourceProps.length) {
        return false;
    }

    for (var i = 0; i < collectionProps.length; i++) {
        var propName = collectionProps[i];

        // If values of same property are not equal,
        // objects are not equivalent
        if (element[propName] !== source[propName]) {
            return false;
        }
    }

    // If we made it this far, objects
    // are considered equivalent
    return true;
  });
  return arr;
}

I cannot understand why arr returns empty, but collection array is modified but opposite to right answer - it keeps elements that should be removed and removes element that should be kept.

Arcrunner819
@Arcrunner819
Jan 22 2016 03:15

```html

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "orange");
$("#left-well:nth-child(2)").addClass("animated, bounce");
$(".well:nth-child(2)").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">#target
For some reason, I cant get this to work and make the second element bounce. I'm not sure what I'm doing wrong. (i dont know how to send copies of the screenshots yet, sorry lol)

DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 03:16
@Arcrunner819 ``` on their own line. Use Shift+Return
Arcrunner819
@Arcrunner819
Jan 22 2016 03:17
i'm sorry, which line?
Pranav Doshi
@pranavdoshi
Jan 22 2016 03:17
wassup good morning guys
:)
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 03:17
@Arcrunner819 The ``` should be on its own line. Use shift+return to get them there.
Vadim Grigorov
@Chichavl
Jan 22 2016 03:18
@Arcrunner819 You should put ``` in a empty line before your code and after your code so it become readable
elrix
@A19
Jan 22 2016 03:18
hi anyone can help me how to escape for backslash ? "\"?
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 03:18
\
\\
elrix
@A19
Jan 22 2016 03:18
\
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 03:19
Heh. Have to escape here.
elrix
@A19
Jan 22 2016 03:19
myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces
Stephen L Green
@MagicMan88
Jan 22 2016 03:19
How to I give elements with the p tag a font-size of 16px? I'm still in the first few challenges.. new to this.
elrix
@A19
Jan 22 2016 03:19
iam still thinking for backslash how to escape it
p { font-size=16px}
clifrockh
@clifrockh
Jan 22 2016 03:20
I just started and I'm already stuck. Dang is that normal?
cannelflow
@cannelflow
Jan 22 2016 03:20
@A19 which exercise?
elrix
@A19
Jan 22 2016 03:21
javascript
Arcrunner819
@Arcrunner819
Jan 22 2016 03:21
@DevPoetsSociety sorry i still think i'm missing the concept (beeing doing this for almost 12 hours straight so brain is a little friend, forgive me lol)
elrix
@A19
Jan 22 2016 03:21
151
cannelflow
@cannelflow
Jan 22 2016 03:21
@A19 javascript is whole world where do i start finding
bob.fu
@yushiangfu
Jan 22 2016 03:21
hi all
elrix
@A19
Jan 22 2016 03:22
map 151 sir
Nick
@NickHDYT
Jan 22 2016 03:22
K
Stephen L Green
@MagicMan88
Jan 22 2016 03:22
Do I add the font size between style tags?
bob.fu
@yushiangfu
Jan 22 2016 03:22
I got a problem....need help
Arcrunner819
@Arcrunner819
Jan 22 2016 03:22
depends on what the question is asking you. if it asks for inline then do it in the p
bob.fu
@yushiangfu
Jan 22 2016 03:22
why my iframe work normally under codepen editor mode, but failed when full page mode?
Arcrunner819
@Arcrunner819
Jan 22 2016 03:22
@MagicMan88
elrix
@A19
Jan 22 2016 03:22
@MagicMan88 yea
or u can put in class
cannelflow
@cannelflow
Jan 22 2016 03:22
@MagicMan88 yes
DevPoetsSociety
@DevPoetsSociety
Jan 22 2016 03:23
@Arcrunner819 Do
bob.fu
@yushiangfu
Jan 22 2016 03:23
http://codepen.io/bobfu/full/yepXrp/ can someone take a look?
the "Generate" button behavior is different in editor mode and full page mode...
elrix
@A19
Jan 22 2016 03:25
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr how to escape the backslash ?"\\" iam trying but still didn work
Will G
@willgorham
Jan 22 2016 03:27
@A19 that's correct for escaping a backslash. you must be doing something else wrong
cannelflow
@cannelflow
Jan 22 2016 03:27
@yushiangfu yes it is
bob.fu
@yushiangfu
Jan 22 2016 03:28
@cannelflow , is that normal?
Vadim Grigorov
@Chichavl
Jan 22 2016 03:29
@yushiangfu I think it is codepen issue if you view it in debug mode - it works fine
cannelflow
@cannelflow
Jan 22 2016 03:29
@yushiangfu no i think but also have this type of behavior in one of my pen try in debug mode should work f9 their
bob.fu
@yushiangfu
Jan 22 2016 03:30
@Chichavl thanks!
CamperBot
@camperbot
Jan 22 2016 03:30
yushiangfu sends brownie points to @chichavl :sparkles: :thumbsup: :sparkles:
:star: 206 | @chichavl | http://www.freecodecamp.com/chichavl
bob.fu
@yushiangfu
Jan 22 2016 03:30
@cannelflow thanks!
Vadim Grigorov
@Chichavl
Jan 22 2016 03:30
@yushiangfu In debug mode codepen is not running in iframe itself
bob.fu
@yushiangfu
Jan 22 2016 03:31
got it ^^
ulBenson
@ulbenson
Jan 22 2016 03:31
<script>
  $(document).ready(function() {

    $("#getMessage").on("click", function() {
      $.getJSON("/json/cats.json", function(json) {

        var html = "";

        json.forEach(function(val) {

          html += "<div class = 'cat'>";

          // Only change code below this line.
          html+="<img src='"+val.imageLink+"'>";


          // Only change code above this line.

          html += "</div>";

        });

        $(".message").html(html);

      });
    });
  });
</script>

<div class="container-fluid">
  <div class = "row text-center">
    <h2>Cat Photo Finder</h2>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12 well message">
      The message will go here
    </div>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12">
      <button id = "getMessage" class = "btn btn-primary">
        Get Message
      </button>
    </div>
  </div>
</div>
how does it know the url of img?
pndawson92
@pndawson92
Jan 22 2016 03:34
I'm stuck
cannelflow
@cannelflow
Jan 22 2016 03:35
@ulbenson add src in img tag
@ulbenson which ex?
pndawson92
@pndawson92
Jan 22 2016 03:40
i am trying to add a border to my image but i'm lost
Vadim Grigorov
@Chichavl
Jan 22 2016 03:41

Hi, I am stuck with Bonfire Where art thou here is my code
```
function where(collection, source) {
var arr = [];
var sourceProps = Object.getOwnPropertyNames(source);
// What's in a name?
arr = collection.filter(function(element) {

var collectionProps = Object.getOwnPropertyNames(element);

if (collectionProps.length != sourceProps.length) {
    return false;
}

for (var i = 0; i < collectionProps.length; i++) {
    var propName = collectionProps[i];

    // If values of same property are not equal,
    // objects are not equivalent
    if (element[propName] !== source[propName]) {
        return false;
    }
}

// If we made it this far, objects
// are considered equivalent
return true;

});
return arr;
}
I cannot understand whyarrreturns empty, butcollection``` array is modified but opposite to right answer - it keeps elements that should be removed and removes element that should be kept.

M.Maisan
@maisan
Jan 22 2016 03:41
hi guys
Elliot
@code-geeker
Jan 22 2016 03:41
Hello everyone!
M.Maisan
@maisan
Jan 22 2016 03:41
how is this wrong? :
<style>
  .red-text {
    color: red;
  }
  .smaller-image {width:100px;}
  h2 {
    font-family: Lobster, Monospace;
  }

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

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

<img class:"smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Vadim Grigorov
@Chichavl
Jan 22 2016 03:42

Hi, I am stuck with Bonfire Where art thou here is my code

function where(collection, source) {
  var arr = [];
  var sourceProps = Object.getOwnPropertyNames(source);
  // What's in a name?
  arr = collection.filter(function(element) {

    var collectionProps = Object.getOwnPropertyNames(element);

    if (collectionProps.length != sourceProps.length) {
        return false;
    }

    for (var i = 0; i < collectionProps.length; i++) {
        var propName = collectionProps[i];

        // If values of same property are not equal,
        // objects are not equivalent
        if (element[propName] !== source[propName]) {
            return false;
        }
    }

    // If we made it this far, objects
    // are considered equivalent
    return true;
  });
  return arr;
}

I cannot understand why arr returns empty, but collection array is modified but opposite to right answer - it keeps elements that should be removed and removes element that should be kept.

Will G
@willgorham
Jan 22 2016 03:43
@maisan class= not class:
Vadim Grigorov
@Chichavl
Jan 22 2016 03:43
Anyone can help?
M.Maisan
@maisan
Jan 22 2016 03:43
... thanks @willgorham
that was pretty retarded of me damn xD
Will G
@willgorham
Jan 22 2016 03:44
everyone makes typos
no worries :+1:
ulBenson
@ulbenson
Jan 22 2016 03:44
@cannelflow Render Images from Data Sources
cannelflow
@cannelflow
Jan 22 2016 03:45
@ulbenson didn't found link please
ulBenson
@ulbenson
Jan 22 2016 03:46
@cannelflow JSON APIs and Ajax
Lauryn S
@LaurynShipp
Jan 22 2016 03:46
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }
  .smaller-image { width: 100px;}
  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
cannelflow
@cannelflow
Jan 22 2016 03:47
@ulbenson sry im not their yut
Lauryn S
@LaurynShipp
Jan 22 2016 03:47
hi can someone help me? i'm not sure what im doing wrong
ulBenson
@ulbenson
Jan 22 2016 03:47
@cannelflow ok
@ulbenson but still thank you
CamperBot
@camperbot
Jan 22 2016 03:47
sorry ulbenson, you can't send brownie points to yourself! :sparkles: :sparkles:
ulBenson
@ulbenson
Jan 22 2016 03:47
@cannelflow but still thank you
CamperBot
@camperbot
Jan 22 2016 03:47
ulbenson sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 503 | @cannelflow | http://www.freecodecamp.com/cannelflow
Manish Giri
@Manish-Giri
Jan 22 2016 03:47
@LaurynShipp what’s up, go ahead
cannelflow
@cannelflow
Jan 22 2016 03:47
@LaurynShipp you need to add class smaller-image here <img src="https://bit.ly/fcc-relaxing-cat">
@ulbenson :+1:
Manish Giri
@Manish-Giri
Jan 22 2016 03:48
@LaurynShipp <img class=“smaller-image” src=“…”>
Lauryn S
@LaurynShipp
Jan 22 2016 03:48
i'm trying to size my image, but it says i'm doing something wrong.
Jelani Thompson
@JelaniThompson
Jan 22 2016 03:48
Hey there!
Does anyone know why this isn't counting down?
Manish Giri
@Manish-Giri
Jan 22 2016 03:49
@LaurynShipp you aren’t adding the smaller-image class to your img element
Jelani Thompson
@JelaniThompson
Jan 22 2016 03:49
//Count down seconds and minutes
let countdownSecond = function() {
    if (state == 'on') {
        setInterval(function() {
            time.setSeconds(getSeconds--);
        }, 1000);
        $counter.text(getMinutes + ":" + getSeconds);
    }
    if (getSeconds == 0) {
        getMinutes--;
I'm mainly referring to setInterval
Lauryn S
@LaurynShipp
Jan 22 2016 03:49
Thank you!
Jelani Thompson
@JelaniThompson
Jan 22 2016 03:49
For some reason it doesn't want to work with me
cannelflow
@cannelflow
Jan 22 2016 03:50
@LaurynShipp you need to add class smaller-image here <img src="https://bit.ly/fcc-relaxing-cat">
This message was deleted
Josue Escobar
@jees10
Jan 22 2016 03:51
i need help Your left-well element should have a red background
cannelflow
@cannelflow
Jan 22 2016 03:51
@jees10 tried something which exercise ?
Josue Escobar
@jees10
Jan 22 2016 03:52

<script>
$(document).ready(function() {
$("#target1").css("color", "red") .parent("#target1");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#left-well").parent().css("background-color", "red")
});
</script>

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

Jelani Thompson
@JelaniThompson
Jan 22 2016 03:52
wowah
Josue Escobar
@jees10
Jan 22 2016 03:53
i dont found de mistake
Lauryn S
@LaurynShipp
Jan 22 2016 03:53
Do i put the smaller-image class in the style element?
cannelflow
@cannelflow
Jan 22 2016 03:54
@LaurynShipp yes
@LaurynShipp its good to mention name of those who are following your problem in that way they will get notification
Josue Escobar
@jees10
Jan 22 2016 03:55
i need help what is the error
cannelflow
@cannelflow
Jan 22 2016 03:56
@jees10 what is the problem
Lauryn S
@LaurynShipp
Jan 22 2016 03:56
@cannelflow oh okay thank you
CamperBot
@camperbot
Jan 22 2016 03:56
laurynshipp sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 504 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Jan 22 2016 03:56
@LaurynShipp :+1:
Kelley Crittenden
@Kelley1983
Jan 22 2016 03:56
Just started today and have been at it for a few hours. I'm around task 80 or so. There has been so much information. Will the lessons go back through and go over the stuff that I have been working on. I just don't feel that one task is enough to retain the information.
Josue Escobar
@jees10
Jan 22 2016 03:57
i cant go to the next callenge
cannelflow
@cannelflow
Jan 22 2016 03:58
@Kelley1983 yes later you will do many exercise that will test your learning so far
Josue Escobar
@jees10
Jan 22 2016 03:59

@cannelflow what is the mistake in this code <script>
$(document).ready(function() {
$("#target1").css("color", "red") .parent("#target1");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#left-well").parent().css("background-color", "red")
});
</script>

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

cannelflow
@cannelflow
Jan 22 2016 03:59
@jees10 which exercise ?
Josue Escobar
@jees10
Jan 22 2016 03:59
117
cannelflow
@cannelflow
Jan 22 2016 04:00
@jees10 name and its good to mention name of those who are following your problem in that way they will get notification
Kelley Crittenden
@Kelley1983
Jan 22 2016 04:00
Ok, thank you. Will there be a way to review the information along with the exercise @cannelflow ?
CamperBot
@camperbot
Jan 22 2016 04:00
kelley1983 sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 505 | @cannelflow | http://www.freecodecamp.com/cannelflow
Josue Escobar
@jees10
Jan 22 2016 04:01
Target the Parent of an Element Using jQuery
Lauryn S
@LaurynShipp
Jan 22 2016 04:01

@cannelflow i'm still having troubles ugh ```html

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

<style>
.red-text {
color: red;
}
.smaller-image {width: 100px;}
h2 {
font-family: Lobster, Monospace;
}

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

</style>

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

<img class=".smaller-image" 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>

```

cannelflow
@cannelflow
Jan 22 2016 04:01
@Kelley1983 sry which imformation?
Lauryn S
@LaurynShipp
Jan 22 2016 04:02
Did i put the smaller-image class in the wrong place?
Alex
@Alexx280
Jan 22 2016 04:02
How I can get name of file where i write code?
cannelflow
@cannelflow
Jan 22 2016 04:02
@LaurynShipp class smaller-image you wrote .smaller-image
Lauryn S
@LaurynShipp
Jan 22 2016 04:03
@cannelflow Oh my goodness thank you
CamperBot
@camperbot
Jan 22 2016 04:03
laurynshipp sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:warning: laurynshipp already gave cannelflow points
Lauryn S
@LaurynShipp
Jan 22 2016 04:03
@cannelflow I've been stuck on this forever jeez how embarrassing
cannelflow
@cannelflow
Jan 22 2016 04:04
@jees10 you don't need .parent("#target1"); at $("#target1").css("color", "red") .parent("#target1");
@LaurynShipp don't be :+1:
@Alexx280 where you wrote code ?
Sharan L
@sharan-lh
Jan 22 2016 04:13

In Truncate a string problem

function truncate(str, num) {
  // Clear out that junk in your trunk
  var str1 = str.slice(0,num)+'...';
  return str1;
}

truncate("A-tisket a-tasket A green and yellow basket", 11);

what's wrong in this code?

Jelani Thompson
@JelaniThompson
Jan 22 2016 04:15
What error are you getting?
cannelflow
@cannelflow
Jan 22 2016 04:17
@sharan-lh you also need to check if case weather str.length>num like in this case truncate("A-tisket a-tasket A green and yellow basket", 11);
Alex
@Alexx280
Jan 22 2016 04:18
@cannelflow name of itself file, where wrote code.
cannelflow
@cannelflow
Jan 22 2016 04:19
@Alexx280 sry im not getting
Sharan L
@sharan-lh
Jan 22 2016 04:20
@cannelflow like this?
function truncate(str, num) {
  // Clear out that junk in your trunk
  if(str.length >= num){
     return str.slice(0,num)+'...';
   }
  else{
      var str1 = str.slice(0,num);
      }

}

truncate("A-tisket a-tasket A green and yellow basket", 11);
gowthamteja
@gowthamteja
Jan 22 2016 04:20
hi
help me in import a google font program
CamperBot
@camperbot
Jan 22 2016 04:20
no wiki entry for: me in import a google font program
Dragonfly2540
@dragonfly2540
Jan 22 2016 04:21
Hi all!
gowthamteja
@gowthamteja
Jan 22 2016 04:21
hi
i am in import a google font
Dragonfly2540
@dragonfly2540
Jan 22 2016 04:22
I am stuck in the HTML area with nesting the HTML in a div element with the class container-fluid
Kevin
@kw7oe
Jan 22 2016 04:23
'''
CamperBot
@camperbot
Jan 22 2016 04:23
:bulb: to format code use backticks! ``` more info
Manish Giri
@Manish-Giri
Jan 22 2016 04:24
@dragonfly2540 show your code
Kevin
@kw7oe
Jan 22 2016 04:24
@sharan-lh do you notice that 11, included the "..." , so i guess you need to slice(0, num - 3) instead of just num
gowthamteja
@gowthamteja
Jan 22 2016 04:25
how to assign h2 element
lobster
Kevin
@kw7oe
Jan 22 2016 04:25
@sharan-lh and if the num is larger or equal to the string length, there is no need to slice the string.
gowthamteja
@gowthamteja
Jan 22 2016 04:25
in import google font
Kevin
@kw7oe
Jan 22 2016 04:26
@gowthamteja h2 { font-family: "Lobster";}
Tate Song
@tbobo
Jan 22 2016 04:26
hi guys :D
cannelflow
@cannelflow
Jan 22 2016 04:26
@sharan-lh yes @kw7oe is right yu need to insert condition for (num-3) also
catfest
@catfest
Jan 22 2016 04:26
Hey, so I'm having trouble with "Link to External Pages with Anchor Elements", it's telling me I've completed none of the required things for the task, but I'm not sure what's wrong?
Manish Giri
@Manish-Giri
Jan 22 2016 04:26
@LaurynShipp did you get your code working?
cannelflow
@cannelflow
Jan 22 2016 04:26
@gowthamteja h2{ font-family:lobster} in style
Kevin
@kw7oe
Jan 22 2016 04:27
@gowthamteja check it here https://www.google.com/fonts#UsePlace:use
cannelflow
@cannelflow
Jan 22 2016 04:27
@dragonfly2540 <div class="container-fluid">html</div>
catfest
@catfest
Jan 22 2016 04:30
Could someone check my code for me? I'm not sure what's wrong.
<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>

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

<a href="http://freecatphotoapp.com">cat photos</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>
Kevin
@kw7oe
Jan 22 2016 04:31
@catfest you need to 'Lobster'
Instead of just Lobster
catfest
@catfest
Jan 22 2016 04:31
The issue is with the anchor element though
It's for the "Link to External Pages with Anchor Elements" one
cannelflow
@cannelflow
Jan 22 2016 04:32
@catfest which exercise are you doing?
Kevin
@kw7oe
Jan 22 2016 04:32
@catfest okay let me take a look
catfest
@catfest
Jan 22 2016 04:32
Link to External Pages with Anchor Elements
Says I need to
Your a element should have the anchor text of "cat photos".
You need an a element that links to http://freecatphotoapp.com
Make sure your a element has a closing tag.
and I'm pretty sure I've done all that
Kevin
@kw7oe
Jan 22 2016 04:33
@catfest i don't see anything wrong, may try to refresh and run again?
catfest
@catfest
Jan 22 2016 04:33
alright, i will
cannelflow
@cannelflow
Jan 22 2016 04:33
<a href="http://freecatphotoapp.com">cat photos</a> @catfest looks good try refreshing page
catfest
@catfest
Jan 22 2016 04:34
Fixed, weird
does that happen often?
Sharan L
@sharan-lh
Jan 22 2016 04:34
I have Added num-3 condition it's not working
function truncate(str, num) {
  // Clear out that junk in your trunk
  if(str.length >= num){
     return str.slice(0,num-3)+'...';
   }
  else{
      var str1 = str.slice(0,num);
      }

}

truncate("A-tisket a-tasket A green and yellow basket", 11);
truncate("A-tisket a-tasket A green and yellow basket", "A-tisket a-tasket A green and yellow basket".length) this condition is not working.
catfest
@catfest
Jan 22 2016 04:35
thanks @cannelflow
CamperBot
@camperbot
Jan 22 2016 04:35
catfest sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 506 | @cannelflow | http://www.freecodecamp.com/cannelflow
catfest
@catfest
Jan 22 2016 04:35
thanks @kw7oe
CamperBot
@camperbot
Jan 22 2016 04:35
catfest sends brownie points to @kw7oe :sparkles: :thumbsup: :sparkles:
:star: 310 | @kw7oe | http://www.freecodecamp.com/kw7oe
Kevin
@kw7oe
Jan 22 2016 04:35
@sharan-lh if the num is equal or larger than the string length, you should not slice anything.
you're welcome @catfest
Liight
@Liight
Jan 22 2016 04:36
Has anyone got an elegant solution for delaying a loop in JS/jQuery? i.e: Making a for loop "wait" or "delay" for X amount of time between iterations.
cannelflow
@cannelflow
Jan 22 2016 04:36
@sharan-lh i had solved it little bit different if you want you can check it here https://repl.it/BftB
@sharan-lh you can use slice or substr tough
@Liight which exercise ?
Kevin
@kw7oe
Jan 22 2016 04:38
@sharan-lh there are 2 other conditions you need to check, first is the number, if it is larger than the string length, there is no need to slice the string, if it is smaller or equal to 3, the length of the 3 dots is not added to the string length.
Liight
@Liight
Jan 22 2016 04:39
@cannelflow I'm making the "Simon Game". I require "something" to happen inside a for loop, but this "something" takes some time. I'd like to "slow" the loop so that this "something" can happen before the next iteration.
Sharan L
@sharan-lh
Jan 22 2016 04:40
Thanks @cannelflow i forgot to add smaller or equal to 3 conditon
CamperBot
@camperbot
Jan 22 2016 04:40
sharan-lh sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 507 | @cannelflow | http://www.freecodecamp.com/cannelflow
Sharan L
@sharan-lh
Jan 22 2016 04:40
thanks @kw7oe
CamperBot
@camperbot
Jan 22 2016 04:40
sharan-lh sends brownie points to @kw7oe :sparkles: :thumbsup: :sparkles:
:star: 311 | @kw7oe | http://www.freecodecamp.com/kw7oe
Kevin
@kw7oe
Jan 22 2016 04:43
@sharan-lh you're welcome.
Liight
@Liight
Jan 22 2016 04:43
@cannelflow You'd think they would! I've been researching this for a few hours now, perhaps I best leave it for fresh eyes tomorrow.
Tanim
@tanimmahmud
Jan 22 2016 04:43
Hi, I am having problem with one waypoint. can anyone please help
cannelflow
@cannelflow
Jan 22 2016 04:44
@Liight that is also a good idea
@tanimmahmud name ?
Tanim
@tanimmahmud
Jan 22 2016 04:45
Nesting For Loops
Christopher Mickell
@cmmickell
Jan 22 2016 05:13
hello all
i am stuck on sizing an image. it is telling me my img element should have the class smaller-image
wherever I put the code into img element
its not working
Will G
@willgorham
Jan 22 2016 05:14
Hey @cmmickell can you post your code?
Christopher Mickell
@cmmickell
Jan 22 2016 05:14
can someone help?
Chris Eisenbraun
@chriseisenbraun
Jan 22 2016 05:14
@cmmickell sure thng
Christopher Mickell
@cmmickell
Jan 22 2016 05:15
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

<img src="https://bit.ly/fcc-relaxing-cat" .smaller-image {
     width: 100px;}>

<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>
Chris Eisenbraun
@chriseisenbraun
Jan 22 2016 05:15
@cmmickell You want the answer? Or you want a clue...
Christopher Mickell
@cmmickell
Jan 22 2016 05:16
clue
@chriseisenbraun clue
Will G
@willgorham
Jan 22 2016 05:17
@cmmickell between the <style> tags is where you define the styles, and then you can apply those styles to the elements by setting their 'class' attribute (e.g. setting class='red-text' on your <p> elements applies the styles in the .red-text{} block to them)
with me so far?
Christopher Mickell
@cmmickell
Jan 22 2016 05:19
@chriseisenbraun thank you for your help
CamperBot
@camperbot
Jan 22 2016 05:19
cmmickell sends brownie points to @chriseisenbraun :sparkles: :thumbsup: :sparkles:
:star: 162 | @chriseisenbraun | http://www.freecodecamp.com/chriseisenbraun
Christopher Mickell
@cmmickell
Jan 22 2016 05:19
@willgorham thank you for your help
Will G
@willgorham
Jan 22 2016 05:20
No problem - did you get things to work?
Chris Eisenbraun
@chriseisenbraun
Jan 22 2016 05:22
@cmmickell You bet - remember - look to the formatting of the .red-text for your clue.
Fayheim
@Fayheim
Jan 22 2016 05:28
<div class="row">
    <div class="col-xs-6">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-6">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-6">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
can anybody help me
"Nest all of your radio buttons within a <div class="row"> element. Then nest each of them within a <div class="col-xs-6"> element."
im stuck here
Will G
@willgorham
Jan 22 2016 05:30
@Fayheim your radio buttons look like this: <input type='radio'>
Vince Aggrippino
@VAggrippino
Jan 22 2016 05:35
@Fayheim Radio buttons are <input type="radio"> and have to be inside of a <form>. So, it would look something like
<form id="theform">
<div class="row">
    <div class="col-xs-6">
      <input type="radio" class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
...
</form>
Naveen
@naveenkumarkg
Jan 22 2016 05:35
Link to External Pages with Anchor Elements i having an error
this is the error :Your a element should have the anchor text of "cat photos".
Will G
@willgorham
Jan 22 2016 05:36
@navinkumarkg so between your opening <a> and closing </a> tags you should have the text 'cat photos'
Irfan Syed
@syedirfan7
Jan 22 2016 05:38
@Fayheim as it is clear in the hint that the button type should be of radio .do you have any of such buttons in your code?
Naveen
@naveenkumarkg
Jan 22 2016 05:38
@willgorham i will try and see
it worked , thank you @willgorham ., i was confused with the sentences
CamperBot
@camperbot
Jan 22 2016 05:39
navinkumarkg sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:star: 408 | @willgorham | http://www.freecodecamp.com/willgorham
Will G
@willgorham
Jan 22 2016 05:39
@navinkumarkg you're welcome :+1:
Matt Reynolds
@mareynolds
Jan 22 2016 05:53
How do I override a body class with another text color class in an h1 element?
Vince Aggrippino
@VAggrippino
Jan 22 2016 05:54
@acctg4code
body { color: blue; }
h1 { color: red; }
cannelflow
@cannelflow
Jan 22 2016 06:12
can anyone tell me why my counter is not getting value 5 http://codepen.io/cannelflow/pen/jWLqGy
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:12
having difficulty getting a font to be a certain font family in an h2 element.

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

<style>
.red-text {
color: red;}
p { font-size: 16px;font-family: Monospace;}


</style>

<h2{font-family: Lobster}; 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>

cannelflow
@cannelflow
Jan 22 2016 06:13
@josephdobbs1993to22 which exercise ?
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:14
16 i believe.
cannelflow
@cannelflow
Jan 22 2016 06:15
@josephdobbs1993to22 name?
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:15
import a google font
cannelflow
@cannelflow
Jan 22 2016 06:15
@cannelflow please mention persons name while communicating so that we can get notification
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:16
@cannelflow When you get the innerHtml like that, Javascript treats the value as a string even if it's a number. You need to use Javascript's parseInt() function to turn it into a number. e.g.
var counter = parseInt(document.getElementById('theCount').innerHtml);
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:16
@cannelflow i have imported successfully,kept my p elemen monospace, but cant get the h2 to be lobster.
cannelflow
@cannelflow
Jan 22 2016 06:17
@josephdobbs1993to22 h2{
font-family:lobster;
} should be inside style tag
Emma Clark
@sapphirestone
Jan 22 2016 06:17
Hey, I've just finished Waypoint
Return a Value from a Function with Return. Here's my code:

// Example
function minusSeven(num) {
return num - 7;
}

// Only change code below this line
function timesFive(num) {
return num * 5;
}
var answer = timesFive(5);

cannelflow
@cannelflow
Jan 22 2016 06:17
@Ghodmode thank you
CamperBot
@camperbot
Jan 22 2016 06:17
cannelflow sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:star: 31 | @ghodmode | http://www.freecodecamp.com/ghodmode
Emma Clark
@sapphirestone
Jan 22 2016 06:18
My question is does anyone know if num is a variable or some kind of inbuilt function?
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:19
@josephdobbs1993to22 I think it may be a typo in the instructions and monospace has to be all lower-case.
Christine Babu
@Geeksten
Jan 22 2016 06:19
@sapphirestone num is the variable that holds your input. You can use i, myinput, val, whatever you want to call it.
mkumar07
@mkumar07
Jan 22 2016 06:19
@sapphirestone in your given case, num us acting as varible in which you are passing value
cannelflow
@cannelflow
Jan 22 2016 06:19
@sapphirestone num is variable in this case
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:20
@cannelflow i've moved it there and it still is not working
cannelflow
@cannelflow
Jan 22 2016 06:21
@josephdobbs1993to22 show me code now
Emma Clark
@sapphirestone
Jan 22 2016 06:21
@mkumar07 That's weird that num is a variable seeing that it hasn't been declared like 'var num = 0'
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:22
@Ghodmode the monospace is working fine its the lobster that isnt.
scottmike0
@scottmike0
Jan 22 2016 06:22
i like how in javascript everything is var :D
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:22

@cannelflow ```html

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

<style>
.red-text {
color: red;}
p { font-size: 16px;font-family: Monospace;}
h2 {font-family: Lobster}

</style>

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

```

Christine Babu
@Geeksten
Jan 22 2016 06:22
@sapphirestone You will parse the value when you call the function, in this example you parse 5. Hence assigning 5 to num when you call the function.
cannelflow
@cannelflow
Jan 22 2016 06:24
@josephdobbs1993to22 TRY REMOVING ; FROM YOUR <h2; class="red-text">CatPhotoApp</h2>
mkumar07
@mkumar07
Jan 22 2016 06:24
@sapphirestone Yup, @Geeksten told this correctly. It type has not been declared, but it become assigned with 5 as soon as you call the function, or parse the value
Emma Clark
@sapphirestone
Jan 22 2016 06:25
What does "parse" mean? May seem like a silly question, but I'm still trying to understand the lingo
cannelflow
@cannelflow
Jan 22 2016 06:25
can anyone tell me why my counter is not getting value 5 http://codepen.io/cannelflow/pen/jWLqGy
@Ghodmode
freebutterfly34
@freebutterfly34
Jan 22 2016 06:26
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green; 
  }
  .pink-text={color: pink;}

</style>
<h1 class="pink-text">Hello World!</h1>
mkumar07
@mkumar07
Jan 22 2016 06:26
@sapphirestone parse basically means passing the variable
josephdobbs1993to22
@josephdobbs1993to22
Jan 22 2016 06:26
@cannelflow that was it.
freebutterfly34
@freebutterfly34
Jan 22 2016 06:27
can someone tell me what I am doing wrong please?
mkumar07
@mkumar07
Jan 22 2016 06:27
@sapphirestone Something like assigning the value to variable of any particular function
chaitanya ashtekar
@chaitanyaashtekar
Jan 22 2016 06:27
@FabioParaiso remove the = sign in .pink-text
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:28
@cannelflow I see the problem now. The "HTML" in innerHTML has to be all capitalized. It's not actually getting the innerHTML of the element.
freebutterfly34
@freebutterfly34
Jan 22 2016 06:28
@chaitanyaashtekar thanks!
CamperBot
@camperbot
Jan 22 2016 06:28
freebutterfly34 sends brownie points to @chaitanyaashtekar :sparkles: :thumbsup: :sparkles:
:star: 277 | @chaitanyaashtekar | http://www.freecodecamp.com/chaitanyaashtekar
cannelflow
@cannelflow
Jan 22 2016 06:29
@Ghodmode like .innerHTML
@Ghodmode WORKED LIKE CHARM
Emma Clark
@sapphirestone
Jan 22 2016 06:29
Thanks for the advice!
cannelflow
@cannelflow
Jan 22 2016 06:29
@Ghodmode thank you
CamperBot
@camperbot
Jan 22 2016 06:29
cannelflow sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:warning: cannelflow already gave ghodmode points
In my pen some nav elements (on the right) don't work properly
If you scroll your mouse horizontally across them slowly, you'll see a few regions that cannot be clicked
Why is that?
cannelflow
@cannelflow
Jan 22 2016 06:32
@CodingDucky which region this one CodingDucky's Web Design
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 06:32
huh?
If you're asking where the business is based, nowhere, it's for a Zipline, if not then idk what you're talking about @cannelflow
Richard
@RichardGTech
Jan 22 2016 06:33
trying to make my img element a smaller-image class

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

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

h2 {
font-family: Lobster, Monospace;
}
img {
width: 100px;
}

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

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

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

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

cannelflow
@cannelflow
Jan 22 2016 06:34
@CodingDucky im saying which region is not clickable
Richard
@RichardGTech
Jan 22 2016 06:34
this is what I have so far. My image is 100 px wide
cannelflow
@cannelflow
Jan 22 2016 06:35
@ProfessorMagus give your img tag class smaller-image then give it what it is asked
CoderST
@CoderSourabh
Jan 22 2016 06:35
@ProfessorMagus make a class smaller-image and declare the width there
nilesh sinha
@nilesh2008s
Jan 22 2016 06:35
do anyone have the idea of material design
Richard
@RichardGTech
Jan 22 2016 06:37
tried
cannelflow
@cannelflow
Jan 22 2016 06:38
@ProfessorMagus shoe code and try mentioning name of thoes people who are helping you so that they het notified
get
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:38
@CodingDucky It's the left and right padding on the li (from bootstrap) that's causing the problem. Using a selector with a higher specificity like .navli.nava fixes the problem... http://codepen.io/Ghodmode/pen/vLpomN
Jamuna
@JamunaPurushotham
Jan 22 2016 06:40
@ProfessorMagus add .smaller-image {
width: 100px;
} into your style element and mention the class in image
Richard
@RichardGTech
Jan 22 2016 06:41
@JamunaPurushotham I've done that already, it does NOT work
cannelflow
@cannelflow
Jan 22 2016 06:41
@nilesh2008s ?
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 06:41
@Ghodmode oh so it wasn't my fault. Thanks
CamperBot
@camperbot
Jan 22 2016 06:41
codingducky sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:star: 32 | @ghodmode | http://www.freecodecamp.com/ghodmode
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:42
@ProfessorMagus in your <style> add a line that says .smaller-image { width: 100px; }; and insert class="smaller-image" into the img tag itself. I just finished that lesson. It works fine.
Richard
@RichardGTech
Jan 22 2016 06:45
@Ghodmode didn't work for me at all
Ok I just got it
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:46
@ProfessorMagus You may have a typo or an error in your code. paste in your code with what you've tried. The last code you pasted didn't have the CSS property or the class name defined.
Christine Babu
@Geeksten
Jan 22 2016 06:47

@sapphirestone Sorry. It means to pass basically. When I call the function

var answer = timesFive(5);

I am replacing num with 5. I can replace num with 6, 7, or any other number depending on what I want my output to be. That's also another reason why we do not assign num to a value at the beginning because it will always be that value. Let me know if this makes sense.

Richard
@RichardGTech
Jan 22 2016 06:53

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

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

h2 {
font-family: Lobster, Monospace;
}
img {
width: 100px;
}

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

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

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

@Ghodmode this is what I had
zou difan
@zoudifan
Jan 22 2016 06:55

``` (shift+enter for line break)
// Declare your variable here

var myGlobal=10;
function fun1(a) {
// Assign 5 to oopsGlobal Here
console.log(myGlobal - 5);
}

// Only change code above this line
function fun2() {
var output = "";
var myGlobal=10;
if(typeof myGlobal != "undefined") {
output += "myGlobal: " + myGlobal;
}
if(typeof oopsGlobal != "undefined") {
output += " oopsGlobal: " + oopsGlobal;
}
console.log(output);
}

```

Vince Aggrippino
@VAggrippino
Jan 22 2016 06:55
@ProfessorMagus That's the same thing you posted before. It doesn't have the .smaller-image class defined in the style element or a class defined on the img tag.
zou difan
@zoudifan
Jan 22 2016 06:55
blob
what this mean ?
Vince Aggrippino
@VAggrippino
Jan 22 2016 06:57
@zoudifan you didn't assign a value to the oopsGlobal variable. You need oopsGlobal = 5;
zou difan
@zoudifan
Jan 22 2016 06:58
I will try
thanks
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:01

http://codepen.io/CodingDucky/pen/vLpoWG

how do I get my image to the right side of the page, and make it so that it's near to About, and when the text reaches it it'll stop and go to a new line

if that makes any sense

Abin Chetani
@Abinkumar
Jan 22 2016 07:02
how can i create form
in cat photo app where to create id
Andrew Bales
@agbales
Jan 22 2016 07:04
@CodingDucky It's not the best way, because you'll be assigning this property to ALL images. But this works in your case:
img {
  float: right;
}
@Abinkumar You can make a form with <form> </form>
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:05

@CodingDucky

.lmao {
  display: block;
  float: right;
}

http://codepen.io/Ghodmode/pen/wMpVXr

Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:05
Thanks @agbales, I was using 'align'.
CamperBot
@camperbot
Jan 22 2016 07:05
codingducky sends brownie points to @agbales :sparkles: :thumbsup: :sparkles:
:star: 302 | @agbales | http://www.freecodecamp.com/agbales
Abin Chetani
@Abinkumar
Jan 22 2016 07:05
ya i got tht bt how to create id
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:05
@Ghodmode I would thank, but camperbot is stingy
CamperBot
@camperbot
Jan 22 2016 07:05
codingducky sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:warning: codingducky already gave ghodmode points
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:05
like that
Andrew Bales
@agbales
Jan 22 2016 07:06
@Abinkumar Within your form you can add inputs like this:
<input type="text" name="address">
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:06
hehe where do I go to cash in my brownie points for real money?
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:06

However I want it to be on the same level as the text below my 'about'. So that the text will make a thick L when there's enough of it, if you know what I mean

http://codepen.io/CodingDucky/pen/vLpoWG

Abin Chetani
@Abinkumar
Jan 22 2016 07:06
@agbales Give your form element the id cat-photo-form. this is the question
Andrew Bales
@agbales
Jan 22 2016 07:06
you can can assign an id with id=""
@Abinkumar Oh, okay. Within your form tag, add id="cat-pohoto-form"
This works the same way for adding classes--- class="your-class-name"
Abin Chetani
@Abinkumar
Jan 22 2016 07:08
ok
cn i create two form or nt
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:08
@CodingDucky put the img tag before the paragraphs in the HTML. Look at the pen I posted previously.
Andrew Bales
@agbales
Jan 22 2016 07:08
Yes, you can create more than one form in an HTML document if you like.
Bearded One
@EpicBeard
Jan 22 2016 07:09
Has anyone been in the backend portion yet?
victor diaz
@vdmpeniel
Jan 22 2016 07:10
hello guys!!! stupid question over here. When I start a new project in codepen or do a fork, is that suposed to show up in github automatically?
Will G
@willgorham
Jan 22 2016 07:10
@CodingDucky If I get you correctly, you should remove display:block from your image style (.lmao)
Andrew Bales
@agbales
Jan 22 2016 07:10
@vdmpeniel Nope, those are actually two different sites. Not connected.
You can upload code from CodePen to Github or vice-versa, though.
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:10
I figured it out, but I did it a tad bit differently
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:10
@willgorham then the float property won't work.
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:11
I used some bootstrap
scottmike0
@scottmike0
Jan 22 2016 07:12
@CodingDucky thats abit too red
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:13
@scottmike0 thanks for the feedback, but I like red so it'll be staying
CamperBot
@camperbot
Jan 22 2016 07:13
codingducky sends brownie points to @scottmike0 :sparkles: :thumbsup: :sparkles:
:star: 334 | @scottmike0 | http://www.freecodecamp.com/scottmike0
scottmike0
@scottmike0
Jan 22 2016 07:13
@CodingDucky hardcore m8, ok.
Will G
@willgorham
Jan 22 2016 07:13
@Ghodmode actually it doesn't matter at all, by making the element float it forces the display property. You were right in the first place though with putting the image above the paragraph :+1:
scottmike0
@scottmike0
Jan 22 2016 07:13
:D
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:14
Just another issue. When I make the navbar position: fixed;
it seems to have a seizure
Ankit Panwar
@coderNoob
Jan 22 2016 07:15
@CodingDucky Seems to be working fine to me.
wait no
this is the one
scottmike0
@scottmike0
Jan 22 2016 07:16
@CodingDucky i highly recommend c9.io for building sites :D
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:16
This message was deleted
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:16
wait no
@Ghodmode I'll watch the video in a bit
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:17
@CodingDucky oops... wait, use this link with the time code: https://youtu.be/ZNpn7FBp_9U?t=16m54s
Bearded One
@EpicBeard
Jan 22 2016 07:17
I think I found a bug
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:18

http://codepen.io/CodingDucky/pen/vLpoWG

So clearly codepen is being mean and not properly displaying my edits. My point is, when you turn position: stick; (incorrect code) to position: fixed; it kinda has a seizure

Ankit Panwar
@coderNoob
Jan 22 2016 07:19
@Ghodmode Thanks for the link. It's a great video with really good tips.
CamperBot
@camperbot
Jan 22 2016 07:19
codernoob sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:star: 42 | @ghodmode | http://www.freecodecamp.com/ghodmode
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:20

http://codepen.io/CodingDucky/pen/OMzKrx

okay this now shows the monstrosity

Vince Aggrippino
@VAggrippino
Jan 22 2016 07:25

@CodingDucky I'm not sure if it's exactly what you're looking for, but if you tell it where to put your nav with top: 0; and left: 0;, and give it a width of 100%, it should look okay.

It also helps to give it a fixed height and use the same value as a padding-top for the content it will now cover.

http://codepen.io/Ghodmode/pen/xZpvMx

This needs some tweaking.

Ankit Panwar
@coderNoob
Jan 22 2016 07:25
@CodingDucky add width:100% to your .nav class
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:26
@CodingDucky Oh, and I'm not used to using Bootstrap, so my version is messing up because I'm not using the bootstrap classes on the paragraphs I added. I just needed some extra paragraphs there so that I could see the header stay at the top when I scrolled.
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:33
@Ghodmode That worked! Thans=ks
how in the hell did i mistype that badly
Viraj Nandoskar
@virajbnandoskar
Jan 22 2016 07:33
HI I learning HTML5 stuck in start

<style>
h2 {
.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>

h2 element should be red
what is wrong in the code
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:34

http://codepen.io/CodingDucky/pen/wMpVNp

Now only one issue. The 'About' has disappeared

@virajbnandoskar get rid of .h2
Viraj Nandoskar
@virajbnandoskar
Jan 22 2016 07:34
where
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:34

@virajbnandoskar

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

should look like that
Viraj Nandoskar
@virajbnandoskar
Jan 22 2016 07:35
YEah
thks CD
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:35
you're new here right?
when we thank we actually do 'thanks @thenameoftheguyyouwanttothank
CamperBot
@camperbot
Jan 22 2016 07:36
codingducky sends brownie points to @thenameoftheguyyouwanttothank :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for thenameoftheguyyouwanttothank
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:36
@virajbnandoskar you have two different selectors. You can remove the h2 { line because your h2 element has the red-text class.
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:36

http://codepen.io/CodingDucky/pen/wMpVNp

Now only one issue. The 'About' has disappeared. How do I make it flush with the bottom of the nav?

Set 'top' to the pixel length of the nav?\
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:37
awww... I'm creating a new account with the name "thenameof theguyyouwanttothank"...
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:38
nvm i changed padding-top to 30px
Vince Aggrippino
@VAggrippino
Jan 22 2016 07:38
@CodingDucky that's the fixed height of the .nav and the padding-top on the div.about that I was talking about. http://codepen.io/Ghodmode/pen/xZpvMx
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 07:39
Is there a way to get the text to full length once it goes below the image?
Also, I think that the text is a little too close to the left side, is there a way to get it one col-md-1 away from there?
Another issue. When I compress the webpage (like on a mobile site), the text doesn't line up properly.
Is there a way to keep it always flush with the nav?
Richard
@RichardGTech
Jan 22 2016 07:54
Ok I've started doing better but now I am yet again stuck

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

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

<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>
<p> View more <a href="http://freecatphotoapp.com"cat photos</a> to enjoy</p>

Brian
@sludge256
Jan 22 2016 08:08
@ProfessorMagus which challenge are you on?
name wise
zou difan
@zoudifan
Jan 22 2016 08:11
function queue(arr, item) {
  // Your code here



  if(arr[0]>1)
    return arr[0];
  else 
    {
      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, 10)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
I do lick this,but Ican't pass it
blob
blob
someone help me .thanks
Will G
@willgorham
Jan 22 2016 08:14
@zoudifan what's the name of this challenge?
zou difan
@zoudifan
Jan 22 2016 08:15
Stand in Line
Will G
@willgorham
Jan 22 2016 08:18
@zoudifan do you remember .push() and .pop() ?
and .shift() ?
zou difan
@zoudifan
Jan 22 2016 08:18
use .push() and .pop()?
if Iuse it in the function ,the value of the function is change
Will G
@willgorham
Jan 22 2016 08:20
I'm not sure what you mean by 'the value of the function'
eddsaura
@eddsaura
Jan 22 2016 08:21
Why I have to use something I've never used on the previous excercices on a bonfire?? dude
zou difan
@zoudifan
Jan 22 2016 08:21
the function's return value
Will G
@willgorham
Jan 22 2016 08:23
Well, right now the return value of the function is incorrect, so it better change, right? :smile:
Think about what they're asking: A 'queue' is like a line of people, symbolized by the array arr. The question is asking you to put item on the end of the array, and then return the first item of the array.
zou difan
@zoudifan
Jan 22 2016 08:24
'then remove the first element of array'
what this mean
Will G
@willgorham
Jan 22 2016 08:24
'The function should then return the element that was removed.'
zou difan
@zoudifan
Jan 22 2016 08:25
I am not remove the first element
Will G
@willgorham
Jan 22 2016 08:25
if you have an array: [1,2,3,4,5] it's asking you to remove 1 and return it
Sara L
@Sciencesara
Jan 22 2016 08:26
hey guys, how do I link a picture of my editor, so you can understand my problem? Having trouble with turning an image into a link over here, can't understand what I'm doing wrong!
Brian
@sludge256
Jan 22 2016 08:26
highlight code
click copy pretty
zou difan
@zoudifan
Jan 22 2016 08:26
return "the remove element "?
Brian
@sludge256
Jan 22 2016 08:26
paste into chat
Sara L
@Sciencesara
Jan 22 2016 08:26
@sludge256 thanks!
CamperBot
@camperbot
Jan 22 2016 08:26
sciencesara sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 971 | @sludge256 | http://www.freecodecamp.com/sludge256
Sara L
@Sciencesara
Jan 22 2016 08:26
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat"></a>
zou difan
@zoudifan
Jan 22 2016 08:27
@willgorham I see ,thanks
CamperBot
@camperbot
Jan 22 2016 08:27
zoudifan sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:star: 409 | @willgorham | http://www.freecodecamp.com/willgorham
Sara L
@Sciencesara
Jan 22 2016 08:27
I'm supposed to nest this image within an a element, but it doesn't work
Will G
@willgorham
Jan 22 2016 08:28
@Sciencesara your code looks right. what error are you getting?
@zoudifan you're welcome :+1:
Brian
@sludge256
Jan 22 2016 08:28
@Sciencesara did you nest the image that was already there?
or did you make a new one
Sara L
@Sciencesara
Jan 22 2016 08:29
I've tried both the example image in the instructions and the relaxing cat piture I've used before. Nothing works
Brian
@sludge256
Jan 22 2016 08:31
can you post the full code you have?
Sara L
@Sciencesara
Jan 22 2016 08:32
the entir thing?
entire*
Brian
@sludge256
Jan 22 2016 08:32
yep
and the lesson name please
Sara L
@Sciencesara
Jan 22 2016 08:33
Lesson name= Turn an Image into a Link
Joseph odhiambo
@Theonlysmartboy
Jan 22 2016 08:33
can someone help me with the Return Early Patterns for functions?
here is my code
function abTest(a, b) {
  // Only change code below this line

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


  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}
// Change values below to test your code
abTest(0,2);
Sara L
@Sciencesara
Jan 22 2016 08:34
<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 href="#"><img src="http://bit.ly/fcc-running-cats"></a>

<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>
Will G
@willgorham
Jan 22 2016 08:34
@Theonlysmartboy return undefined without quotes
lot's of people make that mistake
undefined is a specific false-y value, whereas 'undefined' is just a normal string, if that makes sense
Brian
@sludge256
Jan 22 2016 08:35
@Sciencesara what's the title of that lesson?
Sara L
@Sciencesara
Jan 22 2016 08:35
Turn an Image into a Link
Dincel Taspinar
@dincel
Jan 22 2016 08:35
function destroyer(arr) {
  // Remove all the values
  var array = arr.slice.call(arguments);
  function isDestroy(val) {
    return val in array[0]; // How can I reverse this to NOT IN?
  } // I wish it worked like python
  return array.filter(isDestroy);
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Will G
@willgorham
Jan 22 2016 08:36
@Sciencesara you don't need to add a new <img> tag, you should use the one already in the code editor. Try resetting and use the one that's already there
cannelflow
@cannelflow
Jan 22 2016 08:36
@Theonlysmartboy return undefined not"undefibed"
Aleksander Gębicki
@Takumar
Jan 22 2016 08:36
@SaintPeter I never pressed the button for deleting the account, and I am even afraid that it is so easily accessible on the page, but I hope it asks three times: "Are you sure?" :-)
Sara L
@Sciencesara
Jan 22 2016 08:37
@willgorham I'll try it
scottmike0
@scottmike0
Jan 22 2016 08:37
fite i
:D
I AM GOD FOR I HAVE FULLY MADE MY FUNCTIONS WORK!!!!
Brian
@sludge256
Jan 22 2016 08:38
@Sciencesara I'm not sure whwere you got the running cats img from but you should be nesting the relaxing cat picture
scottmike0
@scottmike0
Jan 22 2016 08:38
in java
Brian
@sludge256
Jan 22 2016 08:38
when I loaded the lesson I only got the relaxing cat image @Sciencesara
Richard
@RichardGTech
Jan 22 2016 08:38
@sludge256 Nest an Anchor Element with a paragraph
Joseph odhiambo
@Theonlysmartboy
Jan 22 2016 08:38
@cannelflow it is actually undefined check again
Will G
@willgorham
Jan 22 2016 08:39
@Theonlysmartboy no quotes man, undefined with no quotes. Read my comment above ^
cannelflow
@cannelflow
Jan 22 2016 08:39
@Sciencesara you need only one img tag with a tag
Brian
@sludge256
Jan 22 2016 08:39
@Theonlysmartboy they're saying don't make it a string
Joseph odhiambo
@Theonlysmartboy
Jan 22 2016 08:40
thanks @willgorham but would you elaborate to me why we don't need the quotes yet it is a string
CamperBot
@camperbot
Jan 22 2016 08:40
theonlysmartboy sends brownie points to @willgorham :sparkles: :thumbsup: :sparkles:
:star: 410 | @willgorham | http://www.freecodecamp.com/willgorham
cannelflow
@cannelflow
Jan 22 2016 08:40
@Theonlysmartboy don't go for spell men i just want to say return ""
Brian
@sludge256
Jan 22 2016 08:40
undefined is a value
cannelflow
@cannelflow
Jan 22 2016 08:40
remove
Brian
@sludge256
Jan 22 2016 08:41
it wants you to return the value undefined
not the string undefined
Kashif
@kshf
Jan 22 2016 08:41

@Sciencesara ```html

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

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

Brian
@sludge256
Jan 22 2016 08:41
@ProfessorMagus so your bottom line of code
<p> View more <a href="http://freecatphotoapp.com"cat photos</a> to enjoy</p>
is unecessary
Joseph odhiambo
@Theonlysmartboy
Jan 22 2016 08:41
ok I now get it thanks @sludge256
CamperBot
@camperbot
Jan 22 2016 08:41
theonlysmartboy sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 973 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Jan 22 2016 08:41
there's already an anchor element in the existing code that you modify @ProfessorMagus
instead of creating a new anchor element
Will G
@willgorham
Jan 22 2016 08:41
@Theonlysmartboy undefined is a value that you can think of as equal to false, whereas the string 'undefined' just represents the word undefined
Kashif
@kshf
Jan 22 2016 08:42
@Sciencesara remove one of your anchor tag and nest anchor tag and img tag within the<p> tag
it should work....mine is working fine!!!
Brian
@sludge256
Jan 22 2016 08:44
good luck guys
I'm out for the night
Sara L
@Sciencesara
Jan 22 2016 08:47
thank you, I still haven't figured it out but I'll try this @kshf
CamperBot
@camperbot
Jan 22 2016 08:47
sciencesara sends brownie points to @kshf :sparkles: :thumbsup: :sparkles:
:star: 90 | @kshf | http://www.freecodecamp.com/kshf
Kashif
@kshf
Jan 22 2016 08:48
All the best @Sciencesara
Will G
@willgorham
Jan 22 2016 08:49
@Sciencesara still in the same place?
Sara L
@Sciencesara
Jan 22 2016 08:49
I just solved it! @kshf @willgorham @sludge256 thanks guys!
CamperBot
@camperbot
Jan 22 2016 08:49
sciencesara sends brownie points to @kshf and @willgorham and @sludge256 :sparkles: :thumbsup: :sparkles:
:warning: sciencesara already gave kshf points
:warning: sciencesara already gave sludge256 points
:star: 411 | @willgorham | http://www.freecodecamp.com/willgorham
Will G
@willgorham
Jan 22 2016 08:50
nice! :+1:
Kashif
@kshf
Jan 22 2016 08:51
gud... @Sciencesara
Abhitej Vissamsetty
@abhitej60
Jan 22 2016 09:10
any idea about word blanks in java script?
cannelflow
@cannelflow
Jan 22 2016 09:11
@abhitej60 you need to make a sentence using input
Abhitej Vissamsetty
@abhitej60
Jan 22 2016 09:12
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line

result = "cat "+ "little " + "hit " + "slowly";
result2 = "dog "+ "big " + "ran " + "quickly";
  // Your code above this line
  return result , result2;

}

// Change the words here to test your function
wordBlanks("cat", "little", "hit", "slowly");

wordBlanks("dog", "big", "ran", "quickly");
@cannelflow i've managed to do this
cannelflow
@cannelflow
Jan 22 2016 09:13
@abhitej60 myNoun, myAdjective, myVerb, myAdverb is your input so make sentence using then
variable
you need only one result
Abhitej Vissamsetty
@abhitej60
Jan 22 2016 09:14
ok
i'll try it thank you :) (y)
@cannelflow
cannelflow
@cannelflow
Jan 22 2016 09:16
try pressing + & - button randomly any idea why it doing like this http://codepen.io/cannelflow/pen/jWLqGy
Jon
@addsurfjunkie
Jan 22 2016 09:21
<h2 style="color: blue">CatPhotoApp</h2>
cannelflow
@cannelflow
Jan 22 2016 09:23
@addsurfjunkie ?
Jon
@addsurfjunkie
Jan 22 2016 09:24
A.d.d attention deficit
I like to surf
I'm doing my first assignment. Changing the text color I'm stuck
I tried to copy a screen shot and paste? How do I share on here? Plz
cannelflow
@cannelflow
Jan 22 2016 09:33
@addsurfjunkie which exercise ?
daniel
@h311o
Jan 22 2016 09:34
this is the json that is returned from the api:
{"coord":{"lon":7.86,"lat":51.63},"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon":"01d"}],"base":"cmc stations","main":{"temp":269.81,"pressure":1027,"humidity":68,"temp_min":267.25,"temp_max":271.78},"wind":{"speed":4.6,"deg":150},"clouds":{"all":0},"dt":1453453880,"sys":{"type":1,"id":4912,"message":0.0135,"country":"DE","sunrise":1453447272,"sunset":1453478370},"id":2847541,"name":"Rhynern","cod":200}
Jon
@addsurfjunkie
Jan 22 2016 09:34
Cat photo app
daniel
@h311o
Jan 22 2016 09:34
I have no issue accessing the numbers but get undefined every time I try to access one of the Strings
weatherObj.main.temp would return 269.81
weatherObj.weather.main returns undefined
what am i missing?
Gert Hattingh
@gertjeza
Jan 22 2016 09:36
@addsurfjunkie just copy this: <h2 style="color: blue">CatPhotoApp</h2> and replace the default <h2>CatPhotoApp</h2>
Jon
@addsurfjunkie
Jan 22 2016 09:37
@cannelflow I have a feeling it's very basic
daniel
@h311o
Jan 22 2016 09:37
@cannelflow you are using two different variables?
Zulfi
@ZulfiFaiz
Jan 22 2016 09:37
its very basic :)
Jon
@addsurfjunkie
Jan 22 2016 09:37

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

cannelflow
@cannelflow
Jan 22 2016 09:38
@h311o codepen yes
Jon
@addsurfjunkie
Jan 22 2016 09:38
My h2 element should be red?
Zulfi
@ZulfiFaiz
Jan 22 2016 09:38
u will be a pro soon
Jon
@addsurfjunkie
Jan 22 2016 09:39
I might have a kittie photo app meow
daniel
@h311o
Jan 22 2016 09:39
@cannelflow I am guessing you want it to decrease by one when you click on the "-" and increase by 1 on the "+"
cannelflow
@cannelflow
Jan 22 2016 09:40
@addsurfjunkie in your style h2{ color: red}
@h311o yes
daniel
@h311o
Jan 22 2016 09:40
@cannelflow so why would you use two different variables?
cannelflow
@cannelflow
Jan 22 2016 09:41
@h311o ok so how to proceed then ?
daniel
@h311o
Jan 22 2016 09:42
@cannelflow simply use one which you increase/decrease on click and which you access to change the counter.
Jon
@addsurfjunkie
Jan 22 2016 09:43
@cannelflow got it
daniel
@h311o
Jan 22 2016 09:44
var counter = 0;
$('.minus').click(function() {
   counter--;
   $('.counter').text(counter);
}
cannelflow
@cannelflow
Jan 22 2016 09:46
@h311o thank you
CamperBot
@camperbot
Jan 22 2016 09:46
cannelflow sends brownie points to @h311o :sparkles: :thumbsup: :sparkles:
:star: 276 | @h311o | http://www.freecodecamp.com/h311o
cannelflow
@cannelflow
Jan 22 2016 09:47
@h311o got you check it out now
daniel
@h311o
Jan 22 2016 09:48
@cannelflow seems fine now?
cannelflow
@cannelflow
Jan 22 2016 09:48
@h311o yes
Javiwan
@Javiwan
Jan 22 2016 09:49
Hi everyone, is there anyway to see the answers of other campers to the algorithm part, once I have solved mine? Because sometimes I don't know if I am giving the best answer.
Pranav Doshi
@pranavdoshi
Jan 22 2016 09:49
you can view them within the gist of persons github account
Marius
@Drivez
Jan 22 2016 09:50
or on there FCC profile page
cannelflow
@cannelflow
Jan 22 2016 09:50
@Javiwan go to their profile page if they solved it you can see it
Javiwan
@Javiwan
Jan 22 2016 09:51
@pranavdoshi @Drivez @cannelflow Thank you!
CamperBot
@camperbot
Jan 22 2016 09:51
javiwan sends brownie points to @pranavdoshi and @drivez and @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 291 | @pranavdoshi | http://www.freecodecamp.com/pranavdoshi
:star: 272 | @drivez | http://www.freecodecamp.com/drivez
:star: 510 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Jan 22 2016 09:52
@Javiwan above is our,s profile link you can check it now :P
Javiwan
@Javiwan
Jan 22 2016 09:53
@cannelflow yes but I can only acces to the gist account profile, I can't see the exercise of the free code camp
@cannelflow Oh yes, now I see, thank you!
CamperBot
@camperbot
Jan 22 2016 09:54
javiwan sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:warning: javiwan already gave cannelflow points
cannelflow
@cannelflow
Jan 22 2016 09:55
:+1: @Javiwan
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 09:55
http://codepen.io/CodingDucky/pen/wMpVNp Is there a way to make the 'About' flush with the bottom of the nav bar, without using padding or anything like that? When it's on mobile it begins to look messed up of you use padding.
daniel
@h311o
Jan 22 2016 09:56
http://codepen.io/fcc-danielw/pen/MKrZNR
anyone a clue why the twitter link is not showing up? it is locally on my machine, simply not on codepen.
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 09:58
Where is it supposed to be?
daniel
@h311o
Jan 22 2016 09:59
@CodingDucky behind the author's name
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 09:59
@h311o Works fine for me, just click the bird
cannelflow
@cannelflow
Jan 22 2016 10:00
and its a link
daniel
@h311o
Jan 22 2016 10:00
@CodingDucky very strange. i've reloaded, used a different browser. nothing.
cannelflow
@cannelflow
Jan 22 2016 10:00
@h311o i can see twitter bird their
why gitter is lagging
daniel
@h311o
Jan 22 2016 10:01
@cannelflow as a side note, clicking the twitter button on your project doesn't do anything for me either btw ...
daniel
@h311o
Jan 22 2016 10:04
has anyone ever tried doing the navigator.geolocation locally by the way?
cannelflow
@cannelflow
Jan 22 2016 10:09
C1apture.PNG
this is where i landed after clicking the bird
@h311o
Jose Dzireh Chong
@CodingDucky
Jan 22 2016 10:14

New issue. I fixed the image problem, but now

http://codepen.io/CodingDucky/pen/BjYaOo

How can I minimise the gap between my text and the image? Like not completely remove it, still leaving like an appropriate gap. Also I don't want the block of text to be shifted, I want the lines of text to be longer.

ALSO final thing, how do I make the image flush with the right wall of the page and the bottom of the 'About'?

Ettiene Grobler
@egrobler
Jan 22 2016 10:25
@CodingDucky the gap can be minimised by changing the right padding of the <p> tag around the text
the rest of the gap is part of the gutter specified by bootstrap
@CodingDucky the image padding stuff is also part of bootstrap built-in styles, but i believe by using the top and right css properties you can move it around a bit to your liking.
kirbyedy
@kirbyedy
Jan 22 2016 10:31
+1
CamperBot
@camperbot
Jan 22 2016 10:31

:point_right: js regex resources [wiki]

Links to useful RegEx resources.

See also: :clipboard: Tutorials | :syringe: Testing | :soccer: Games | :newspaper: Blogs | :package: Software

:pencil: read more about js regex resources on the FCC Wiki

Rohan
@rohancode
Jan 22 2016 10:31
is this a bug <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>
Marc
@CodeRealMarc
Jan 22 2016 10:32
Can anyone help with this please - 'One h4 element should have the text #left-well.' I've tried <h4 class=#left-well> and <h4 #left-well>
daniel
@h311o
Jan 22 2016 10:32
@cannelflow good to know it works for you ;)
kirbyedy
@kirbyedy
Jan 22 2016 10:33
@CodeRealMarc how about putting some " "
btw. # tag means its an id, not a class
I think :)
Joel Santos
@St3ps
Jan 22 2016 10:35
Hey guys, i'm trying to do the first html lesson and I am pretty sure i'm doing everything right on the class element lesson and it still won't let me go next, any idea on how i can get through it?
Marc
@CodeRealMarc
Jan 22 2016 10:36
@kirbyedy like this do you mean <h4 id="left-well"> which I've tried but doesn't work. bless
kirbyedy
@kirbyedy
Jan 22 2016 10:36
since we can teleport infront of your screen, can you please give us your code @St3ps
Joel Santos
@St3ps
Jan 22 2016 10:36
@kirbyedy you're right ;p do i just put it here though?
kirbyedy
@kirbyedy
Jan 22 2016 10:36
help formatting
CamperBot
@camperbot
Jan 22 2016 10:36

: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

kirbyedy
@kirbyedy
Jan 22 2016 10:36
read this first @St3ps
Ettiene Grobler
@egrobler
Jan 22 2016 10:37
@St3ps you can right-click on your code, then select the pretty copy option and paste it here
kirbyedy
@kirbyedy
Jan 22 2016 10:37
@CodeRealMarc no wait, that is not correct
Joel Santos
@St3ps
Jan 22 2016 10:37
<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>
:3 nice
kirbyedy
@kirbyedy
Jan 22 2016 10:37
if left-wall is an id, than it should be <h4 id=" left-well"> something </h4>
Ettiene Grobler
@egrobler
Jan 22 2016 10:39
@CodeRealMarc @kirbyedy ok for a class it should be <h4 class=“left-well”>..</h4>. for an id it should be <h4 id=“left-well”>..</h4>.
then to target that from css you should use .left-well (for a class) or #left-well (for id)
kirbyedy
@kirbyedy
Jan 22 2016 10:39
unless you need to have the text #left-well in h4
Ettiene Grobler
@egrobler
Jan 22 2016 10:39
@kirbyedy yeah if you need the text itself in there then just add #left-well inbetween the h4 tags
kirbyedy
@kirbyedy
Jan 22 2016 10:39
<h4> #left-well </h4>
Joel Santos
@St3ps
Jan 22 2016 10:39
@egrobler , @kirbyedy : disregard, it was fine all along not sure what happened
Ettiene Grobler
@egrobler
Jan 22 2016 10:40
@St3ps nice. was about to ask what are you supposed to be doing. glad you got it sorted
Joel Santos
@St3ps
Jan 22 2016 10:41
@egrobler hehe i think for some reason ctrl+enter just...isnt working?
Ettiene Grobler
@egrobler
Jan 22 2016 10:41
oh when you submit the thing?
Joel Santos
@St3ps
Jan 22 2016 10:41
yeah when i want to run the tests
or submit
Ettiene Grobler
@egrobler
Jan 22 2016 10:42
@St3ps ok. maybe a browser refresh will help? but anyways, that’s nothing a click of the mouse can’t also do.. :)
Joel Santos
@St3ps
Jan 22 2016 10:43
@egrobler yeah definitely not anything to be thinking much about ;)
Ettiene Grobler
@egrobler
Jan 22 2016 10:44
hehe
Mohit Nehru
@MohitNehru
Jan 22 2016 10:48
Declare and initialize a variable total to 0. Use a for loop to add the value of each element of the myArr array to total.
// Example
var ourArr = [ 9, 10, 11, 12];
var ourTotal = 0;

for (var i = 0; i < ourArr.length; i++) {
  ourTotal += ourArr[i];
}

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

// Only change code below this line
var myTotal = 0;
for (var i = 0; i < myArr.length; i++) {
  myTotal += myArr[i];
}
Marc
@CodeRealMarc
Jan 22 2016 10:49
@kirbyedy @egrobler thanks guys it was <h4> #left-well </h4>
CamperBot
@camperbot
Jan 22 2016 10:49
coderealmarc sends brownie points to @kirbyedy and @egrobler :sparkles: :thumbsup: :sparkles:
:star: 312 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
:star: 282 | @egrobler | http://www.freecodecamp.com/egrobler
Mohit Nehru
@MohitNehru
Jan 22 2016 10:50
i am not able to understand doe loop or myArr,
kirbyedy
@kirbyedy
Jan 22 2016 10:50
:thumbsup: @CodeRealMarc
Aleksander Gębicki
@Takumar
Jan 22 2016 10:52
@MohitNehru myArr.lengthproperty stores number of elements of your array, so you repeat your loop so many times as there are numbers in your array. Inside loop you take every element myArr[i] of your array and you add its value to myTotal variable. That's all.
cannelflow
@cannelflow
Jan 22 2016 10:55
any idea why my - button on session length not working http://codepen.io/cannelflow/pen/jWLqGy
Basch
@sebastianjonas
Jan 22 2016 10:58
Hi guys, I just started the object oriented and functional programming section,
there they started talking about callback functions (e.g. Filter Arrays with filter), but don't explain it.
Maybe it's because I'm a german native, but I don't get the concept.
Can anyone explain it to me (like i am a 5 year old) :smile: ?
Aleksander Gębicki
@Takumar
Jan 22 2016 10:59
@cannelflow add hash to worktime in your click function. worktime is ID.
$("#worktime").text(workT);
cannelflow
@cannelflow
Jan 22 2016 11:00
you have eagle's eye @Takumar worked thank you
CamperBot
@camperbot
Jan 22 2016 11:00
cannelflow sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1843 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Jan 22 2016 11:01
@cannelflow glad that I could help, maybe someday I will also do this zipline ;-)
cannelflow
@cannelflow
Jan 22 2016 11:02
@Takumar :smile:
daniel
@h311o
Jan 22 2016 11:03
@cannelflow what's up with the "++" on this line $("#breaktime").text(breakT++);
cannelflow
@cannelflow
Jan 22 2016 11:03
@h311o sry for accident i guess :smile:
daniel
@h311o
Jan 22 2016 11:04
btw ... how do you guys add screen shots to this chat?
Markus Kiili
@Masd925
Jan 22 2016 11:04
@sebastianjonas Functions are objects in javaScript. One property of a function is that it has code that can be invoked with (), which runs the code and returns a value. You can also pass a function to another function as an argument. There you pass the function object. When you pass a callback function to filter, the callback is not invoked. Filter uses the passed function object to filter the array elements.
cannelflow
@cannelflow
Jan 22 2016 11:04
@h311o snap your screen then drag it to chat
daniel
@h311o
Jan 22 2016 11:05
wow. seamless. didn't think of that.
chaitanya ashtekar
@chaitanyaashtekar
Jan 22 2016 11:05
find seek
CamperBot
@camperbot
Jan 22 2016 11:05

find seek

:zero: bonfire seek and destroy

Basch
@sebastianjonas
Jan 22 2016 11:10
@Masd925 Kudos!! but i don't understand this part
"When you pass a callback function to filter, the callback is not invoked. Filter uses the passed function object to filter the array elements."
what would be the callback in this context? I get that it is not invoked because another function is passed, but ...
Markus Kiili
@Masd925
Jan 22 2016 11:11
@sebastianjonas Here is a simple example, where a function is declared and passed to another function:
function func () {
    return "cat";
}
console.log(func);   //Function func
console.log(func()); //"cat"

function run (f) {
    return f();
}

console.log(run(func));  //"cat"
There you pass function func to function run and it uses it by invoking it.
Aleksander Gębicki
@Takumar
Jan 22 2016 11:13
@h311o but you don't say about fragments of code with black background? If so they are only codes formatted with backticks ``` before and after your code.
Markus Kiili
@Masd925
Jan 22 2016 11:13
@sebastianjonas Filter does something like that with the function you pass into it. It uses the callback function to figure out which elements to keep in the array.
Basch
@sebastianjonas
Jan 22 2016 11:14
@Masd925 ok, that i get. so this is meant by callback? passing a function to another functions which executes this function and then applies some of its own logic in addition (like filter does)?
chaitanya ashtekar
@chaitanyaashtekar
Jan 22 2016 11:15
seek and destroy.can anyone help me ??
function destroyer(arr) {
var target=arr[0];
var test1=arr[1];
var test2=arr[2];
function remove(value){
    return target.indexOf(test1)!==-1 && target.indexOf(test2)!==-1;
}
arr=target.filter(remove);
  return arr;
}
Markus Kiili
@Masd925
Jan 22 2016 11:16
@sebastianjonas Callback functions mean 1st class functions. That means that functions are not just code blocks. They are objects that can be created, stored in variables, and passed to functions.
Fayheim
@Fayheim
Jan 22 2016 11:16
Hey everyone
"To start with, create an h3 element, with the text jQuery Playground."
Can anyone please freshen me up on how to do this
xD
Markus Kiili
@Masd925
Jan 22 2016 11:17
@chaitanyaashtekar destroyer has only one parameter arr which only catches the first argument [...]. The extra arguments must be taken from arguments object.
chaitanya ashtekar
@chaitanyaashtekar
Jan 22 2016 11:18
@Masd925 okay will see into that
Markus Kiili
@Masd925
Jan 22 2016 11:18
in destroyer([1, 2, 3, 1, 2, 3], 2, 3); arr will hold [1,2,3,1,2,3] only.
Aleksander Gębicki
@Takumar
Jan 22 2016 11:18
@Fayheim <h3>This is h3 heading</h3>
Fayheim
@Fayheim
Jan 22 2016 11:19
what is jquery text @Takumar
Aleksander Gębicki
@Takumar
Jan 22 2016 11:20
@Fayheim just string: " jQuery Playground" put such string as your heading.
Fayheim
@Fayheim
Jan 22 2016 11:20
@Takumar thanks
CamperBot
@camperbot
Jan 22 2016 11:20
fayheim sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1845 | @takumar | http://www.freecodecamp.com/takumar
Fayheim
@Fayheim
Jan 22 2016 11:21
what about this one
Color your h3 element with the text-primary Bootstrap class, and center it with the text-center Bootstrap class."
i know i know
Aleksander Gębicki
@Takumar
Jan 22 2016 11:21
@Fayheim :-)
Fayheim
@Fayheim
Jan 22 2016 11:21
i just forgotten how
chaitanya ashtekar
@chaitanyaashtekar
Jan 22 2016 11:21
@Masd925 ok. i thought arr will be [1, 2, 3, 1, 2, 3], 2, 3.will look into arguments object.thanks
CamperBot
@camperbot
Jan 22 2016 11:21
chaitanyaashtekar sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 770 | @masd925 | http://www.freecodecamp.com/masd925
Fayheim
@Fayheim
Jan 22 2016 11:22
<h3 class="text-primary text-center">jQuery Playground</h3>
got it!
im a genius!
Aleksander Gębicki
@Takumar
Jan 22 2016 11:23
@Fayheim :thumbsup:
Basch
@sebastianjonas
Jan 22 2016 11:25
@Masd925 Great, Thanks :+1:
CamperBot
@camperbot
Jan 22 2016 11:25
sebastianjonas sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 771 | @masd925 | http://www.freecodecamp.com/masd925
Vadim Grigorov
@Chichavl
Jan 22 2016 11:26

Hi, I am stuck with Bonfire Where art thou here is my code

function where(collection, source) {
  var arr = [];
  var sourceProps = Object.getOwnPropertyNames(source);
  // What's in a name?
  arr = collection.filter(function(element) {

    var collectionProps = Object.getOwnPropertyNames(element);

    if (collectionProps.length != sourceProps.length) {
        return false;
    }

    for (var i = 0; i < collectionProps.length; i++) {
        var propName = collectionProps[i];

        // If values of same property are not equal,
        // objects are not equivalent
        if (element[propName] !== source[propName]) {
            return false;
        }
    }

    // If we made it this far, objects
    // are considered equivalent
    return true;
  });
  return arr;
}

I cannot understand why arr returns empty, but collection array is modified but opposite to right answer - it keeps elements that should be removed and removes element that should be kept.

Mohit Nehru
@MohitNehru
Jan 22 2016 11:27
Selection_019.jpg
there is some issue , i dont understand how to get 20 here.
its very confusing
Iterate Through an Array with a For Loop
var total is bug,
if you dont add var total it says all time error total undefined even though mytotal is already there
Vadim Grigorov
@Chichavl
Jan 22 2016 11:31
@MohitNehru I think you should rename myTotal to total
Mohit Nehru
@MohitNehru
Jan 22 2016 11:31
@Chichavl already did that
Fayheim
@Fayheim
Jan 22 2016 11:32
 <div class="col-xs-6 well">

    </div>
    <div class="col-xs-6 well">

    </div>
Narendra SIngh
@narendra4u
Jan 22 2016 11:32
KaTeX parse error: Unknown column alignment: * at position 21: {array}{*{20}c}̲ {x = \frac{{ : \begin{array}{*{20}c} {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} & {{\rm{when}}} & {ax^2 + bx + c = 0} \\ \end{array}
Fayheim
@Fayheim
Jan 22 2016 11:32
Is there anything wrong with this code?
"Nest one div element with the class well within each of your col-xs-6 div elements."
Vadim Grigorov
@Chichavl
Jan 22 2016 11:32
@MohitNehru What is the name of the challange
Mohit Nehru
@MohitNehru
Jan 22 2016 11:32
Selection_020.jpg
this is what happens
Fayheim
@Fayheim
Jan 22 2016 11:32
@Takumar
Aleksander Gębicki
@Takumar
Jan 22 2016 11:32
@MohitNehru instruction says clearly: Declare and initialize a variable total to 0
Narendra SIngh
@narendra4u
Jan 22 2016 11:32
I am testing to incorporate MathJax in a chat app,, but its doesn't seems to work
Mohit Nehru
@MohitNehru
Jan 22 2016 11:33
@Chichavl Iterate Through an Array with a For Loop