These are chat archives for FreeCodeCamp/Help

31st
Oct 2015
Boris
@boris-in-london
Oct 31 2015 00:07
blob
@pythonlabsstudent , this is what i got . idk why FCC put out 2.29. That's odd.
dwitjes89
@dwitjes89
Oct 31 2015 00:09
Hello Everyone
Boris
@boris-in-london
Oct 31 2015 00:10
hi @dwitjes89
Roger K.
@misterhtmlcss
Oct 31 2015 00:15
@boris-in-london weird eh? I think I’ll mention it to the CodePen guys, see if it’s a bug. Thanks for double checking it in Chrome, I could have but I assumed it wasn’t a bug and that I had made a mistake. @boris-in-london thanks!
CamperBot
@camperbot
Oct 31 2015 00:15
pythonlabsstudent sends brownie points to @boris-in-london and @boris-in-london :sparkles: :thumbsup: :sparkles:
:star: 208 | @boris-in-london | http://www.freecodecamp.com/boris-in-london
:star: 208 | @boris-in-london | http://www.freecodecamp.com/boris-in-london
Julio Radney
@santijames
Oct 31 2015 00:31
hey guys can someone point me in the right direction to adding font from google to my element on HTML
Herman Fassett
@HermanFassett
Oct 31 2015 00:43
use a link tag in the html for the font and then add the font family to your element in css
Julio Radney
@santijames
Oct 31 2015 00:45
@HermanFassett do i add the link before the <style> tag?
thanks @HermanFassett
CamperBot
@camperbot
Oct 31 2015 00:46
santijames sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 491 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Oct 31 2015 00:47
Yeah before the style would work
Juan Sierra
@juan-sierra
Oct 31 2015 00:48
Hello all, got a questions about node school javascript tutorial - for loops-
Steve Traynor
@Effriam
Oct 31 2015 00:55
@jgarciasierra what's your question?
Juan Sierra
@juan-sierra
Oct 31 2015 00:55
@Effriam Have you done that tutorial before?
Steve Traynor
@Effriam
Oct 31 2015 00:56
Yeah, and I'm in college for coding. I know for loops lol
Juan Sierra
@juan-sierra
Oct 31 2015 00:56
Ok cool @Effriam
So the I got the answer right after a bit of messing around with the code
First I was doing this
var total = 0;

var limit = 10;

for (var i = 0; i < limit; i++) {
  total += i;
console.log(total);
}
and it printed all the number and it stopped at 45
but the whole point was just to print 45
so what i did, is that i just put console.log outside the for loop
and it worked
Steve Traynor
@Effriam
Oct 31 2015 01:00
yeah. any output, unless necessary should be outside loops.
Juan Sierra
@juan-sierra
Oct 31 2015 01:01
Is there any way to only get 45 with console log inside the loop?
Herman Fassett
@HermanFassett
Oct 31 2015 01:01
with an if I guess
Steve Traynor
@Effriam
Oct 31 2015 01:03
if (limit === 45) { console.log(total); } or whatever your using to get the 45 number.
Justin Hernandez
@JustinHernandez510
Oct 31 2015 01:07
How do I nest my text field in a form element?
Byron Lagrone
@byronic
Oct 31 2015 01:17
@JustinHernandez510 In HTML, nesting is merely the process of containing one tag's opening and closing inside the opening/closing of another tag, i.e.:
<div id="outer">
  <div id="nested">
  </div>
</div>

Another example, with an a nested inside a div:

<div>
   <a href="#">Link</a>
</div>

That one's probably more readable.

Does that make sense?
TorontoMonkey
@TorontoMonkey
Oct 31 2015 01:33
blob
blob
blob
Hey, noob here. I was wondering if someone could give me some direction at to what I'm doing wrong with nesting.
sorry for the multiple
goal is to nest the buttons all together by <div class="row>
and then nest the individual buttons by <div class="col-xs-6"
Nic Galluzzo
@ngalluzzo
Oct 31 2015 01:42
A row can only have a total of 12 colums
@TorontoMonkey
Byron Lagrone
@byronic
Oct 31 2015 01:43
@TorontoMonkey Did you mean to have three separate divs, each with one individual button inside it? Or did you mean to have onediv with all three button s inside of it?
In addition I agree with @ngalluzzo that when you use col-xs-* that a single row should add up to no more than 12
TorontoMonkey
@TorontoMonkey
Oct 31 2015 02:09
I figured it out, I read the question wrong, apologies.
Basheerabdul
@basheerabdul
Oct 31 2015 02:10
Hello,i am a beginner here
How do i change the colour of the h2 element??
Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:11
h1{}color: @basheerabdul
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:12

var myBike = function() {
var speed = function() {

};
var addUnit = function() {

};

this.getSpeed = function() {

};
};

Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:12
put the color: inside the curly braces
Basheerabdul
@basheerabdul
Oct 31 2015 02:12
Thank you :smile:
CamperBot
@camperbot
Oct 31 2015 02:12
if you want to thank someone, put an @ before their name!
Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:12
and add the color you want inside it- I use a hex wheel at w3 schools
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:12
could anyone point me in the right direction? speed and addUnit need to be private and getSpeed public
bruglesco
@bruglesco
Oct 31 2015 02:14
wiki format
CamperBot
@camperbot
Oct 31 2015 02:14

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<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

Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:15
'''
CamperBot
@camperbot
Oct 31 2015 02:15
:bulb: to format code use backticks! ``` more info
Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:15
@Takumar I am on roman numeral converter... yikes...
bruglesco
@bruglesco
Oct 31 2015 02:15
top left under the escape key
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:15
var myBike = function() {
   var speed = function() {

   };
   var addUnit = function() {

   };

   this.getSpeed = function() {

   };
};
bruglesco
@bruglesco
Oct 31 2015 02:15
perfect
now what is the question?
Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:16
@dantepicasso I just highlighted the page, hit ctr c and pasted it here
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:16
I need to make an object with two private and one public method
speed, addUnit are private
i thought I was undestanding objects until this excercise
Tameera Corporal
@TameeraCorporal
Oct 31 2015 02:18
@rrudzinski you have to add the word private before the functions you want on its own line, then define the functions underneath
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:18
the isntructions say to to make private declare functions within constructor
doesn't mention anything about the word private so I didn't use it
kd13794
@kd13794
Oct 31 2015 02:20
hi campers....It feels great to enter this world of eccentric people wanting new in the world of coding....i hope to get some help in my learning from your experience in near future....Happy coding!!! :smile:
CamperBot
@camperbot
Oct 31 2015 02:20

welcome to FreeCodeCamp @kd13794!

kd13794
@kd13794
Oct 31 2015 02:21
thank you camperbot.... :smile: :+1:
CamperBot
@camperbot
Oct 31 2015 02:21
if you want to thank someone, put an @ before their name!
bruglesco
@bruglesco
Oct 31 2015 02:22
@kd13794 welcome
@rrudzinski nowhere do you write the word private
you have the idea right - i just reviewed my code that passed
kd13794
@kd13794
Oct 31 2015 02:23
@bruglesco thanks bro... feels great to be here... :smile:
CamperBot
@camperbot
Oct 31 2015 02:23
kd13794 sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 216 | @bruglesco | http://www.freecodecamp.com/bruglesco
bruglesco
@bruglesco
Oct 31 2015 02:23
You have no values is all
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:23
@bruglesco I didn't think so, I'm still not sure what I did wrong
bruglesco
@bruglesco
Oct 31 2015 02:23
You have no code within the methods
so they are still undefined - therefore the grader cant grade them.
well the test
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:24
ohh see that trew me off because the checklist states myBike.speed should be undefined
says the same for addUnit
bruglesco
@bruglesco
Oct 31 2015 02:24
because they are private
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:25
ahh
gotacha
bruglesco
@bruglesco
Oct 31 2015 02:25
they will remain undefined even with values in them
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:26
so do I just make up values for this?
bruglesco
@bruglesco
Oct 31 2015 02:27
to be honest Im not sure
I made the getSpeed method return the addUnit method supplied with the speed which I hard coded
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:33
var myBike = function() {
   var speed = function() {
      return 100;
   };
   var addUnit = function(value) {
      return value + "KM/H";
   };

   this.getSpeed = function() {
      return addUnit(speed);
   };
};
bruglesco
@bruglesco
Oct 31 2015 02:33
var speed = 100
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:34
It still does not like getSpeed and speed
I tried
bruglesco
@bruglesco
Oct 31 2015 02:36
well the only thing I did different was write...
function addUnit(value) . . . Not sure why this would make a difference but it may have to do with the checker.
dwitjes89
@dwitjes89
Oct 31 2015 02:38
goodnight everyone. see you all tomorrow
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:39
var myBike = function() {
   var speed = 100;

   function addUnit(value) {
      return value + "KM/H";
   }

   this.getSpeed = function() {
      return addUnit(speed);
   };
};
bruglesco
@bruglesco
Oct 31 2015 02:39
var Bike = function() {
  // Only change code below this line.
  var speed = 100;
  function addUnit(value) {
    return value + "KM/H";
  }

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

};
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:39
I'm lost lol, I've even tried clearing and still nothing
bruglesco
@bruglesco
Oct 31 2015 02:40
ahhh it needs to be var = Bike
it is the constructor function
myBike then becomes an instance of Bike
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:41
@bruglesco thank you! yeah I totally get it now
CamperBot
@camperbot
Oct 31 2015 02:41
rrudzinski sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 217 | @bruglesco | http://www.freecodecamp.com/bruglesco
bruglesco
@bruglesco
Oct 31 2015 02:42
haha dont you hate when it is the littlest things that throw you off
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:43
yeah, i mean i started this section this morning, got stuck here and just left it alone all day thinking i would maybe clear my head, and then it just got silly after a few hours, i even searched around to learn more about objects... but yes i hate that lol
won't make this mistake again
bruglesco
@bruglesco
Oct 31 2015 02:45
yeah sometimes you need to back away
even if it doesnt help you solve it.
It saves you from smashing your computer
Rafal Rudzinski
@rrudzinski
Oct 31 2015 02:46
im glad it didn't get to that point haha
Annika
@kittykat1234
Oct 31 2015 02:52
how do you size images?
bruglesco
@bruglesco
Oct 31 2015 02:54
you need to be more specific
Annika
@kittykat1234
Oct 31 2015 02:56
i'm supposed to make an image 100px but if i put what i'm supposed to it doesn't change the image
bruglesco
@bruglesco
Oct 31 2015 02:57
then you didnt put what you are supposed to
paste your code
wiki format
CamperBot
@camperbot
Oct 31 2015 02:57

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<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

Annika
@kittykat1234
Oct 31 2015 02:58
...
<style>
  .smaller-image {
    width: 100px;
  }
</style>
help please
CamperBot
@camperbot
Oct 31 2015 03:02

:point_right: bonfire no repeats please [wiki]

Problem Explanation:

  • This task requires us to look at each possible permutation of a string. This is best done using a recursion function. Being able to build a function which collects all permutations of a string is a common interview question, so there is no shortage of tutorials out there on how to do this, in many different code languages.
  • This task can still be daunting even after watching a tutorial. You will want to send each new use of the function 3 inputs: 1. a new string (or character array) that is being built, 2. a position in your new string that's going to be filled next, and 3. an idea of what characters (more specifically positions) from the original string have yet to be used. The pseudo code will look something like this:

    ```
    var str = ???;
    perm(current position in original string, what's been used in original string, current string build thus far){
    if(current string is finished) {
    print current string;
    }else{
    for(var i = 0; i < str.length; i++) {

    if(str[i] has not been used) {
      put str[i] into the current position;
      mark str[i] as used
      perm(current position in original string, what's been used in original string, current string build thus far)
      unmark str[i] as used because another branch in the tree for i + 1 will still likely use it;
    }

    }
    }
    }
    :pencil: read more about bonfire no repeats please on the FCC Wiki

bruglesco
@bruglesco
Oct 31 2015 03:09
@kittykat1234 did you add the class to the image?
Annika
@kittykat1234
Oct 31 2015 03:11
@bruglesco yeah...
bruglesco
@bruglesco
Oct 31 2015 03:12
then share all your code so I can help
Annika
@kittykat1234
Oct 31 2015 03:14
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

</style>

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

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

<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>
@bruglesco
bruglesco
@bruglesco
Oct 31 2015 03:15
move smaller image into your first (and should be only) style tag
@kittykat1234
Annika
@kittykat1234
Oct 31 2015 03:22
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

  .smaller-image {
    width: 100px;
  }

</style>
@bruglesco like this?
bruglesco
@bruglesco
Oct 31 2015 03:22
yes
Chris
@clsmith623
Oct 31 2015 03:23
Would anyone know if for the "factorialize a number" bonfire section should I be looking to use a for loop as a starting point?
Annika
@kittykat1234
Oct 31 2015 03:23
@bruglesco it still hasn't changed
bruglesco
@bruglesco
Oct 31 2015 03:23
@clsmith623 I believe that is one way to do it
@kittykat1234 did you delete the extraneous style tag?
ahirsi
@ahirsi
Oct 31 2015 03:24
Hi,
Annika
@kittykat1234
Oct 31 2015 03:24
@bruglesco yes i did
bruglesco
@bruglesco
Oct 31 2015 03:24
@ahirsi hi
@kittykat1234 share the full code again plz
ahirsi
@ahirsi
Oct 31 2015 03:24
I am stuck with the add submit button
bruglesco
@bruglesco
Oct 31 2015 03:24
wiki format
CamperBot
@camperbot
Oct 31 2015 03:24

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<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

Annika
@kittykat1234
Oct 31 2015 03:25
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

  .smaller-image {
    width: 100px;
  }

</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>
@bruglesco
bruglesco
@bruglesco
Oct 31 2015 03:26
@kittykat1234 you did not give your image the class "smaller-image"
Annika
@kittykat1234
Oct 31 2015 03:26
@bruglesco how?
bruglesco
@bruglesco
Oct 31 2015 03:27
look at your h2
Annika
@kittykat1234
Oct 31 2015 03:27
okay and?
bruglesco
@bruglesco
Oct 31 2015 03:28
it has a class
do the same thing to your image
Annika
@kittykat1234
Oct 31 2015 03:29
@bruglesco okay thank you so much
CamperBot
@camperbot
Oct 31 2015 03:29
kittykat1234 sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 218 | @bruglesco | http://www.freecodecamp.com/bruglesco
bruglesco
@bruglesco
Oct 31 2015 03:29
np
Sawredjet
@sawredjet
Oct 31 2015 03:31
Does anyone know how to use an ID Attribute to Style an Element?
Rex Schrader
@SaintPeter
Oct 31 2015 03:33
@sawredjet Sure
@sawredjet You can specificy an id by using #idname { css: stuff }
Sawredjet
@sawredjet
Oct 31 2015 03:34
I have not been able to change my background color using an ID Attribute
Rex Schrader
@SaintPeter
Oct 31 2015 03:35
@sawredjet Can you post your code?
Sawredjet
@sawredjet
Oct 31 2015 03:36

<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%;
}
#cat-photo-element {background-color: green;}
.smaller-image {
width: 100px;
}
.gray-background {
background-color: gray
}
</style>

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

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

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

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

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

bruglesco
@bruglesco
Oct 31 2015 03:36
wiki format
CamperBot
@camperbot
Oct 31 2015 03:36

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<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

bruglesco
@bruglesco
Oct 31 2015 03:36
and hello Peter
Rex Schrader
@SaintPeter
Oct 31 2015 03:39
@sawredjet Your ID should be cat-photo-form:
<form action="/submit-cat-photo" id="cat-photo-form">
@sawredjet Not cat-photo-element:
#cat-photo-element {background-color: green;}
Sawredjet
@sawredjet
Oct 31 2015 03:39
@SaintPeter !
Rex Schrader
@SaintPeter
Oct 31 2015 03:40
@sawredjet !!
bruglesco
@bruglesco
Oct 31 2015 03:41
lol
SaintPeter @SaintPeter bows
Juan Valdes
@Jrv1
Oct 31 2015 03:44
this site is too addicting, i'll be here all night learning!
currently on Waypoint: Link to External Pages with Anchor Elements
Rex Schrader
@SaintPeter
Oct 31 2015 03:45
@Jrv1 :D - Need a hand?
Juan Valdes
@Jrv1
Oct 31 2015 03:45
So far so good, thank you @SaintPeter
CamperBot
@camperbot
Oct 31 2015 03:45
jrv1 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1295 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Oct 31 2015 03:45
Wow, I didn't even do anything!
:D
Juan Valdes
@Jrv1
Oct 31 2015 03:45
You offered help i appreciate it
SaintPeter @SaintPeter bows slightly
Rex Schrader
@SaintPeter
Oct 31 2015 03:46
At your service ;)
Dibyea
@Dibyea
Oct 31 2015 03:48
does anyone know how to nest the i element within the button element?
Rex Schrader
@SaintPeter
Oct 31 2015 03:54
@Dibyea
<parentTag><childTag></childTag></parentTag>
Jack17302
@Jack17302
Oct 31 2015 03:55
can someone help Im stuck on getting <h2 class="red-text">CatPhotoApp</h2> tp red
to*
hello
bruglesco
@bruglesco
Oct 31 2015 03:56
sure can you explain your problem further
Jack17302
@Jack17302
Oct 31 2015 03:56
ok
so the camp wants me to turn CatPhotoApp to red everything is good expect I have an X on your h2 element should be red
except*
Juan Valdes
@Jrv1
Oct 31 2015 03:59
@Jack17302 Did you add the CSS property?
@Jack17302 .red-text {
color: red;
}
Jack17302
@Jack17302
Oct 31 2015 04:00

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

<style>

  .red-text {

    color: red;

  }

</style>

that is what I have
Brett
@bjohn312
Oct 31 2015 04:00
Stuck on adding a border to my image...
Jack17302
@Jack17302
Oct 31 2015 04:00
but it wont turn red
Brett
@bjohn312
Oct 31 2015 04:00
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
Dibyea
@Dibyea
Oct 31 2015 04:00
@SaintPeter thx a million.
CamperBot
@camperbot
Oct 31 2015 04:00
dibyea sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1297 | @saintpeter | http://www.freecodecamp.com/saintpeter
Brett
@bjohn312
Oct 31 2015 04:00
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Juan Valdes
@Jrv1
Oct 31 2015 04:01
your <style> </style> needs to be above your h elements
bruglesco
@bruglesco
Oct 31 2015 04:01
wiki format
CamperBot
@camperbot
Oct 31 2015 04:01

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<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

Jack17302
@Jack17302
Oct 31 2015 04:01
ok
Juan Valdes
@Jrv1
Oct 31 2015 04:01

@Jack17302 <style>

  .red-text {

    color: red;

  }

</style>

then
bruglesco
@bruglesco
Oct 31 2015 04:01
Juan Valdes
@Jrv1
Oct 31 2015 04:01
<h2 class="red-text">CatPhotoApp</h2>
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:02
hi all
Brett
@bjohn312
Oct 31 2015 04:02

'''

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

CamperBot
@camperbot
Oct 31 2015 04:02
:bulb: to format code use backticks! ``` more info
Brett
@bjohn312
Oct 31 2015 04:02

'''

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

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

CamperBot
@camperbot
Oct 31 2015 04:02
:bulb: to format code use backticks! ``` more info
Juan Valdes
@Jrv1
Oct 31 2015 04:02
@Jack17302 did it work? i'm new here too :)
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:02
can anybody help how to Style the HTML Body Element
Jack17302
@Jack17302
Oct 31 2015 04:03

' <style>
  
.red-text {

    color: red;

  }

</style>

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

still didnt work
Brett
@bjohn312
Oct 31 2015 04:03
I'm stuck. It's happened with other users who have the code right, but it doesn't get accepted in certain browsers
bruglesco
@bruglesco
Oct 31 2015 04:03
the backtick is not an apostrophe it is the character just below the escape key
Brett
@bjohn312
Oct 31 2015 04:04
I've tried Firefox and Chrome. Both in and our of incognito mode..
bruglesco
@bruglesco
Oct 31 2015 04:04
john please paste full code with proper format
Brett
@bjohn312
Oct 31 2015 04:04
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

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

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

<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>
bruglesco
@bruglesco
Oct 31 2015 04:04
so I can read it better
@bjohn312 ty
Brett
@bjohn312
Oct 31 2015 04:04
Got it... #rookiemistakes
Jack17302
@Jack17302
Oct 31 2015 04:05

<style>
    
  .red-text {

    color: red;

  }

  </style>

<h2 class="red-text">CatPhotoApp</h2>
still didnt work
@Jrv1
bruglesco
@bruglesco
Oct 31 2015 04:06
@Jack17302 show the rest of the code
@bjohn312 what is being marked with an X?
Brett
@bjohn312
Oct 31 2015 04:06
"Give your image a border width of 10px."
Jack17302
@Jack17302
Oct 31 2015 04:07

<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>
Brett
@bjohn312
Oct 31 2015 04:08
@Jack17302 Does the paragraph need to go red too?
Jack17302
@Jack17302
Oct 31 2015 04:08
no
@bjohn312
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:08
<style>
body {

  background-color: black;

}
</style>
Juan Valdes
@Jrv1
Oct 31 2015 04:08
maybe your braces are too far apart? seems about right
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:09
does this code changes the background to black
am nt able to find any prob in the above one. could anybody help
bruglesco
@bruglesco
Oct 31 2015 04:10
braces can be any immeasurable distance away from each other
@DurgaKavkuntla it should
@bjohn312
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

  .smaller-image {
    width: 100px;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
  }
</style>

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

<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>
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:10
but its not working
Jack17302
@Jack17302
Oct 31 2015 04:10
I just reset the code and got it
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:11
ok thank you i wil try dat
CamperBot
@camperbot
Oct 31 2015 04:11
if you want to thank someone, put an @ before their name!
bruglesco
@bruglesco
Oct 31 2015 04:11
my code is passing - I honestly dont see what is off on yours
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:12
CamperBot
@camperbot
Oct 31 2015 04:12
if you want to thank someone, put an @ before their name!
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:13

<style>
body {

  background-color: black;

}
</style>

<body >
</body>

Brett
@bjohn312
Oct 31 2015 04:13
thanks @bruglesco. I retyped and even copied and pasted. Still not passing the border width condition
CamperBot
@camperbot
Oct 31 2015 04:13
bjohn312 sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 219 | @bruglesco | http://www.freecodecamp.com/bruglesco
Nathan
@terakilobyte
Oct 31 2015 04:14
@bjohn312 what browser/os are you using?
Durga Kavkuntla
@DurgaKavkuntla
Oct 31 2015 04:14
even now the code is not passing
Nathan
@terakilobyte
Oct 31 2015 04:14
and can you paste your code and a link to the challenge once more please?
Brett
@bjohn312
Oct 31 2015 04:14
Currently on Firefox
Nathan
@terakilobyte
Oct 31 2015 04:15
version?
bruglesco
@bruglesco
Oct 31 2015 04:15
im in firefox as well
Brett
@bjohn312
Oct 31 2015 04:15
that went poorly... sorry everyone
bruglesco
@bruglesco
Oct 31 2015 04:15
haha thats what the links look likw
Nathan
@terakilobyte
Oct 31 2015 04:16
@bjohn312 no need to apologize
what version of firefox, and what os?
also, copy your code and if it isn't a pain follow the steps here https://www.google.com/search?q=clear+cache+on+firefox&gws_rd=ssl
see if that helps
Brett
@bjohn312
Oct 31 2015 04:18
I've cleared the cache in both broswers
Rex Schrader
@SaintPeter
Oct 31 2015 04:18
find clear
Brett
@bjohn312
Oct 31 2015 04:18
It's a semi-public computer because I'm helping at a non-profit.
Nathan
@terakilobyte
Oct 31 2015 04:18
ok, did you copy the code and try the local reset button in the window?
Brett
@bjohn312
Oct 31 2015 04:19
yep. But I'll try again for you
No dice
Nathan
@terakilobyte
Oct 31 2015 04:21
alright
what version of firefox are you using?
Brett
@bjohn312
Oct 31 2015 04:22
Just got it in an incognito Chrome browser after a chrome update. Thanks for the support @terakilobyte
CamperBot
@camperbot
Oct 31 2015 04:22
bjohn312 sends brownie points to @terakilobyte :sparkles: :thumbsup: :sparkles:
:star: 195 | @terakilobyte | http://www.freecodecamp.com/terakilobyte
Brett
@bjohn312
Oct 31 2015 04:23
Hopefully I'm problem free for a while!
Juan Valdes
@Jrv1
Oct 31 2015 04:23
@Jack17302 all good?
Nathan
@terakilobyte
Oct 31 2015 04:24
@bjohn312 np, but you should file a bug report with that version of firefox and the os you are using
if it is a browser issue it will likely impact more people
Jayce Crowther
@Jayce77
Oct 31 2015 04:24

Question:
My challenge is to "Now nest your existing a element within a new p element so that the surrounding paragraph says "View more cat photos", but where only "cat photos" is a link, and the rest of the text is plain text."

My line of code is:

<p> View more <a href=""> cat photos. </a> </p>

I'm not getting:
Your a element should be nested within your new p element.
Your p element should have the text "View more " (with a space after it).

What am I missing?

sarahunter
@sarahunter
Oct 31 2015 04:26
@Jayce77 maybe because the period is included in the <a> tag?
Rex Schrader
@SaintPeter
Oct 31 2015 04:27
@Jayce77 You also have a space before cat
Jayce Crowther
@Jayce77
Oct 31 2015 04:27
I just tried to take that ouy
ou
out, but still didn't work
Rex Schrader
@SaintPeter
Oct 31 2015 04:27
@Jayce77 One last thing: Your <p> needs to be the first one after the <h2>
Bill
@kirah1314
Oct 31 2015 04:30
@Jayce77 "Your p element should have the text "View more " (with a space after it)."
Add a space after "more"
dima
@dimayarovinsky
Oct 31 2015 04:30
after i run tests i get - Unexpected token } ? what should i do?
Jayce Crowther
@Jayce77
Oct 31 2015 04:30
I have the space
Rex Schrader
@SaintPeter
Oct 31 2015 04:30
@dimayarovinsky You've got an extra curley brace somewhere
Bill
@kirah1314
Oct 31 2015 04:30
@Jayce77 oh ok, your above codes didn't have a space
paste your new codes?
Jayce Crowther
@Jayce77
Oct 31 2015 04:31
<p>View more <a href=""> cat photos </a> </p>
Rex Schrader
@SaintPeter
Oct 31 2015 04:31
@dimayarovinsky If you put the cursor over each brace and parentheses, you should see an underline under the matching brace
@Jayce77 You have a space before cat
dima
@dimayarovinsky
Oct 31 2015 04:31
@SaintPeter <script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
$("#target6").addClass("animated fadeOut").
});
</script>
Rex Schrader
@SaintPeter
Oct 31 2015 04:32
@Jayce77 Also, I think you need a URL in the href
@dimayarovinsky Hymm, that looks right.
Bill
@kirah1314
Oct 31 2015 04:33
@Jayce77 yeah you have to keep the original href
Jayce Crowther
@Jayce77
Oct 31 2015 04:33
There was no url given
dima
@dimayarovinsky
Oct 31 2015 04:33
@SaintPeter and still got the problem...
Jayce Crowther
@Jayce77
Oct 31 2015 04:33
Ok the original from the previous lesson?
Bill
@kirah1314
Oct 31 2015 04:33
@Jayce77 which waypoint is this?
dima
@dimayarovinsky
Oct 31 2015 04:34
@SaintPeter how can i skip lesson?
Jayce Crowther
@Jayce77
Oct 31 2015 04:34
22
Rex Schrader
@SaintPeter
Oct 31 2015 04:34
@dimayarovinsky Just skip it - go to the map and continue on the next lesson
Bill
@kirah1314
Oct 31 2015 04:34
@Jayce77 you have to keep the href <a href="http://www.freecatphotoapp.com">cat photos</a>
line 30
Jayce Crowther
@Jayce77
Oct 31 2015 04:35
Ok I'll try that. Thanks!
CamperBot
@camperbot
Oct 31 2015 04:35
if you want to thank someone, put an @ before their name!
Bill
@kirah1314
Oct 31 2015 04:35
@Jayce77 yeah reset the codes and redo it :thumbsup:
Jayce Crowther
@Jayce77
Oct 31 2015 04:37
Perfect now. Thanks!
CamperBot
@camperbot
Oct 31 2015 04:37
if you want to thank someone, put an @ before their name!
Jayce Crowther
@Jayce77
Oct 31 2015 04:39
@kirah1314 Perfect now. Thanks!
CamperBot
@camperbot
Oct 31 2015 04:39
jayce77 sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 306 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Bill
@kirah1314
Oct 31 2015 04:40
glad to help, trying to get more brownies like @SaintPeter :)
SaintPeter @SaintPeter is glad to be a role model
Rex Schrader
@SaintPeter
Oct 31 2015 04:41
about @saintpeter
CamperBot
@camperbot
Oct 31 2015 04:41
:star: 1297 | @saintpeter | http://www.freecodecamp.com/saintpeter
Bill
@kirah1314
Oct 31 2015 04:41
i still can't figure out how to do that...
so just roughly 1,000 brownies to go...soon
Rex Schrader
@SaintPeter
Oct 31 2015 04:42
@kirah1314 Haha - Well, I'm on day 76 of my streak: http://www.freecodecamp.com/saintpeter
@kirah1314 I've gotten between 10 and 20 brownies a day, on average, since August 16th, the day @camperbot went live.
Bill
@kirah1314
Oct 31 2015 04:43
wow
Rex Schrader
@SaintPeter
Oct 31 2015 04:43
@kirah1314 I . . . might be a bit obsessed.
Bill
@kirah1314
Oct 31 2015 04:44
that's definitely a lot of brownies, did you pass dting?
Rafal Rudzinski
@rrudzinski
Oct 31 2015 04:44
what exactly are brownies?
Bill
@kirah1314
Oct 31 2015 04:44
about @dting
CamperBot
@camperbot
Oct 31 2015 04:44
:star: 1478 | @dting | http://www.freecodecamp.com/dting
Rex Schrader
@SaintPeter
Oct 31 2015 04:44
@kirah1314 On top of that, the work I've been doing got me dragooned onto the FCC core team, where I'm working on new curriculum for basic JS
wiki brownies
CamperBot
@camperbot
Oct 31 2015 04:44
no wiki entry for: brownies
:pencil: click here to create one now!after creating your page type update to reload it here
Rex Schrader
@SaintPeter
Oct 31 2015 04:44
wiki brownie points
CamperBot
@camperbot
Oct 31 2015 04:44

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Rex Schrader
@SaintPeter
Oct 31 2015 04:44
@kirah1314 Huh, I guess I'm slowly catching up.
Bill
@kirah1314
Oct 31 2015 04:46
@SaintPeter that's great man, many improvements here :thumbsup:
@SaintPeter are you going to work on the non-profits?
Rex Schrader
@SaintPeter
Oct 31 2015 04:47
@kirah1314 Well, only 2 so far - the two new "for" loop waypoints
@kirah1314 That would mean I'd have to actually finish FCC.
@kirah1314 So . . one of these days?
Bill
@kirah1314
Oct 31 2015 04:47
@SaintPeter well gotta start somewhere
@SaintPeter lol but the non-profits are the "real" challenge
Rex Schrader
@SaintPeter
Oct 31 2015 04:48
@kirah1314 No doubt - I've actually done some volunteer work for UC Davis - I wrote a scoreboard system for their "C-STEM Day" event.
@kirah1314 At this time I think my efforts are best put towards the FCC curriculum.
Chad Nickle
@FineBlend
Oct 31 2015 04:51
This message was deleted
Having trouble with Waypoint: Style Text Inputs as Form Controls.
Says I need to give the text input in the form the class "form-control
<form action="/submit-cat-photo">
    <div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane">Submit</i>
  </form>
h4r1m4u
@h4r1m4u
Oct 31 2015 04:54
@FineBlend so give the input class form-control?
Bill
@kirah1314
Oct 31 2015 04:55
@SaintPeter good stuff, wish these new curriculum existed when I started a few months ago :)
Rex Schrader
@SaintPeter
Oct 31 2015 04:55
@kirah1314 It's ever rolling onwards. It's very much like Web Dev in general - there is always some new technology or framework.
Chad Nickle
@FineBlend
Oct 31 2015 04:59
@h4r1m4u got it, thanks ;-)
CamperBot
@camperbot
Oct 31 2015 04:59
fineblend sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 434 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 04:59
:D
Ankur Singh
@Ankurlvv
Oct 31 2015 05:12
Bonfire: Find the Longest Word in a String, can we use replace()??
CamperBot
@camperbot
Oct 31 2015 05:12
Sorry, can't find a bonfire called find the longest word in a string can we use replace. [ Check the map? ]
h4r1m4u
@h4r1m4u
Oct 31 2015 05:14
@Ankurlvv i think you're free to implement the solution any way you like, but i'm not entirely sure why you'd want to use replace() in that bonfire
Ankur Singh
@Ankurlvv
Oct 31 2015 05:15

in case if we got characters , @h4r1m4u

but if i m using replace(), it's causing error??

h4r1m4u
@h4r1m4u
Oct 31 2015 05:17
i don't understand what you mean by "in case if we got characters" and i don't see where replace() would fit in
in any case, if it's giving you error, you're probably doing something wrong
Ankur Singh
@Ankurlvv
Oct 31 2015 05:18
@h4r1m4u my bad.. i was checking it for non word character or underline, it didn't worked out
h4r1m4u
@h4r1m4u
Oct 31 2015 05:20
@Ankurlvv here's a hint. try splitting the string into individual words and then finding the longest one
Ankur Singh
@Ankurlvv
Oct 31 2015 05:22
@h4r1m4u my code worked thanks , but with replace() function it's not working
CamperBot
@camperbot
Oct 31 2015 05:22
ankurlvv sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 436 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Justin Hernandez
@JustinHernandez510
Oct 31 2015 05:29
how do you nest your text input element within a form element?
Rafal Rudzinski
@rrudzinski
Oct 31 2015 05:29
var oldArray = [1,2,3,4,5];

// Only change code below this line.


var newArray = oldArray.map(function(val){
    return val + 3;
});


// Only change code above this line.

(function() {return newArray;})();
i’m supposed to add 3 to every element in newArray
doesnt seem to work
Huy Nguyen
@gangstafat
Oct 31 2015 05:30
what did you get?
@rrudzinski it works fine for me
I got a new array which is [4,5,6,7,8]
Rafal Rudzinski
@rrudzinski
Oct 31 2015 05:32
it just spins nothing happens, maybe a borwser issue than
Huy Nguyen
@gangstafat
Oct 31 2015 05:32
yeah, I think so
try again
Ankur Singh
@Ankurlvv
Oct 31 2015 05:32
@rrudzinski refresh the page
Huy Nguyen
@gangstafat
Oct 31 2015 05:32
you can try on your own by open the console of Chrome
right-click > inspect elements > console tab > paste your code into it
then enter
Rafal Rudzinski
@rrudzinski
Oct 31 2015 05:33
i refreshed, restarted didnt work in firefox, works in chrome
Huy Nguyen
@gangstafat
Oct 31 2015 05:33
haha
Rafal Rudzinski
@rrudzinski
Oct 31 2015 05:33
at least my logic was correct haha
Ankur Singh
@Ankurlvv
Oct 31 2015 05:33
hahahha
sarahunter
@sarahunter
Oct 31 2015 05:33
@JustinHernandez510 to next input in the form, <form><input></form>
Huy Nguyen
@gangstafat
Oct 31 2015 05:34
yes, I think we're going to have this same problem more in the fututre
Rafal Rudzinski
@rrudzinski
Oct 31 2015 05:34
@gangstafat @Ankurlvv thanks you for the help!
CamperBot
@camperbot
Oct 31 2015 05:34
rrudzinski sends brownie points to @gangstafat and @ankurlvv :sparkles: :thumbsup: :sparkles:
:star: 18 | @gangstafat | http://www.freecodecamp.com/gangstafat
:star: 191 | @ankurlvv | http://www.freecodecamp.com/ankurlvv
Jay Singh
@jatinderspice
Oct 31 2015 06:20
Your p element should have the text "View more " (with a space after it).
BilliBoRU
@BilliBoRU
Oct 31 2015 06:20
Where is added in h4 element #left-well?
Jay Singh
@jatinderspice
Oct 31 2015 06:20
?????
Boris
@boris-in-london
Oct 31 2015 06:42
anyone ever try to resize an image thats too big for its containing element?
This message was deleted
This message was deleted
This message was deleted
that's odd codepen wont let me post
sarahunter
@sarahunter
Oct 31 2015 06:44
what do you mean by resize
do you want it to scale?
Boris
@boris-in-london
Oct 31 2015 06:44
well its a large image, and i want a section of it to show
sarahunter
@sarahunter
Oct 31 2015 06:45
ah
Boris
@boris-in-london
Oct 31 2015 06:45
i used the property clip in css
sarahunter
@sarahunter
Oct 31 2015 06:45
you can try the css overflow:hidden
Boris
@boris-in-london
Oct 31 2015 06:45
thanks ill give that a try @sarahunter
CamperBot
@camperbot
Oct 31 2015 06:45
boris-in-london sends brownie points to @sarahunter :sparkles: :thumbsup: :sparkles:
:star: 62 | @sarahunter | http://www.freecodecamp.com/sarahunter
h4r1m4u
@h4r1m4u
Oct 31 2015 06:46
@boris-in-london yeah, overflow: hidden on the parent container, possibly with position:relative. then on the image itself, position: absolute and manipulate the position with top, right, bottom, and left properties
much easier to simply crop the image in Photoshop and be done with it though
sarahunter
@sarahunter
Oct 31 2015 06:47
i agree with @h4r1m4u , I would crop the image.
Large image sizes can affect page load times
h4r1m4u
@h4r1m4u
Oct 31 2015 06:47
it also saves the bandwidth and will make the page load faster
sarahunter
@sarahunter
Oct 31 2015 06:47
:thumbsup:
h4r1m4u
@h4r1m4u
Oct 31 2015 06:47
high five @sarahunter
sarahunter
@sarahunter
Oct 31 2015 06:47
:smile:
Boris
@boris-in-london
Oct 31 2015 06:48
great suggestions, thanks @h4r1m4u & @sarahunter
CamperBot
@camperbot
Oct 31 2015 06:48
boris-in-london sends brownie points to @h4r1m4u and @sarahunter :sparkles: :thumbsup: :sparkles:
:warning: boris-in-london already gave sarahunter points
:star: 438 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 06:48
any time
Judgebowser
@Judgebowser
Oct 31 2015 06:53
Hi, I'm currently doing the "Make Object Properties Private" waypoint (after javascript) and I'm either not understanding what they're asking me or they're just not explaining it right.
Let me get my screenshot
^33C53BD11084945D6E08F03C14B14D8665FFC31AA999D36916^pimgpsh_fullsize_distr.jpg
h4r1m4u
@h4r1m4u
Oct 31 2015 06:58
@Judgebowser using the word 'this' in the object constructor function allows you to make the properties or methods public (accessible from outside the object). if you don't use the word 'this' in the property or method declaration, it will be private and you won't be able to access it from outside the object
h4r1m4u
@h4r1m4u
Oct 31 2015 07:00
your goal for the waypoint is to make the myBike.speed property and myBike.addUnit() method private, while making the myBike.getSpeed() method public @Judgebowser
Boris
@boris-in-london
Oct 31 2015 07:00
It's in there.. overflow: hidden under my div id=header
Judgebowser
@Judgebowser
Oct 31 2015 07:01
Okay, I think I'm beginning to understand.
h4r1m4u
@h4r1m4u
Oct 31 2015 07:02
@boris-in-london for me the image doesn't load at all. i get Failed to load resource: the server responded with a status of 403 (Forbidden) in console. does it load the image for you?
sarahunter
@sarahunter
Oct 31 2015 07:02
@boris-in-london in this case, using overflow:hidden on the heading makes anything that goes outside the heading bounds hidden
Boris
@boris-in-london
Oct 31 2015 07:03
@h4r1m4u yeah it loads for me
h4r1m4u
@h4r1m4u
Oct 31 2015 07:03
strange. i'll try a different browser
sarahunter
@sarahunter
Oct 31 2015 07:03
i see that the heading is short, so you might want to add a height value to that div
Boris
@boris-in-london
Oct 31 2015 07:03
ok @sarahunter
Zai Xeno
@removed~zaixeno
Oct 31 2015 07:19
Does anyone have their own personal website after learning from FCC?
Saad
@saadi123
Oct 31 2015 07:20
Nope. Not yet.

For this code:

function destroyer(arr) {
  var args = Array.prototype.slice.call(arguments);

  args.splice(0,1);
  return arr.filter(function(element) {
    return args.indexOf(element)===-1;
  });
  //return args.indexOf(element);
}

I'm not able to figure out this line:

return args.indexOf(element)===-1;

I know it is eliminating elements which are not in the array but what I want to know is that what actually is element in this line?

h4r1m4u
@h4r1m4u
Oct 31 2015 07:22
@saadi123
return arr.filter(function(element) {  // <== see the element here? 
    return args.indexOf(element)===-1; // <== that's the same element here
  });
the filter function iterates over arr and by passing the element into the callback function, you can access in the callback
the word 'element' is arbitrary, you could call it anything:
return arr.filter(function(someVar) {
    return args.indexOf(someVar)===-1;
  });
same thing
Saad
@saadi123
Oct 31 2015 07:24
@h4r1m4u
OK. So how is it is eliminating the array elements at index 1 and 2 or original array within the first array.
I hope my question is not too vague. :-)
h4r1m4u
@h4r1m4u
Oct 31 2015 07:25
i'm not sure i understand this question
could you rephrase it?
Saad
@saadi123
Oct 31 2015 07:25
I knew it. :-) Let me rephrase.
I applied filter which is supposed to filter out some character (or anything) which we will provide in the function below. Right? I mean this is the purpose of the .filter
Now, how does the function know that I don't want 2 and 3 from the array [1,2,3,1,2,3] and only 1? Where does this say that?
Is this clear enough now?
h4r1m4u
@h4r1m4u
Oct 31 2015 07:28
i think it's clearer
the 'decision' happens here: return args.indexOf(someVar)===-1;
you're checking whether the element is in the args array and return it only if it's not
so the filter, with the code as you have it, will return an array of elements from arr that are not in args
if args = [2, 3], all you'll get back will be the 1s
if args = [3], you'd get back 1s and 2s
does that make sense?
Saad
@saadi123
Oct 31 2015 07:32
Ok. But args does have 1 in it before filtration. Like if I return the line just before applying filter,
return args.splice(0,1);
it's giving me this: [[1,2,3,1,2,3]]
h4r1m4u
@h4r1m4u
Oct 31 2015 07:33
[[ ... ]] is an array within an array
what does arr look like?
Saad
@saadi123
Oct 31 2015 07:34
[1, 2, 3, 1, 2, 3], 2, 3
h4r1m4u
@h4r1m4u
Oct 31 2015 07:34
in that case the result of the filter should be [2, 3]
because [1, 2, 3, 1, 2, 3] is an element in args (the one and only element of that array)
Saad
@saadi123
Oct 31 2015 07:36
Ahan...! Just let me read the code once again. give me 5 minutes. "I'LL BE BACK"
h4r1m4u
@h4r1m4u
Oct 31 2015 07:37
roger that. take your time
Juan Valdes
@Jrv1
Oct 31 2015 07:51
Question: How do I properly next this
<form action="/submit-cat-photo"> </form> <input type="text" placeholder="cat photo URL">
it's really bugging
I'm getting two input text boxes
sorry, not next I meant nest
I seem to be having a problem nesting
h4r1m4u
@h4r1m4u
Oct 31 2015 07:52
@Jrv1 you need to put the <input> inbetween the <form> tags
<div>
  <p>I'm a paragraph nested in a div!</p>
</div>
here's an example of nesting <p> in a <div>. it's no different from your waypoint
Juan Valdes
@Jrv1
Oct 31 2015 07:53
ohhhh
man
@h4r1m4u thank you
CamperBot
@camperbot
Oct 31 2015 07:54
jrv1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 439 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Juan Valdes
@Jrv1
Oct 31 2015 07:54
it was tougher to read typing it all straight out
now that you put it that way it's easier to nest things now
:)
h4r1m4u
@h4r1m4u
Oct 31 2015 07:55
:D my pleasure!
Zai Xeno
@removed~zaixeno
Oct 31 2015 07:57
How do I do that code box so it doesnt come out all regular?
h4r1m4u
@h4r1m4u
Oct 31 2015 07:57
backticks are the key
wiki format
CamperBot
@camperbot
Oct 31 2015 07:57

:point_right: code format [wiki]

Inline code

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

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

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

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

How to Code

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

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

Zai Xeno
@removed~zaixeno
Oct 31 2015 07:58
oh wait, I think you just said that lol
h4r1m4u
@h4r1m4u
Oct 31 2015 07:58
:point_up: @zaixeno
Zai Xeno
@removed~zaixeno
Oct 31 2015 07:58
Thanks so much @h4r1m4u
CamperBot
@camperbot
Oct 31 2015 07:58
zaixeno sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 440 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 07:58
no prob
Zai Xeno
@removed~zaixeno
Oct 31 2015 07:58

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

<style>

.thick-green-border {

border-color: green;

border-width: 10px;

border-style: solid;

}


.red-text {

color: red;

}



h2 {
font-family: Lobster, Monospace;
}

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

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

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

<img class1="smaller-image" class2="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>
```

i failed
lol
my border isn't turning green houwever
h4r1m4u
@h4r1m4u
Oct 31 2015 08:00
@zaixeno ah, this is how you apply multiple classes (in this case on a <div> element): <div class="my-class my-other-class"></div>
no need for class1 and class2
Saad
@saadi123
Oct 31 2015 08:01
@h4r1m4u my Seek and Destroy challenge is hanging and crashing again and again. BTW thanks for your help.
CamperBot
@camperbot
Oct 31 2015 08:01
saadi123 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 441 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 08:02
@saadi123 you're most welcome. i hope i managed to shed some light on the filter function
it sounds like you have some infinite loop there
try to pause the page load with your browser stop button and then edit the code before it has a chance to execute
Saad
@saadi123
Oct 31 2015 08:02
Yes. I also have the same feeling. It all happened when I tried to remove and add some comments in the code.
Ok. Let me do check.
Nope not working.
h4r1m4u
@h4r1m4u
Oct 31 2015 08:05
:(
Saad
@saadi123
Oct 31 2015 08:05
How can we contact the admin? I believe they can sort it out.
h4r1m4u
@h4r1m4u
Oct 31 2015 08:05
i'm not sure, i never needed that
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:06
GOT IT hahah thanks you so much @h4r1m4u
CamperBot
@camperbot
Oct 31 2015 08:06
zaixeno sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: zaixeno already gave h4r1m4u points
Saad
@saadi123
Oct 31 2015 08:06
Lol. Stuck now I guess. :-D
h4r1m4u
@h4r1m4u
Oct 31 2015 08:06
:clap:
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:06
since learning from FCC have you ever created your own or any other websites? @h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 08:07
i've been developing professionally for years now. i'm doing FCC mainly for the javascript parts
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:08
oh wow thats awesome!how has the whole journey been?
h4r1m4u
@h4r1m4u
Oct 31 2015 08:10
tough at the beginning as when i started, there were no structured resources or courses like these days. it's much easier to learn coding now. overall, it's been a lot of fun. i love the creative aspects of development and seeing your code manifest on screen, letting you to interact with it
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:11
Think that's what im started to get addicted by, when I complete some challenge, I feel like a boss
when im stuck, I feel stupid hahah but im a beginner anyway, so its just a lot of fun now
Do you develop off of a CMS like wordpress or something else?
Saad
@saadi123
Oct 31 2015 08:12
@zaixeno yup. But everything gets settled down when I get to the next challenge :-P
h4r1m4u
@h4r1m4u
Oct 31 2015 08:12
yeah. the way the courses are structured and completing the challenges can be extremely addictive
Arnis Jaundzeikars
@SangSatori
Oct 31 2015 08:12
I think stuff's headed in the right direction really. Every year there's more and more quality stuff for teaching oneself the nice stuff. As about the original question, @zaixeno... I'm taking this as a supplement to learning by doing by just putting a website or two together. Not much progress yet, but it's been a few days and today I finally feel like a person (ADHD, got a prescription at last). My plans are to make some GitHub pages stuff and a couple of Tumblr themes as a starting point.
h4r1m4u
@h4r1m4u
Oct 31 2015 08:12
@zaixeno depends on the project, but yeah, i leverage wordpress heavily
Kartikeya99
@Kartikeya99
Oct 31 2015 08:13
how do i give the label of indoor to my radio buttons
h4r1m4u
@h4r1m4u
Oct 31 2015 08:14
@Kartikeya99 <label><input type="text" name="myInput"> My Label!</label>
Arnis Jaundzeikars
@SangSatori
Oct 31 2015 08:14
@h4r1m4u: Just the front-end dev part of Wordpress, or do you ever tinker with adjusting/writing PHP plugins too? I'm just starting out with some Wordpress now, since a friend has a website based on that platform.
h4r1m4u
@h4r1m4u
Oct 31 2015 08:15
@SangSatori both. i'd say maybe 70 - 80% the front-end stuff (theme development), but for some projects i write custom plugins too
Saad
@saadi123
Oct 31 2015 08:16
<label><input type="radio" name="some name" value="some value">Indoor<label>
@Kartikeya99
h4r1m4u
@h4r1m4u
Oct 31 2015 08:16
often you can find an existing plugin for what you need though. so i write custom plugins only when i really need to. no need to reinvent the wheel
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:16
Thats amazing, should all come out great! @SangSatori I'm pretty good on the wordpress part of things. Just the basic stuff. However, I want to learn how to build by own site from scratch, using something like underscores by automatic, using bootstrap, and all the stuff from here pretty much.
Kartikeya99
@Kartikeya99
Oct 31 2015 08:17
thanks @h4r1m4u
CamperBot
@camperbot
Oct 31 2015 08:17
kartikeya99 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 442 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 08:17
@zaixeno when developing for wordpress, i usually use underscores as a starting theme. bootstrap is great, but most of the time i end up using only the grid system and the rest of the CSS i write myself
Kartikeya99
@Kartikeya99
Oct 31 2015 08:18
thanks @saadi123
CamperBot
@camperbot
Oct 31 2015 08:18
kartikeya99 sends brownie points to @saadi123 :sparkles: :thumbsup: :sparkles:
:star: 211 | @saadi123 | http://www.freecodecamp.com/saadi123
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:20
There is this one thing on GitHub called typed.js, having the hardest time on figuring out how to implement it and other things like it. So now I'm on FCC to figure it all out. hopefully 900 hours of code training will get me to the point i should have a general knowledge of most things i'll need to know, right? haha
h4r1m4u
@h4r1m4u
Oct 31 2015 08:22
for sure. it seems like you have the passion and the right attitude. so just keep it up and it'll all start coming together and make sense pretty soon
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:25
there is a thing on here to add or follow people yeah?
h4r1m4u
@h4r1m4u
Oct 31 2015 08:26
you can follow people on github as gitter is linked to it. i'm not sure you can add or follow people here directly
Juan Valdes
@Jrv1
Oct 31 2015 08:28
So I added .gray-background {
background-color: gray;
to styles
now trying to add background to my div
I don't know what to open and close the line with
I tried <h2 class="background-color"></h2>
just below <div>
h4r1m4u
@h4r1m4u
Oct 31 2015 08:29
This message was deleted
here's a hint
Juan Valdes
@Jrv1
Oct 31 2015 08:30
no text involved
just background color
not sure what element to use
just to add that class
h4r1m4u
@h4r1m4u
Oct 31 2015 08:31
<style>
.my-class {
 color: white;
}
</style>

<p class="my-class">white text paragraph</p>
i know, i'm just giving you an example of how it's done
Juan Valdes
@Jrv1
Oct 31 2015 08:31
ohh so use the p element?
h4r1m4u
@h4r1m4u
Oct 31 2015 08:31
no
modify it for your own class names, CSS properties and HTML elements
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:31
I gotta get this code block right before you disappear. let me go back to your reference again
h4r1m4u
@h4r1m4u
Oct 31 2015 08:32
i'm just showing you how it's done
Juan Valdes
@Jrv1
Oct 31 2015 08:32
yeah i've done that before with <h2 class="red-text">CatPhotoApp</h2>
that works
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:32
```
h4r1m4u
@h4r1m4u
Oct 31 2015 08:33
@zaixeno
backtickbacktickbacktick
shift+enter to go to the next line and your code will go here
then close it with
backtickbacktickbacktick
Juan Valdes
@Jrv1
Oct 31 2015 08:33
works great with text, but can't seem to figure out what element to use to just add the background class under <div>
h4r1m4u
@h4r1m4u
Oct 31 2015 08:33
post your code @Jrv1
Juan Valdes
@Jrv1
Oct 31 2015 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;
}
.gray-background {
background-color: gray;
}
</style>

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

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

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

<div>

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

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
trying to add the gray-background class just below <div> and above Things cats love

ugh did I paste that in here properly?
h4r1m4u
@h4r1m4u
Oct 31 2015 08:35
@Jrv1 you didn't apply your .gray-background class to the <div> element
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:35
```
<style>
.my-class {
 color: white;
}
</style>

<p class="my-class">white text paragraph</p>
```
YESSSSSSSSSS
Juan Valdes
@Jrv1
Oct 31 2015 08:36
lol
h4r1m4u
@h4r1m4u
Oct 31 2015 08:36
@zaixeno :clap: :D
Juan Valdes
@Jrv1
Oct 31 2015 08:36
right, i'm trying to add the class but i don't konw what element to use
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:36
kinda added to many backticks, i was dedicated to getting it to work, i meant to do that haha
h4r1m4u
@h4r1m4u
Oct 31 2015 08:37
@Jrv1 what element does the waypoint asks you to give the gray background to?
Juan Valdes
@Jrv1
Oct 31 2015 08:38

You can set an element's background color with the background-color property.

For example, if you wanted an element's background color to be green, you'd put this within your style element:

.green-background {

  background-color: green;

}

Create a class called gray-background with the background-color of gray. Assign this class to your div element.

h4r1m4u
@h4r1m4u
Oct 31 2015 08:38
Assign this class to your div element.
herein lies the key to unlocking the mysteries of the universe
Lusako Njwaba
@lunjwaba1
Oct 31 2015 08:39
Hi there peeps, I am trying to nest the span element,but for some reason i get an error telling to make sure to close the span tag, what i am i missing here? : thanks
<p>Things cats <span class= "text-danger">love:</span></p>
h4r1m4u
@h4r1m4u
Oct 31 2015 08:40
@lunjwaba1 that looks correct
did you modify any of the code around or elsewhere in the codepane?
oh, hang on, the : shouldn't be inside the span
that's probably the issue
Juan Valdes
@Jrv1
Oct 31 2015 08:42
<div>
  class="background-color"
  <p>Things cats love:</p>
h4r1m4u
@h4r1m4u
Oct 31 2015 08:42
@lunjwaba1 you should only 'spanify' the word 'love'
Lusako Njwaba
@lunjwaba1
Oct 31 2015 08:43
@h4r1m4u that's what i said, but i still get the"make sure your span element has a closing tag" error. I refreshed my page but nothing. ok i'll try to remove the colon and see what happens
h4r1m4u
@h4r1m4u
Oct 31 2015 08:44

@Jrv1 if

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

is how you give <h2> element a red-text class, how do you give <div> a gray-background class?

it's the same thing. just a different element and class name
Juan Valdes
@Jrv1
Oct 31 2015 08:44
lol
..it's late..
:)
Jrv1 @Jrv1 walks away in shame
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:45
Does anyone have sites they use with whole references on languages?
Lusako Njwaba
@lunjwaba1
Oct 31 2015 08:46
thanks @h4r1m4u , I had to reset the question. The code was right. :+1: :smile:
CamperBot
@camperbot
Oct 31 2015 08:46
lunjwaba1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 443 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 08:47
@lunjwaba1 my pleasure
@zaixeno what do you mean by whole references?
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:47
cheat sheet with every code it uses
like how css has border-radius,font-size, and the million other ones
lol
Juan Valdes
@Jrv1
Oct 31 2015 08:50
Made it up to waypoint 42, but I give up...this language isn't for me. cya peeps
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:51
what language is that?
html?
Juan Valdes
@Jrv1
Oct 31 2015 08:52
think so
h4r1m4u
@h4r1m4u
Oct 31 2015 08:52
if you want to do any web development at all, you won't get away from HTML or CSS
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:52
yeah these are the basics for everything
Juan Valdes
@Jrv1
Oct 31 2015 08:53
i meant coding in general
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:53
oooh, aw man! it takes time! its like learning another real language
h4r1m4u
@h4r1m4u
Oct 31 2015 08:53
^
Juan Valdes
@Jrv1
Oct 31 2015 08:53
agreed
i can't move on until I enter the right code
Zai Xeno
@removed~zaixeno
Oct 31 2015 08:54
but more fun cause it's limitless once you get the hang of it
what is the code your stuck on?
@h4r > pro ;)
@h4r1m4u
and dont forget, its late haha dont make such decision at this time of night haha:P
Juan Valdes
@Jrv1
Oct 31 2015 08:56
ur right
Still trying to figure out how to add class="background-color" to a div element.
I have other things inside of <div> </div>
h4r1m4u
@h4r1m4u
Oct 31 2015 08:57
@Jrv1 re-read my previous answers. it's all there
you're supposed to add .gray-background class to the <div>. not background-color (which is a CSS property)
Juan Valdes
@Jrv1
Oct 31 2015 08:58
so why does it say to put it within my style element?
I'm on Waypoint: Give a Background Color to a Div Element
h4r1m4u
@h4r1m4u
Oct 31 2015 09:00
the class definition goes in your <style> </style> section. then the class is applied to the HTML element: Create a class called gray-background with the background-color of gray. Assign this class to your div element.
Juan Valdes
@Jrv1
Oct 31 2015 09:01
i've go tit added to my stle section
style
Sandeep Randhawa
@sandyrandhawa
Oct 31 2015 09:01
hey guys m stuck on instances of objects
Juan Valdes
@Jrv1
Oct 31 2015 09:01
but adding the class to the element is what i'm having trouble with
Sandeep Randhawa
@sandyrandhawa
Oct 31 2015 09:01
myCar = function(){
this.engines = 2;
};
i added this code
but the output is undefined
what i left out, please help
h4r1m4u
@h4r1m4u
Oct 31 2015 09:02
@Jrv1 again then: <div class="some-class"></div> <!-- this is a div with some-class applied --> i don't know how else to point you in the right direction
Juan Valdes
@Jrv1
Oct 31 2015 09:02
Do I add another div element inside the div element i'm in?
tried that
h4r1m4u
@h4r1m4u
Oct 31 2015 09:03
@sandyrandhawa which waypoint is it?
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:03
im on 36, when i get to 48 and pass it i'll give you the code, so you can compare it
Juan Valdes
@Jrv1
Oct 31 2015 09:03
yeah I tried that to the opening div
ok thank you
CamperBot
@camperbot
Oct 31 2015 09:03
if you want to thank someone, put an @ before their name!
Sandeep Randhawa
@sandyrandhawa
Oct 31 2015 09:03
4th in Object Oriented @h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 09:06
@sandyrandhawa ok, what you're doing is actually assigning an object constructor function to the myCar variable. that's not what you need to do. myCar is already a Car object. now you just need to assign a property to it. let me give you an example:
var myDog = new Dog(); /* myDog is a Dog object */
myDog.legs = 4; /* now i add a property called 'legs' to it and set it to 4 */
Sandeep Randhawa
@sandyrandhawa
Oct 31 2015 09:07
ohh okk @h4r1m4u thank you
CamperBot
@camperbot
Oct 31 2015 09:07
sandyrandhawa sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 444 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 09:07
no problem
Juan Valdes
@Jrv1
Oct 31 2015 09:08

`

<div>
<div class="background-color"></div>

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

bah
h4r1m4u
@h4r1m4u
Oct 31 2015 09:09
the class that you defined in your <style> is not called background-color, is it?
Juan Valdes
@Jrv1
Oct 31 2015 09:09
.gray-background {
background-color: gray;
}
h4r1m4u
@h4r1m4u
Oct 31 2015 09:09
what is the name of the class?
Juan Valdes
@Jrv1
Oct 31 2015 09:09
.gray-background
WOW
I was typing in the wrong thing
h4r1m4u
@h4r1m4u
Oct 31 2015 09:10
then why in your HTML you're assigning a class 'background-color' to the div?
:bulb:
Juan Valdes
@Jrv1
Oct 31 2015 09:10
because i'm new and this coding stuff is making me cross-yed lol
:bulb:
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:12
LOL
Juan Valdes
@Jrv1
Oct 31 2015 09:12
got it, works now
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:12
so did you get it?
Juan Valdes
@Jrv1
Oct 31 2015 09:12
@h4r1m4u thank you
CamperBot
@camperbot
Oct 31 2015 09:12
jrv1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 445 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:12
what were you typing wrong?
Juan Valdes
@Jrv1
Oct 31 2015 09:12
so
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:12
im on 42 now
Juan Valdes
@Jrv1
Oct 31 2015 09:13
.gray-background {
background-color: gray;
}
added that to my style
BUT
I was typing in "background-color" instead of gray-background
h4r1m4u
@h4r1m4u
Oct 31 2015 09:14
no problem. these silly bugs happen to all of us. part of being a good developer is paying attention to detail as often one character can make or break your code
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:14
thats coding for you, such a high attention to detail is key
Juan Valdes
@Jrv1
Oct 31 2015 09:14
yeah i can totally understand that
i also didn't konw i could break my first <div>
i thought it would interfere with my closing </div>
all good now
<div class="gray-background">
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>
...starting to hate cats...LOL
h4r1m4u
@h4r1m4u
Oct 31 2015 09:16
nice. most HTML elements have the opening and closing tag and the content of the element will go in between the two tags
but some elements are self-closing and don't have the closing tag (e.g. <img> or <input>)
Juan Valdes
@Jrv1
Oct 31 2015 09:17
right
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:17
im allergic :shipit:
Juan Valdes
@Jrv1
Oct 31 2015 09:17
as long as <div is still in charge then i can nest into it right?
ouch
h4r1m4u
@h4r1m4u
Oct 31 2015 09:18
<div> the div content would go here and you can nest anything you want here too </div>
Juan Valdes
@Jrv1
Oct 31 2015 09:20
i thought i had to add a new <div under the main one
but i'm passed it...phew
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:20
which one are you on? @Jrv1
Juan Valdes
@Jrv1
Oct 31 2015 09:20
Setting the ID of an ele
i have to re-read multiple times to understand lol
MrSebbs
@MrSebbs
Oct 31 2015 09:21

I'm stuck in Waypoint: Style the HTML Body Element. My code is this:

<style>
  body{
     background-color: black;
  }
</style>

Someone sees an error ?

h4r1m4u
@h4r1m4u
Oct 31 2015 09:22
@MrSebbs hmm, that looks correct
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:22
i just got to 42, I was looking at a totally wrong number I'm at where you were stuck on
Juan Valdes
@Jrv1
Oct 31 2015 09:22
oh
MrSebbs
@MrSebbs
Oct 31 2015 09:23
I need to:Give your body element the background-color of black.
Juan Valdes
@Jrv1
Oct 31 2015 09:23
.body
or no?
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:23
oh so you had background-color as your main class instead of .gray-background or something
MrSebbs
@MrSebbs
Oct 31 2015 09:24
No, .body is a class style. I want to change the element body
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:24
oh snap this div thing is cool! so thats how one page websites do that!
i think at least.
Juan Valdes
@Jrv1
Oct 31 2015 09:24
@zaixeno i added the class correctly into my style, but i was typing in class="background-color" instead of class="gray-background"
div is to divide sections within the code??
@MrSebbs gotcha
MrSebbs
@MrSebbs
Oct 31 2015 09:26
Yes, div is used to divide sections
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:27
yeah
i might be stuck on this ID element one
Juan Valdes
@Jrv1
Oct 31 2015 09:28
i'm stuck on it too
@MrSebbs thank you
CamperBot
@camperbot
Oct 31 2015 09:28
jrv1 sends brownie points to @mrsebbs :sparkles: :thumbsup: :sparkles:
:star: 53 | @mrsebbs | http://www.freecodecamp.com/mrsebbs
Juan Valdes
@Jrv1
Oct 31 2015 09:28

i tried `

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

h4r1m4u
@h4r1m4u
Oct 31 2015 09:29
@MrSebbs there's something really weird with your code. there's some invisible character just in front of the word background-color. it looks like space, but it's not. just delete it and you'll pass
the code itself is fine
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:29
thats what i did @Jrv1
Juan Valdes
@Jrv1
Oct 31 2015 09:29
woops I ment <form id="cat-photo-form" action="/submit-cat-photo">
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:31
<form id="cat_photo_form" action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
MrSebbs
@MrSebbs
Oct 31 2015 09:31
@h4r1m4u you are totally rigth. Thank you!!
CamperBot
@camperbot
Oct 31 2015 09:31
mrsebbs sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 446 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Juan Valdes
@Jrv1
Oct 31 2015 09:31
you put underscores instead of dashes it seems
h4r1m4u
@h4r1m4u
Oct 31 2015 09:31
@MrSebbs my pleasure. it was really bizarre and took me a while to figure it out. no idea what that character was, lol
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:31
OH
@zaixeon also walks away in shame
Juan Valdes
@Jrv1
Oct 31 2015 09:32
haha
Dardan Kadrija
@DardanKadrija
Oct 31 2015 09:33
var ourArray = [3,2,1];

ourArray[0] = 1; // equals [1,2,1]
can someoen explain me this
h4r1m4u
@h4r1m4u
Oct 31 2015 09:35
@DKadrija ourArray[0] refers to the first element of the ourArray array
you assign it a value of 1
which replaces the original 3
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:35
whoa, what language is that?
h4r1m4u
@h4r1m4u
Oct 31 2015 09:36
javascript
Dardan Kadrija
@DardanKadrija
Oct 31 2015 09:36
aaa
thank you
h4r1m4u
@h4r1m4u
Oct 31 2015 09:36
@DKadrija ourArray[1] would refer to the 2nd element, etc.
CamperBot
@camperbot
Oct 31 2015 09:36
if you want to thank someone, put an @ before their name!
Juan Valdes
@Jrv1
Oct 31 2015 09:37
@h4r1m4u you must have a coding job right?
h4r1m4u
@h4r1m4u
Oct 31 2015 09:37
yup :)
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:37
@h4r1m4u the way some people have one page sites with different color sections and such going down the page, that is due to Divs and ids correct?
Juan Valdes
@Jrv1
Oct 31 2015 09:37
you're one of the top dogs, thanks for actually sticking around here
CamperBot
@camperbot
Oct 31 2015 09:37
if you want to thank someone, put an @ before their name!
MrSebbs
@MrSebbs
Oct 31 2015 09:38
You can click to his name and then write too
h4r1m4u
@h4r1m4u
Oct 31 2015 09:39
@zaixeno yeah. there are often other tricks employed, such as parallax image scrolling (backround image moving at a different speed than the content itself), but yeah, the page as such will be using divs for different sections and classes and ids to style them
@Jrv1 i'm just a puppy here. there are bigger badder dogs here :D
Juan Valdes
@Jrv1
Oct 31 2015 09:40
@h4r1m4u then that makes me unborn puppy
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:40
@Jrv1 we are more like cells lol
h4r1m4u
@h4r1m4u
Oct 31 2015 09:40
it's all just practice and time. you'll get there if you keep it up
Juan Valdes
@Jrv1
Oct 31 2015 09:40
@zaixeno hahaha
@h4r1m4u i remember a long time ago i used dreamweaver wen it was owned by macromedia to build sites
@h4r1m4u but i never had to touch code, it was all GUI
h4r1m4u
@h4r1m4u
Oct 31 2015 09:41
i used it too when i started. actually i used MS FrontPage as the first software
dreamweaver is still around i think, though i wonder if anybody actually uses it
Juan Valdes
@Jrv1
Oct 31 2015 09:42
adobe owns it now
h4r1m4u
@h4r1m4u
Oct 31 2015 09:42
yeh
Juan Valdes
@Jrv1
Oct 31 2015 09:42
frontpage was gui too or strictly text?
h4r1m4u
@h4r1m4u
Oct 31 2015 09:43
gui. and you had text editor if you really wanted to get in the code. same as dreamweaver
Juan Valdes
@Jrv1
Oct 31 2015 09:43
oh ok
so overtime i just stopped making sites, had no projects to work on
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:44
oooh there is a section for learning bootstrap, sweet!
i've heard some people say bootstrap is heavily used incorrectly with wordpress however.
Juan Valdes
@Jrv1
Oct 31 2015 09:46
well i'm off
thanks guys
CamperBot
@camperbot
Oct 31 2015 09:46
if you want to thank someone, put an @ before their name!
Juan Valdes
@Jrv1
Oct 31 2015 09:46
nice to meet you
h4r1m4u
@h4r1m4u
Oct 31 2015 09:47
later @Jrv1 don't give up, keep it up!
Juan Valdes
@Jrv1
Oct 31 2015 09:47
thank you, sure will!
CamperBot
@camperbot
Oct 31 2015 09:47
if you want to thank someone, put an @ before their name!
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:48
see you man!
or woman, ill just say @Jrv1
Juan Valdes
@Jrv1
Oct 31 2015 09:48
man lol
Zai Xeno
@removed~zaixeno
Oct 31 2015 09:49
hey @h4r1m4u, are you able to post any site you've created on here?
or if you are willing to
hope to see ya around
Dardan Kadrija
@DardanKadrija
Oct 31 2015 10:20
var ourMin = 1;

var ourMax = 9;

function ourFunction() {

  return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;

}

// Only change code below this line.

var myMin = 10;

var myMax = 11;

function myFunction() {

  return Math.floor(Math.random()*(myMin-myMax+1))+myMax;

}

// Only change code above this line.


(function(){return myFunction(10,1);})();
any help
Dardan Kadrija
@DardanKadrija
Oct 31 2015 10:30
....7
Blertan
@Blertan
Oct 31 2015 10:52
@DKadrija what do u need help
Dardan Kadrija
@DardanKadrija
Oct 31 2015 10:52
mire eshte
Blertan
@Blertan
Oct 31 2015 10:53
ok mos ta ndin :)
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 11:19
I am in "Waypoint: Add Font Awesome Icons to our Buttons" dont know why the below code is not working <div class="row">
<div class="col-xs-4">
<i class="fa fa-thumbs-up"> <button class="btn btn-block btn-primary">Like</button> </i>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info">Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger">Delete</button>
</div>
</div>
Øistein Haugland
@oisteinhaugland
Oct 31 2015 11:19
@DKadrija i'm on the exact same exercise that you posted, can you explain what the "Math.random()*(myMax-myMin+1))+myMin;" part of the function actually does?
Øistein Haugland
@oisteinhaugland
Oct 31 2015 11:24
@mohanrajkumarplus it doesnt work because you have to nest your i class within your button
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 11:25
got it right with the below code
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up">Like </i></button>
@JotunBob yes, just now figured it out by trial and error :smile:
Øistein Haugland
@oisteinhaugland
Oct 31 2015 11:25
@mohanrajkumarplus haha good :) had to go back and check my code so see what the problem was :P
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 11:26
oh good, thanks for taking time :+1:
CamperBot
@camperbot
Oct 31 2015 11:26
if you want to thank someone, put an @ before their name!
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 11:27
@JotunBob Thank you :)
Federico Dente
@fez994
Oct 31 2015 12:18
I'm struggling on Waypoint: Create a JavaScript Slot Machine , anyone help?
Blertan
@Blertan
Oct 31 2015 12:20
@fez994 function runSlots(){
var slotOne = Math.floor(Math.random() (3 - 1 + 1)) + 1;
var slotTwo = Math.floor(Math.random()
(3 - 1 + 1)) + 1;
var slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
here u have the answer
i says for every slot to generate a random where is the formaula and it is done :)
Federico Dente
@fez994
Oct 31 2015 12:22
@Blertan i just found the solution by myself, thanks anyway for help
CamperBot
@camperbot
Oct 31 2015 12:22
:star: 186 | @blertan | http://www.freecodecamp.com/blertan
fez994 sends brownie points to @blertan :sparkles: :thumbsup: :sparkles:
Federico Dente
@fez994
Oct 31 2015 12:33
What's wrong? $($('.slot')[0].html('<img src="' + images[slotOne-1] + '">"'))
$($('.slot')[1].html('<img src="' + images[slotTwo-1] + '">"'))
$($('.slot')[2].html('<img src="' + images[slotThree-1] + '">"'))
It say you should have used $('.slot')[0], [2],[3] at least once.
Blertan
@Blertan
Oct 31 2015 12:36
@fez994 ">' check the upercase u make wrong
Federico Dente
@fez994
Oct 31 2015 12:39
Thanks
CamperBot
@camperbot
Oct 31 2015 12:39
if you want to thank someone, put an @ before their name!
Federico Dente
@fez994
Oct 31 2015 12:39
@Blertan thanks
CamperBot
@camperbot
Oct 31 2015 12:39
fez994 sends brownie points to @blertan :sparkles: :thumbsup: :sparkles:
:warning: fez994 already gave blertan points
Elizabeth Hatleli
@TheHighPriestess
Oct 31 2015 12:48
Here's my javascript code.:
var view = {
displayMessage: function(msg) {
var messageArea = document.getElementById("messageArea");
messageArea.innerHTML = msg;
},
displayHit: function(location) {
var cell = document.getElementById(location);
cell.setAttribute("class", "hit");
},
displayMiss: function(location) {
var cell = document.getElementById(location);
cell.setAttribute("class", "miss");
}
};

view.displayMiss("00");
//view.displayHit("34");
//view.displayMiss("55");
//view.displayHit("12");
//view.displayMiss("25");
//view.displayHit("26");

view.displayMessage("Tap tap, is this thing on?");
I'm getting this error:
gts00k
@gts00k
Oct 31 2015 12:49
thanks @gts0uk
CamperBot
@camperbot
Oct 31 2015 12:49
gts00k sends brownie points to @gts0uk :sparkles: :thumbsup: :sparkles:
:star: 324 | @gts0uk | http://www.freecodecamp.com/gts0uk
Elizabeth Hatleli
@TheHighPriestess
Oct 31 2015 12:49
Uncaught TypeError: Cannot read property 'setAttribute' of null
Does anyone know why?
What exactly does that error message men?
if it's null...it's saying that the object doesn't exist, correct?
Do I need something at the top of my file?
Pavan
@pavanp73
Oct 31 2015 12:56
<!DOCTYPE>
<html>
    <head>
        <style>    
            .big-grid{
                background-color: #000000;
                color: red;
                font-family: monospace;
            }
            .section{
                max-height: 300px;
                background-color: #282828;
            }
        </style>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap.min.css">
        <script src="bootstrap-3.3.5-dist/js/jquery-2.1.4.min.js"></script>
        <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class="container-fluid">
            <div class="row">
                <div class="col-xs-12">
                    <h2 class="text-center big-grid">Header</h2>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-4">
                    <div class="well section"></div>
                </div>
                <div class="col-xs-4">
                    <div class="well section"></div>
                </div>
                <div class="col-xs-4">
                    <div class="well section"></div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div class="text-center big-grid">Footer</div>
                </div>
            </div>
        </div>
    </body>
</html>
Please let me know what is wrong with section class... browser is not rendering as expected....
background color is rendering
Elizabeth Hatleli
@TheHighPriestess
Oct 31 2015 13:19
Ok well...I just did it with jQuery and it's working
Federico Dente
@fez994
Oct 31 2015 13:19
Wha't wrong here?

var newArray = oldArray;

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

var array = array.map(function(val){
return val + 3;
});

It say : You should add three to each value in the array.
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 13:23
I am Waypoint: Target Elements by Class Using jQuery - don't know why the addClass to the well is not working
<script>
  $(document).ready(function() {
    $("button").addClass("animated bounce");
  });
  $(".well").addClass("animated shake");
</script>
Blauelf
@Blauelf
Oct 31 2015 13:24
@fez994 Sure. Your code changes array, while the checks are for newArray. Don't simply copy&paste the sample code...
mohanrajkumarplus
@mohanrajkumarplus
Oct 31 2015 13:24
got it, the }); is not ended properly :-1:
Federico Dente
@fez994
Oct 31 2015 13:25

@Blauelf The sample code is : var timesFour = array.map(function(val){

  return val*4;

});

i didn't copyed it
Blauelf
@Blauelf
Oct 31 2015 13:27
Oh, then I understand even less how so many people end up with the same non-working code.
Blauelf
@Blauelf
Oct 31 2015 13:33
Ouch. Now I understand. There's a bug in the description. It expicitly states you should put your mapped data inside the variable array.
@fez994 Guess you were right according to the description, but not to the actual code :(
Zai Xeno
@removed~zaixeno
Oct 31 2015 13:36
can someone give me an example of nesting a image together right div?
with div*
Stefan Stamenkovic
@stxdcode
Oct 31 2015 13:37

@zaixeno

<div>
<img src="blabla">
</div>

Zai Xeno
@removed~zaixeno
Oct 31 2015 13:38
oh ok so simply putting it together, hm thats what im doing and its saying im not correct. let me see here
@stxdcode thanks btw
CamperBot
@camperbot
Oct 31 2015 13:38
zaixeno sends brownie points to @stxdcode :sparkles: :thumbsup: :sparkles:
:star: 33 | @stxdcode | http://www.freecodecamp.com/stxdcode
Stefan Stamenkovic
@stxdcode
Oct 31 2015 13:39
no problem, ask if you need anything else
Federico Dente
@fez994
Oct 31 2015 13:42
@Blauelf Thanks, they should fix that bug tho
CamperBot
@camperbot
Oct 31 2015 13:42
fez994 sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 441 | @blauelf | http://www.freecodecamp.com/blauelf
Andrew Perrin
@Pezz18
Oct 31 2015 13:58
hi, i am currently on the javascript section and struggling with the .map challenge...
where you iterate over an array and add 3 to each value...
h4r1m4u
@h4r1m4u
Oct 31 2015 13:59
@Pezz18 what specifically are you struggling with?
Andrew Perrin
@Pezz18
Oct 31 2015 14:00
under the function part, are you supposed to use the word val or is that just the syntax?
Federico Dente
@fez994
Oct 31 2015 14:00

@Pezz18 var newArray = oldArray;
var newArray = [1,2,3,4,5];

var newArray = newArray.map(function(val){
return val + 3;
});

Zai Xeno
@removed~zaixeno
Oct 31 2015 14:00
<div class="row">
    <div class="col-xs-4">
     <i class="fa fa-thumbs-up">
       <button class="btn btn-block btn-primary">Like</button>
      </i>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info">Info</button>
Blauelf
@Blauelf
Oct 31 2015 14:00
@Pezz18 The name val is arbitrary, as is any named function parameter.
h4r1m4u
@h4r1m4u
Oct 31 2015 14:00
@Pezz18 it's just a name of a variable that you're passing to the function. it could be anything
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:00
Nest your i element within your button element.
can someone check this out?
Federico Dente
@fez994
Oct 31 2015 14:01
<i class="fa fa-thumbs-up"><button class="btn btn-block btn-primary">Like</i></button>
@zaixeno
Blauelf
@Blauelf
Oct 31 2015 14:01
@zaixeno i element within button element
h4r1m4u
@h4r1m4u
Oct 31 2015 14:01
@fez994 that's wrong
Blauelf
@Blauelf
Oct 31 2015 14:01
Not around ;)
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:01
oh @h4r1m4u your in here haha
Michael Cheung
@m6cheung
Oct 31 2015 14:01
hey guys are any of the links working for you in my pen?
http://codepen.io/m6cheung/pen/dYmLoW?editors=001
Stefan Stamenkovic
@stxdcode
Oct 31 2015 14:01
@zaixeno <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i>Like</button>
Andrew Perrin
@Pezz18
Oct 31 2015 14:01
so, in my example i have var addThree = oldArray.map(function(val){ return val+3;}
Federico Dente
@fez994
Oct 31 2015 14:02
@h4r1m4u already did that, and it works.
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:02
OHH it goes inside
h4r1m4u
@h4r1m4u
Oct 31 2015 14:02
@fez994 impossible. it's incorrect
Blauelf
@Blauelf
Oct 31 2015 14:02
@Pezz18 The last line tests for the variable newArray, not addThree.
Federico Dente
@fez994
Oct 31 2015 14:02
@h4r1m4u i'll send you the screen, wait 1 sec
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:02
wow thanks! @Blauelf @stxdcode @h4r1m4u
CamperBot
@camperbot
Oct 31 2015 14:02
zaixeno sends brownie points to @blauelf and @stxdcode and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: zaixeno already gave stxdcode points
:star: 447 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
:star: 442 | @blauelf | http://www.freecodecamp.com/blauelf
Andrew Perrin
@Pezz18
Oct 31 2015 14:03
hmmm
i dont get what im not getting! ha
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:03
the more i learn this, i swear the more i see how endless the possibilities are with what can be done
Andrew Perrin
@Pezz18
Oct 31 2015 14:04
i get the gist is, where taking an existing array,,, passing it through the map and adding 3 to each value then creating a new array with these new values...
h4r1m4u
@h4r1m4u
Oct 31 2015 14:04
@m6cheung yeah, the links are working for me. i find twitch buggy when using links from the outside - they link to the correct pages, but the channel doesn't always load. it just shows the spinner icon
@fez994 i was talking about the icon in the button. the code that you posted for that was incorrect.
not about the map
Michael Cheung
@m6cheung
Oct 31 2015 14:05
@h4r1m4u yea same here
i don't know if it's a programming issue though
h4r1m4u
@h4r1m4u
Oct 31 2015 14:06
@Pezz18 in a nutshell, what the map does is iterates over an array and applies the code in the function you pass it on each element in that array. it then returns an array with the elements from the original array after the application of the function.
@m6cheung no, it's not a coding issue. the links are correct
it's just twitch not working as it should
Blauelf
@Blauelf
Oct 31 2015 14:07
@fez994 No need to use var more than once in a given function. And oldArray already contains [1,2,3,4,5], so you could write var newArray = oldArray.map(...
Michael Cheung
@m6cheung
Oct 31 2015 14:07
@h4r1m4u thanls
@h4r1m4u thanks
CamperBot
@camperbot
Oct 31 2015 14:07
m6cheung sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 448 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 14:07
@m6cheung no problem
Andrew Perrin
@Pezz18
Oct 31 2015 14:08
ok...
Federico Dente
@fez994
Oct 31 2015 14:08

Why is not working? var newArray = oldArray;

array = newArray.filter(function(val) {
return val > 5;
});

"You should have removed all the values from the array that are greater than 5."
h4r1m4u
@h4r1m4u
Oct 31 2015 14:09
@fez994 var array = ...
Andrew Perrin
@Pezz18
Oct 31 2015 14:09
so, what is the solution to the challenge? maybe if i see a working example it will click for me!
Federico Dente
@fez994
Oct 31 2015 14:10
var array = newArray.filter(function(val) {
return val > 5;
});
@h4r1m4u not working
Stefan Stamenkovic
@stxdcode
Oct 31 2015 14:11
This message was deleted
Andrew Perrin
@Pezz18
Oct 31 2015 14:12
yes, the challenge is mapping the oldArray and then adding three to each value ... so the new array will be 4,5,6,7,8
Pavan
@pavanp73
Oct 31 2015 14:12
Anyone know Bootstrap ?
h4r1m4u
@h4r1m4u
Oct 31 2015 14:12
@Pezz18 i'm not going to give you a solution, but i'll give you another example:
var array = ['a','b','c','d','e'];

array = array.map(function(letter) {
   return letter + 'hoy';
});

// array is now ["ahoy", "bhoy", "choy", "dhoy", "ehoy"]
@pavanp73 yes
Pavan
@pavanp73
Oct 31 2015 14:12
Any idea how to use ```
@font-family-base
Federico Dente
@fez994
Oct 31 2015 14:13
@h4r1m4u var array = newArray.filter(function(val) {
return val > 5;
}); Why is not working?
Andrew Perrin
@Pezz18
Oct 31 2015 14:14
aha,,, thanks @h4r1m4u
CamperBot
@camperbot
Oct 31 2015 14:14
pezz18 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 449 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Andrew Perrin
@Pezz18
Oct 31 2015 14:14
i get it now,,,
h4r1m4u
@h4r1m4u
Oct 31 2015 14:14
@pavanp73 the @variables are for CSS preprocessors like Less or Sass. what specifically are you trying to do?
@fez994 post the whole code
@Pezz18 great! feel free to ask if you need further clarification
Andrew Perrin
@Pezz18
Oct 31 2015 14:15
its the start of the array i was getting wrong
Blauelf
@Blauelf
Oct 31 2015 14:15
@fez994 The code on the last line expects your results in newArray, not array.
Andrew Perrin
@Pezz18
Oct 31 2015 14:16
by not putting oldArray = oldArray.map etc
Pavan
@pavanp73
Oct 31 2015 14:17
@h4r1m4u specifically, i want to use @variables in my HTML docs...
h4r1m4u
@h4r1m4u
Oct 31 2015 14:17
@Pezz18 ah, right. yeah, the map returns an array that you need to save into some variable to retain it. it doesn't modify the array it runs on
Blauelf
@Blauelf
Oct 31 2015 14:17
@fez994 And you seem to have some misconception on how filter works. It keeps anything for which the given function returns a truthy value, and discards those for which it gets a falsy value.
Federico Dente
@fez994
Oct 31 2015 14:18

@Blauelf @h4r1m4u var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray;

var newarray = newArray.filter(function(val) {
return val > 5;
});
// Only change code above this line.

(function() { return newArray; })();

h4r1m4u
@h4r1m4u
Oct 31 2015 14:18
@pavanp73 you cannot. they're not designed for that. they're only used by the CSS pre-processors.
Federico Dente
@fez994
Oct 31 2015 14:18

This is the example array = array.filter(function(val) {

  return val % 2 === 0;

});

Blauelf
@Blauelf
Oct 31 2015 14:19
@fez994 You want to remove everything >5, so what you want to keep has <=5, use that instead.
h4r1m4u
@h4r1m4u
Oct 31 2015 14:19
@fez994 var newArray = newArray.filter(function(val) {// note the capital A in newArray
Mihuleac Sergiu
@physicalit
Oct 31 2015 14:19

Hi!

I need some help with Create a JavaScript Slot Machine. I em missing something, my code works and i can pass to the next one but it's not fully functional because the fruits doesn't appear at all on the screen.

        // Only change code below this line.

       var slotOne = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
       var slotTwo = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
       var slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;

      // Only change code above this line.

What am I missing?

Federico Dente
@fez994
Oct 31 2015 14:20
@Blauelf i got it right after i copied the code to you, it was just 1 mistake, eazy
Blauelf
@Blauelf
Oct 31 2015 14:20
@physicalit The fruits come in a later waypoint.
Pavan
@pavanp73
Oct 31 2015 14:20
@h4r1m4u oh okay. If we want to change the base values, we can change it and have to recompile the CSS right ?
Mihuleac Sergiu
@physicalit
Oct 31 2015 14:20
@Blauelf ah ok!
h4r1m4u
@h4r1m4u
Oct 31 2015 14:21
@pavanp73 yeah, that's right. the Sass or Less files need to be compiled into CSS
Pavan
@pavanp73
Oct 31 2015 14:21
Cool! @h4r1m4u thanks
CamperBot
@camperbot
Oct 31 2015 14:21
pavanp73 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 450 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 31 2015 14:22
@pavanp73 you can also use the bootstrap customization to have the custom CSS compiled for you, so that you don't need to mess with Sass or Less yourself: http://getbootstrap.com/customize/
Pavan
@pavanp73
Oct 31 2015 14:22
yeah. got to know just now..
h4r1m4u
@h4r1m4u
Oct 31 2015 14:22
cool :)
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:44
this is killing me >.<
  <div class="row">
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="row">
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
      <div class="row">
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
or is it because im nesting around the button
Stefan Stamenkovic
@stxdcode
Oct 31 2015 14:46
@zaixeno you opened div few times but closed only once
<div class="row">
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-4 col-xs-6">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
Blauelf
@Blauelf
Oct 31 2015 14:48
@stxdcode Put lines of ``` around your code, one before, one after.
Exactly that way :)
Stefan Stamenkovic
@stxdcode
Oct 31 2015 14:48
@Blauelf Sorry, I'm new here
Blauelf
@Blauelf
Oct 31 2015 14:49
That's why I tell you. Most people don't do that on purpose.
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:50
So you have to close every div for every div used then?
Stefan Stamenkovic
@stxdcode
Oct 31 2015 14:51
@zaixeno exactly :D
Dan Farcas
@dmfarcas
Oct 31 2015 14:51
hint largest numbers
CamperBot
@camperbot
Oct 31 2015 14:51
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Blauelf
@Blauelf
Oct 31 2015 14:51
Every HTML element should be closed. There are only a few like img or br, that don't require closing.
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:52
wow div is gonna be all over the place then
ok i just need to see how it really looks because im not getting this at all.
Lusako Njwaba
@lunjwaba1
Oct 31 2015 14:53
@zaixeno yup, go to any famous site and hit ctrl+shift+I, you'll see a bunch of long lines of divs
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:54
Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6.
Make sure each of your div elements has a closing tag.
 <div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
the only one i have checked is the last one
Blauelf
@Blauelf
Oct 31 2015 14:55
@zaixeno The tasks talk about the radio buttons. Not buttons.
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:55
OMG
/FACEPALM
im done.
LOL
Thanks @Blauelf
CamperBot
@camperbot
Oct 31 2015 14:55
zaixeno sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:warning: zaixeno already gave blauelf points
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:56
need to pay more attention. i seen the word button and that all i thought about
Arnis Jaundzeikars
@SangSatori
Oct 31 2015 14:56
I'd like to take the opportunity to remind everyone to take frequent breaks and not neglect their pets and loved ones because of coding. :)
Zai Xeno
@removed~zaixeno
Oct 31 2015 14:56
@SangSatori too late
lol
thanks however!
CamperBot
@camperbot
Oct 31 2015 14:56
if you want to thank someone, put an @ before their name!
Lusako Njwaba
@lunjwaba1
Oct 31 2015 14:57
ok. coders what am i messing up here:
<script>$(document).ready(function() { });</script>
I get no feedback after running the test
ds
@d-suarez
Oct 31 2015 14:57
How are people adding screenshots of their code?
Blauelf
@Blauelf
Oct 31 2015 14:58
Maybe the test wants you to have that on multiple lines?
@d-suarez ![alt](http://...), but it's better to post code as text, enclosed in lines containing only ```
Andrey Mayer
@SpinozaWeb
Oct 31 2015 15:00
HI everywone
pls help me
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:00
backtickbacktickbacktick (paste code) backtickbacktickbacktick
Blauelf
@Blauelf
Oct 31 2015 15:00
@SpinozaWeb We can't help unless you describe your problem or ask your question.
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:01
backticks all the way on top and all the way on bottom of the code
Andrey Mayer
@SpinozaWeb
Oct 31 2015 15:01
5 minutes
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:01
Why is coding so addictive?
noskca
@noskca
Oct 31 2015 15:02
Because you can do ANYTHING!
;D
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:02
@noskca aint that the truth!
Lusako Njwaba
@lunjwaba1
Oct 31 2015 15:02
@Blauelf I am at Waypoint: Learn how Script Tags and Document Ready Work. Have you past that point?
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:02
ok if you have to close a div for every div, why is this the original code
<div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
      <div class="col-xs-6">
noskca
@noskca
Oct 31 2015 15:03
You have to close the one for the class?
@zaixeno
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:04
@lunjwaba1 put this at the top of your code:
<script>$(document).ready(function() {});</script>
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:04
i closed both divs, it didnt work so i took one closed div out and it worked.
<div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:05
This message was deleted
noskca
@noskca
Oct 31 2015 15:05
you are also missing a /
<div class="col-xs-6">
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:05
<div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
</div>
they said that didnt work
Blauelf
@Blauelf
Oct 31 2015 15:05
@lunjwaba1 Your code works for me. Did you place that above all the other code (just like the comment suggests)?
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:05
but the single one did
noskca
@noskca
Oct 31 2015 15:05
I am still fairly new to HTML, so maybe I shouldn't be answering questions @zaixeno haha
Blauelf
@Blauelf
Oct 31 2015 15:06
@zaixeno The row-div should contain both col-xs-6 divs.
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:06
@zaixeno on which waypoint?
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:06
its just weird to me, i just wanna make sure to know if i truly have to close every div
but i guess i should anyway
88
Blauelf
@Blauelf
Oct 31 2015 15:08
Divs should be closed, and not doing that will cause your website look broken. If you don't close the divs, how would the browser know that the new div below is after and not inside the one before?
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:08
@zaixeno what's the name, i can't find it xd
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:09
ah it was because i had it messed up somewhere else >/< coding makes me feel so dumb sometimes lmao
noskca
@noskca
Oct 31 2015 15:09
You just have to slow down and really double check yourself @zaixeno
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:10
@noskca thanks on the reminder, definitely nothing speedy about coding haha
CamperBot
@camperbot
Oct 31 2015 15:10
zaixeno sends brownie points to @noskca :sparkles: :thumbsup: :sparkles:
:star: 14 | @noskca | http://www.freecodecamp.com/noskca
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:10
i wonder do more people type while they code or do you guys do more copy and pasting? :D
Lusako Njwaba
@lunjwaba1
Oct 31 2015 15:10
@Blauelf @zaixeno changed the browser, I think it was one of the extensions on chrome that where preventing me to run the script. Thanks guys :smile: :+1:
CamperBot
@camperbot
Oct 31 2015 15:10
lunjwaba1 sends brownie points to @blauelf and @zaixeno :sparkles: :thumbsup: :sparkles:
:star: 91 | @zaixeno | http://www.freecodecamp.com/zaixeno
:star: 443 | @blauelf | http://www.freecodecamp.com/blauelf
Lusako Njwaba
@lunjwaba1
Oct 31 2015 15:11
*was
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:11
whoa i have 91 stars
how
i never been thanked hahaha
Blauelf
@Blauelf
Oct 31 2015 15:12
help brownie points
CamperBot
@camperbot
Oct 31 2015 15:12

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Arnis Jaundzeikars
@SangSatori
Oct 31 2015 15:12
For a second I thought GitHub stars, hah. I have... 800+ starred code-things now or so, I think?
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:12
Ah Per challenge
i just joined some hours ago, on a roll!
i wanna become a coder in one day LOL
noskca
@noskca
Oct 31 2015 15:13
@zaixeno you should really focus on typing it all out when you are first learning.
@zaixeno that will help you to understand what is actually happening in the code
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:15
makes sense :)
what text editor do a lot of you guys use?
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:16
I'm using atom now :D
Arnis Jaundzeikars
@SangSatori
Oct 31 2015 15:17
Right now Atom for me too (code ligatures & package niceties) and Sublime Text before that.
ATA
@aTa1Coder
Oct 31 2015 15:17
Hi! I'm new on FCC. Can someone help me link my github account with FreeCodeCamp? On my github screen the 'stars' or option to star a repository doesn't show. I realize I did this backwards where I dove into learning HTML, CSS, Bootstrap, and JavaScript before setting up github account. Would appreciate a reply with guidance. Thank you!
Mihuleac Sergiu
@physicalit
Oct 31 2015 15:21

hi!

For Waypoint: Iterate over Arrays with map

My Code is:

    var newArray = oldArray;
    newArray.map(function(val){

   return val*3;
});

and I still get You should add three to each value in the array. There is something that i don't understand here. Can someone help me understand?

h4r1m4u
@h4r1m4u
Oct 31 2015 15:22
@physicalit the map function returns an array. you need to save into some variable. it doesn't modify the array you run it on
also val * 3 is multiplication, not addition
Arnis Jaundzeikars
@SangSatori
Oct 31 2015 15:23
@aTa1Coder: You can link your GitHub while you're logged in on both FCC and GitHub. Go to your profile and there should be the GitHub icon there; use that to link the accounts.
Mihuleac Sergiu
@physicalit
Oct 31 2015 15:24
@h4r1m4u ok thanks i think i understand now!
CamperBot
@camperbot
Oct 31 2015 15:24
physicalit sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 451 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:25
This message was deleted
Aleksander Gębicki
@Takumar
Oct 31 2015 15:26
@TameeraCorporal How's your converter? :-)
nedzie
@nedzie
Oct 31 2015 15:28
"Waypoint: Import a Google Font", The 3rd thing I have to do is wrong, says: "$(...).css(...) is undefined", someone knows what I have to do?
Blauelf
@Blauelf
Oct 31 2015 15:32
@nedzie Maybe you broke the p rule in your style tag?
Or are you using some script blocker that accidentally blocked something?
Maybe you could post your code here (just the style and the link tag, I think the rest should be the same as the sample code)
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:33
<button type="submit" class="btn btn-primary">
does it matter if the type comes before the class or it does not matter what order they are placed?
Blauelf
@Blauelf
Oct 31 2015 15:34
@zaixeno Does not matter.
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:35
thank you
CamperBot
@camperbot
Oct 31 2015 15:35
if you want to thank someone, put an @ before their name!
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:35
@Blauelf thank you
CamperBot
@camperbot
Oct 31 2015 15:35
zaixeno sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 444 | @blauelf | http://www.freecodecamp.com/blauelf
nedzie
@nedzie
Oct 31 2015 15:36

Everything was blank when i started this step, then I make a new code: <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css" />

<h2 style="font-family:Lobster;">Hey!</h2>

Oops >_>
Madchanpx
@Madchanpx
Oct 31 2015 15:37
Hello guys, can someone help me with
(6) Waypoint: Target the same element with multiple jQuery Selectors?
ds
@d-suarez
Oct 31 2015 15:37

'''
if (0 === 1) {
return true;
} else {
return false;

}
'''
How would I make the code above return "heads" and "tails" instead of true/false?

CamperBot
@camperbot
Oct 31 2015 15:37
:bulb: to format code use backticks! ``` more info
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:39

@d-suarez true and false are boolean states, only way is to return strings:

return 'head';
return 'tails';

ds
@d-suarez
Oct 31 2015 15:41
@stxdcode Got it...thanks!
CamperBot
@camperbot
Oct 31 2015 15:41
d-suarez sends brownie points to @stxdcode :sparkles: :thumbsup: :sparkles:
:star: 82 | @stxdcode | http://www.freecodecamp.com/stxdcode
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:42
So far doing bootstrap, I'm getting the feeling bootstrap makes a whole lot of thing easier for coders. Am i correct here?
things*
Stefan Stamenkovic
@stxdcode
Oct 31 2015 15:42
@zaixeno yeah, it's milion times easier and faster to style your page than plain css
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:45
might go ahead and see what I can make out of bootstrap right when i finish this part of the tutorial for the extra practice
Craig Morrison
@frogmorton
Oct 31 2015 15:51
Anyone use www.quotesdaddy.com/ for the random quote machine?
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:52
how would this look in code? "Nest two div class="col-xs-6" elements within your div class="row" element."
Craig Morrison
@frogmorton
Oct 31 2015 15:53
They state explicitly on the api page that: "To use the API you must apply for an API Developer user name and key. When applying please provide as many details possible about your intended use of the API." Trouble is, I can't seem to find any links on where to apply for this so called Dev user name / key.... ideas?
Blauelf
@Blauelf
Oct 31 2015 15:53
<div class="row">
  <div class="col-xs-6">
  </div>
  <div class="col-xs-6">
  </div>
</div>
Craig Morrison
@frogmorton
Oct 31 2015 15:54
@zaixeno What Blauelf said
Zai Xeno
@removed~zaixeno
Oct 31 2015 15:56
thank you so much
CamperBot
@camperbot
Oct 31 2015 15:56
if you want to thank someone, put an @ before their name!
Zai Xeno
@removed~zaixeno
Oct 31 2015 16:09
would these both work the same:
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
    <div class="col-xs-6">
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>
</div>
    </div>
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>
i just wondering also if it matters where you close the div.
Blauelf
@Blauelf
Oct 31 2015 16:11
Would probably not be the same.
Zai Xeno
@removed~zaixeno
Oct 31 2015 16:11
just did it, you are right thanks
CamperBot
@camperbot
Oct 31 2015 16:11
if you want to thank someone, put an @ before their name!
Blauelf
@Blauelf
Oct 31 2015 16:12
As I said, in the first case, your col-xs-6 divs are nested, this should result in different layout.
Craig Morrison
@frogmorton
Oct 31 2015 16:18
Anyone use www.quotesdaddy.com/ for the random quote machine?
They state explicitly on the api page that: "To use the API you must apply for an API Developer user name and key. When applying please provide as many details possible about your intended use of the API." Trouble is, I can't seem to find any links on where to apply for this so called Dev user name / key. Any suggestions / advice?
David Wilbanks
@dwilbank68
Oct 31 2015 16:18
I took a glance... you created account with "Sign up" ?
Craig Morrison
@frogmorton
Oct 31 2015 16:18
yes
is that all?
i don't have that secret key thingy
David Wilbanks
@dwilbank68
Oct 31 2015 16:19
will take another look...
Craig Morrison
@frogmorton
Oct 31 2015 16:19
unless they emailed it to me and I forgot to check my mail
i did get a welcome email, but there is no mention of the dev user / key
David Wilbanks
@dwilbank68
Oct 31 2015 16:25
yeh they hide it well
Stefan Stamenkovic
@stxdcode
Oct 31 2015 16:27
well, try using one from samples:
lennon_22
BJz2LYhjOB4grzD8fhrt49rviSW3yvKT
Craig Morrison
@frogmorton
Oct 31 2015 16:32
Yeah, I saw that.... i can't imagine they'd want to do it like that, but I guess I'll give it a go
I don't even see anywhere on the site to contact them with questions
Thanks for looking @stxdcode and @dwilbank68
CamperBot
@camperbot
Oct 31 2015 16:33
frogmorton sends brownie points to @stxdcode and @dwilbank68 :sparkles: :thumbsup: :sparkles:
:star: 21 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68