These are chat archives for FreeCodeCamp/Help

8th
Nov 2015
Fennek
@fennekbe
Nov 08 2015 00:00
@wolfboyprime is that all the code you have?
Kevin H.
@kbolt
Nov 08 2015 00:00
No. One sec

`<form action="input" method="post">
<label for="name">Name:</label>
<input type="text" class="form-control">

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

Fennek
@fennekbe
Nov 08 2015 00:00
and type code between ``` please
Del
@RoboDel
Nov 08 2015 00:00
@wolfboyprime thanks
CamperBot
@camperbot
Nov 08 2015 00:00
robodel sends brownie points to @wolfboyprime :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for wolfboyprime
Del
@RoboDel
Nov 08 2015 00:02
@fennekbe thanks
CamperBot
@camperbot
Nov 08 2015 00:02
robodel sends brownie points to @fennekbe :sparkles: :thumbsup: :sparkles:
:star: 209 | @fennekbe | http://www.freecodecamp.com/fennekbe
Fennek
@fennekbe
Nov 08 2015 00:02
welcome
Del
@RoboDel
Nov 08 2015 00:02
@wolfboyprime you get some too...!
Kevin H.
@kbolt
Nov 08 2015 00:02
:)
Fennek
@fennekbe
Nov 08 2015 00:03
@wolfboyprime can you ctrl+A ctrl+C your whole code, press the reset button and try again?
Kevin H.
@kbolt
Nov 08 2015 00:05
It did the same thing
wait a sec. it loaded the whole cat app this time
Fennek
@fennekbe
Nov 08 2015 00:07
yeah it should do that @wolfboyprime
Kevin H.
@kbolt
Nov 08 2015 00:08
Now it loaded code that is even different from that and it's the same cap photo app
Ok, it let me through
thanks @fennekbe
CamperBot
@camperbot
Nov 08 2015 00:12
wolfboyprime sends brownie points to @fennekbe :sparkles: :thumbsup: :sparkles:
:star: 210 | @fennekbe | http://www.freecodecamp.com/fennekbe
Jeremy Roe
@jeremyroe
Nov 08 2015 01:16
anyone have a really good resource for CSS? I’m finding my knowledge is way short on the pomodoro zipline - I get the basics but it’s not clicking completely
Kilitan
@Kilitan
Nov 08 2015 01:19
@jeremyroe I suppose W3schools, http://www.w3schools.com/css/default.asp If you need to brush up on what the code does and how to use it
Jeremy Roe
@jeremyroe
Nov 08 2015 01:20
Thanks @Kilitan - I’ll take a look - I get the basics of layout but it falls apart when I get to elements within the layouts if that makes sense
CamperBot
@camperbot
Nov 08 2015 01:20
jeremyroe sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 178 | @kilitan | http://www.freecodecamp.com/kilitan
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:20
Screen Shot 2015-11-07 at 5.09.07 PM.png
Kevin H.
@kbolt
Nov 08 2015 01:21
No dude, don't use w3schools. The code there is notoriously bad/incorrect
@jeremyroe Use https://developer.mozilla.org/en-US/ instead
Kilitan
@Kilitan
Nov 08 2015 01:22
It makes perfect sense, I've gotten to a spot where now everything looks like greek to me, and I was on a roll too.
Jeremy Roe
@jeremyroe
Nov 08 2015 01:23
Yeah I’m rock’n my JS (for now) but the front end stuff I’ve hit a wall - Thanks @wolfboyprime I like MDN quite a bit I’ll check there too
CamperBot
@camperbot
Nov 08 2015 01:23
jeremyroe sends brownie points to @wolfboyprime :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for wolfboyprime
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:23
@wolfboyprime Hi, could you help me with this screenshot ? I have added a number value to engines but still its failing to run the tests
Levyian
@levyian
Nov 08 2015 01:23
@kapoorradhika you should be adding it to the car object instead
Kevin H.
@kbolt
Nov 08 2015 01:25
no prob
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:25
@levyian but doesn't the instructions say "Add an engines property with a number value to the myCar instance."
Levyian
@levyian
Nov 08 2015 01:25
@kapoorradhika if I have an object called dog and I want to add a bark sounds I would get the variable holding the dog object dog and add a bark like this dog.bark = "woof";
Kevin H.
@kbolt
Nov 08 2015 01:25
Yep, you've added it in the wrong spot @kapoorradhika
Kilitan
@Kilitan
Nov 08 2015 01:26
I guess the code there is bad, didn't realize that. I've found (and hate to do this) but taking the lessons at www.codecademy.com along with the lessons here helps compound the knowledge, and one can learn tricks from one that wasn't on the other site.
Levyian
@levyian
Nov 08 2015 01:26
@kapoorradhika notice you have the line var myCar = new Car(); so then myCar holds your instance of the car object
Kevin H.
@kbolt
Nov 08 2015 01:26
^
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:27
@levyian @wolfboyprime Allright. Thanks guys :) :)
CamperBot
@camperbot
Nov 08 2015 01:27
kapoorradhika sends brownie points to @levyian and @wolfboyprime :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for wolfboyprime
:star: 357 | @levyian | http://www.freecodecamp.com/levyian
Kevin H.
@kbolt
Nov 08 2015 01:28
It keeps saying "could not find receiver" when people thank me
CamperBot
@camperbot
Nov 08 2015 01:28
if you want to thank someone, put an @ before their name!
Levyian
@levyian
Nov 08 2015 01:29
about @wolfboyprime
CamperBot
@camperbot
Nov 08 2015 01:29
:warning: no user found for wolfboyprime
Levyian
@levyian
Nov 08 2015 01:30
@wolfboyprime should try filing a bug report
Bersuc
@bersuc
Nov 08 2015 01:31
@wolfboyprime r u connected to github?
Kevin H.
@kbolt
Nov 08 2015 01:31
I thought I was
I'm logged into it and it's showing my username
Levyian
@levyian
Nov 08 2015 01:31
@bersuc yeah you could view his github if you hover is name and click the github link
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:32
@levyian check this screenshot plz
Screen Shot 2015-11-07 at 5.30.16 PM.png
I added the engines property in the original car and its showing this error
Bersuc
@bersuc
Nov 08 2015 01:33
@kapoorradhika i think it should be myCar.engine
Levyian
@levyian
Nov 08 2015 01:33
@kapoorradhika you are only suppose to change the code below the //Only change code below this line.
so first remove the this.engine = 1 from inside the constructor
Kilitan
@Kilitan
Nov 08 2015 01:34
Also, @levyian, you helped me in helping @kapoorradhika. So, thanks.
CamperBot
@camperbot
Nov 08 2015 01:34
kilitan sends brownie points to @levyian and @kapoorradhika :sparkles: :thumbsup: :sparkles:
:star: 358 | @levyian | http://www.freecodecamp.com/levyian
:star: 175 | @kapoorradhika | http://www.freecodecamp.com/kapoorradhika
Jeremy Roe
@jeremyroe
Nov 08 2015 01:34
Yeah it’s been a while since I went through codeacademy - maybe I’ll take a 2nd lap on the CSS bits and see if it covers what I need
Levyian
@levyian
Nov 08 2015 01:34
@Kilitan yeah np :)
Kevin H.
@kbolt
Nov 08 2015 01:35
@jeremyroe what part of CSS troubles you?
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:35
@levyian done. It worked :sparkles:
Levyian
@levyian
Nov 08 2015 01:36
@kapoorradhika great!
Jeremy Roe
@jeremyroe
Nov 08 2015 01:36
@wolfboyprime I’m trying to finish my pomodoro project http://codepen.io/jeremyroe/pen/dYKdve?editors=100 but I’ve realized that I was lacking CSS knowledge alot while doing it - I get how to make a dive and use it to create broad layouts but positioning the internal elements isnt’ clicking completely for me
beyond that I have to work on the animation bits but I think that will come once I get the parts I’m missing
Kevin H.
@kbolt
Nov 08 2015 01:37
ah, gotcha
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:38
Also, just curious to know, do people meet up on campsites often ? Like how do we coordinate all that because i don't anyone here? I have sent a message on the Facebook page of free code camp SF, waiting for a reply.
@wolfboyprime
know*
Kevin H.
@kbolt
Nov 08 2015 01:45
@kapoorradhika I'm new to FCC, like really new so I'm just figuring this all out as well
Radhika Kapoor
@kapoorradhika
Nov 08 2015 01:48
@wolfboyprime okay, sailing in the same boat then
Kevin H.
@kbolt
Nov 08 2015 01:49
pretty much. I'll watch the bow and you watch the stern
Kilitan
@Kilitan
Nov 08 2015 01:52
I'm somewhere underneath the boat, and this water is cold.
Kevin H.
@kbolt
Nov 08 2015 01:53
I'll throw you some floaty wings
snake eater
@ricardopezqueda
Nov 08 2015 01:57
need help with Waypoint?
trying to use the CSS and am just not getting it. been stuck on this for hours.
have any of you mastered Waypoint (CSS, class to style and element)?
Kevin H.
@kbolt
Nov 08 2015 02:02
brb
Kilitan
@Kilitan
Nov 08 2015 02:06
These have a hole in them! lol,. What do you need help with Ricardopezqueda?
Alice
@AliceReid
Nov 08 2015 02:10
At "Waypoint: Style Text Inputs as Form Controls", I completed all the steps except for "Give the text input in your form the class form-control." I'm not sure where to put "form-control"
Kilitan
@Kilitan
Nov 08 2015 02:11
@AliceReid Can you link your code, please? Use code
``` <--these things, lol before and after your code.
Kilitan
@Kilitan
Nov 08 2015 02:19
@AliceReid It should look something like this, I believe. My code wasn't saved. <input class="form-control" type="text"></input>
Ed Dixon
@EdDixon
Nov 08 2015 02:27
Going through the program step by step here and loving it depite plenty of hands on in the distant past. I seem to be stuck on the very first part assignment in the Jquery section though but before issuing a bug I want to be sure I am not missing something? This is what I have did I miss anything to cause the run test not to respond?
<script>
$(document).ready(function() {

});
</script>
This is the complete page:

<script>
$(document).ready(function() {

});
</script>

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

Alice
@AliceReid
Nov 08 2015 02:28
@Kilitan thank you!
CamperBot
@camperbot
Nov 08 2015 02:28
alicereid sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 181 | @kilitan | http://www.freecodecamp.com/kilitan
Kilitan
@Kilitan
Nov 08 2015 02:30
@AliceReid You are most welcome.
Rex Schrader
@SaintPeter
Nov 08 2015 02:32
@EdDixon Let me take a look
Ed Dixon
@EdDixon
Nov 08 2015 02:33
Thank you sir!
CamperBot
@camperbot
Nov 08 2015 02:33
if you want to thank someone, put an @ before their name!
Ed Dixon
@EdDixon
Nov 08 2015 02:33
I am using the Edge browser which I guess could be a factor?
Rex Schrader
@SaintPeter
Nov 08 2015 02:34
@EdDixon Humm, runs just fine for me. Try reseting your code and putting it back in again
@EdDixon I don't think Edge works
@EdDixon With our content - we encourage Chrome
@EdDixon Lemme try in Edge
Kilitan
@Kilitan
Nov 08 2015 02:35
@EdDixon Try writing it all on one line - the $(document) line is what I am tlaking about. Like I have it.
$(document).ready(function () {});

</script>
Ed Dixon
@EdDixon
Nov 08 2015 02:35
AH ok yea it wouldn't be the first time I have run into issues with regular javascript and edge! I have tried repeatedly so going to try here in chrome and I am pretty sure that should resolve it! thank you @SaintPeter
CamperBot
@camperbot
Nov 08 2015 02:35
eddixon sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1439 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Nov 08 2015 02:36
@EdDixon Yeah, does not work with Edge at all
Kilitan
@Kilitan
Nov 08 2015 02:38
Good thing I didn't like edge anyway. First thing I did was download Chrome on my sister's-in-law new computer, haha.
Ed Dixon
@EdDixon
Nov 08 2015 02:39
@Kilitan @SaintPeter thanks again it was indeed Microsofts version of javascipt causing the problem! Which is frustrating!
CamperBot
@camperbot
Nov 08 2015 02:39
eddixon sends brownie points to @kilitan and @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: eddixon already gave saintpeter points
:star: 182 | @kilitan | http://www.freecodecamp.com/kilitan
Rex Schrader
@SaintPeter
Nov 08 2015 02:39
@EdDixon You'd think that the first thing they'd do is make it compatible . . .
Oh, wait, Microsoft.
SaintPeter @SaintPeter sighs
Kilitan
@Kilitan
Nov 08 2015 02:42
Hah! @SaintPeter, that is the sad truth.
Brian Flatt
@bflatt72
Nov 08 2015 02:43
Hey guys/gals, I need some help with the Javascript Waypoint getting the slot machine to work. It appears to actual work, but FCC is not accepting it. What am I missing?
$($(".slot")
[0]).html(slotOne);
$($(".slot")
 [1]).html(slotTwo);

$($(".slot")
 [2]).html(slotThree);
Jeremy Roe
@jeremyroe
Nov 08 2015 02:46
@bflatt72 what are you stuck on? Can you post code?
Rex Schrader
@SaintPeter
Nov 08 2015 02:46
@bflatt72 Let me take a look
Brian Flatt
@bflatt72
Nov 08 2015 02:46
I posted it above.
Kilitan
@Kilitan
Nov 08 2015 02:47
Looks good to me, SaintPeter has to work his magic.
Jeremy Roe
@jeremyroe
Nov 08 2015 02:47
I must be looking at he wrong waypoint - which #?
Rex Schrader
@SaintPeter
Nov 08 2015 02:48
@bflatt72 Which specific waypoint is this?
Brian Flatt
@bflatt72
Nov 08 2015 02:48
Bring your javascript slot machine to life
Kilitan
@Kilitan
Nov 08 2015 02:49
44
Brian Flatt
@bflatt72
Nov 08 2015 02:49
44
Rex Schrader
@SaintPeter
Nov 08 2015 02:49
@bflatt72 You have a space bettween ) [0] which is not allowed
Jeremy Roe
@jeremyroe
Nov 08 2015 02:50
    $($(".slot")[1]).html(slotTwo);
    $($(".slot")[2]).html(slotThree);
This is what I have in mine that passed - identical if I’m not mistaken
Brian Flatt
@bflatt72
Nov 08 2015 02:50
cool let me try that
Jeremy Roe
@jeremyroe
Nov 08 2015 02:50
Ah nice catch @SaintPeter
Rex Schrader
@SaintPeter
Nov 08 2015 02:50
@bflatt72 You've got a space in there :D
ckj221
@ckj221
Nov 08 2015 02:52
hey there! would anyone know how to use a CSS class to style an element? am on the catphotoapp exercise and i need to apply a red-text to my h2 element.

this is my code: <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>

Rex Schrader
@SaintPeter
Nov 08 2015 02:53
@ckj221 You need to definte the .red-text style in your style tags
ckj221
@ckj221
Nov 08 2015 02:54
hey there SaintPeter! thanks
CamperBot
@camperbot
Nov 08 2015 02:54
if you want to thank someone, put an @ before their name!
ckj221
@ckj221
Nov 08 2015 02:54
@SaintPeter thank you!
how do i define the red-text style in the style tags?
Rex Schrader
@SaintPeter
Nov 08 2015 02:55
@ckj221 They telll you
ckj221
@ckj221
Nov 08 2015 02:55
they do! but i cant see it...
Rex Schrader
@SaintPeter
Nov 08 2015 02:55
@ckj221 I mean, it should be in the instructions
SaintPeter @SaintPeter goes to look
Kilitan
@Kilitan
Nov 08 2015 02:57
You have to define the class first. .red-text {color: red;} They don't in that exercise I don't believe, it's in a previous exercise. Put it inside the <style> tag
Brian Flatt
@bflatt72
Nov 08 2015 02:57
Thanks guy. Not sure how that happened.
CamperBot
@camperbot
Nov 08 2015 02:57
if you want to thank someone, put an @ before their name!
ckj221
@ckj221
Nov 08 2015 02:58
ah thanks @Kilitan
CamperBot
@camperbot
Nov 08 2015 02:58
ckj221 sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 183 | @kilitan | http://www.freecodecamp.com/kilitan
Brian Flatt
@bflatt72
Nov 08 2015 02:58
Thanks @SaintPeter
CamperBot
@camperbot
Nov 08 2015 02:58
bflatt72 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1440 | @saintpeter | http://www.freecodecamp.com/saintpeter
ckj221
@ckj221
Nov 08 2015 02:59
it worked!!!!
=)
thank you so much!
CamperBot
@camperbot
Nov 08 2015 02:59
if you want to thank someone, put an @ before their name!
Kilitan
@Kilitan
Nov 08 2015 02:59
Oh yes they do show ya how in the example of blue-text. Hmm scratches head You are welcome. I didn't see it either earlier someone was having trouble.
ckj221
@ckj221
Nov 08 2015 03:00
cheers @Kilitan !
and cheers @SaintPeter !
Rex Schrader
@SaintPeter
Nov 08 2015 03:00
Try "thanks"
CamperBot
@camperbot
Nov 08 2015 03:00
if you want to thank someone, put an @ before their name!
Kilitan
@Kilitan
Nov 08 2015 03:01
"thanks"
CamperBot
@camperbot
Nov 08 2015 03:01
if you want to thank someone, put an @ before their name!
Kilitan
@Kilitan
Nov 08 2015 03:01
That didn't do a thing, :P Now you're messing with us.
ckj221
@ckj221
Nov 08 2015 03:02
thanks @Kilitan, and thanks @SaintPeter !
CamperBot
@camperbot
Nov 08 2015 03:02
ckj221 sends brownie points to @kilitan and @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1441 | @saintpeter | http://www.freecodecamp.com/saintpeter
:warning: ckj221 already gave kilitan points
ckj221
@ckj221
Nov 08 2015 03:02
:D
Del
@RoboDel
Nov 08 2015 03:04
Where/How do I put this second radio button in? <label><input type="text" placeholder="cat photo URL" required>indoor</label>
<button type="submit">Submit</button>
Brian Flatt
@bflatt72
Nov 08 2015 03:09
Did anyone actually play the slot machine in Waypoint 44? They coded it to print out "Not a win" when you actually do win. I think this is a bug if I'm not missing something.
I mean after Waypoint 45
Rex Schrader
@SaintPeter
Nov 08 2015 03:17
@bflatt72 I think that may be a bug
@bflatt72 Confirmed, that's a bug.
Brian Flatt
@bflatt72
Nov 08 2015 03:30
I'm not crazy then. Good to know. haha
Del
@RoboDel
Nov 08 2015 03:39
?Each of your two radio button elements should be nested in its own label element.? -------- <form action="/submit-cat-photo">
<label>
<input type ="radio" name="indoor-outdoor">indoor
<input type ="radio" name="indoor-outdoor">outdoor</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
How do I get this second button in here?
Kilitan
@Kilitan
Nov 08 2015 03:45
@Robodel Yeah so put both buttons between a <label> tag.
<label>
<input type ="radio" name="indoor-outdoor">Indoor</label>

<label>
<input type ="radio" name="indoor-outdoor">Indoor</label>
That second button should say "Outdoor", but you see what I mean has to be done?
Del
@RoboDel
Nov 08 2015 03:45
@Kilitan thanks
CamperBot
@camperbot
Nov 08 2015 03:45
robodel sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 185 | @kilitan | http://www.freecodecamp.com/kilitan
Kilitan
@Kilitan
Nov 08 2015 03:46
You're welcome
Mreagertolearn
@Mreagertolearn
Nov 08 2015 03:47
HI there i need some help here:
on "Waypoint: Change the Font Size of an Element" my code is as follows:

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

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

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

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

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

However i can't pass the final check mark to move on to the next lesson.
Michael Guest
@MichaelGuest
Nov 08 2015 03:50
can someone help me with Waypoint: Reverse Arrays with reverse?
`
var array = [1,2,3,4,5,6,7];

// Only change code below this line.

array.reverse(function(){
  return array;
});

// Only change code above this line.

(function() {return array;})();
what am I doing wrong?
DTing
@dting
Nov 08 2015 03:53
@MichaelGuest you dont need to call it with any arguments
array.reverse();
Michael Guest
@MichaelGuest
Nov 08 2015 03:53
wow thanks!
CamperBot
@camperbot
Nov 08 2015 03:53
if you want to thank someone, put an @ before their name!
Michael Guest
@MichaelGuest
Nov 08 2015 03:53
thanks @dting
CamperBot
@camperbot
Nov 08 2015 03:53
michaelguest sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
Michael Guest
@MichaelGuest
Nov 08 2015 03:53
ill check this out next time thanks!
CamperBot
@camperbot
Nov 08 2015 03:53
if you want to thank someone, put an @ before their name!
DTing
@dting
Nov 08 2015 03:53
mdn is a good resource for examples and stuff
np
Michael Guest
@MichaelGuest
Nov 08 2015 03:53
oh really? thats good to know
Alfredo J Moreno
@Junmr4
Nov 08 2015 03:54
hello everyone i need help in javascript with for loops....
Michael Guest
@MichaelGuest
Nov 08 2015 03:58
Sure could you paste your code?
Rob Eichenlaub
@eichenlaub
Nov 08 2015 03:58
@Junmr4 just got done with that one
Kilitan
@Kilitan
Nov 08 2015 04:01

This probably sounds dumb, but can someone please try to explain a part of code to me, and why it does what it does.

array = array.filter(function(val) {

  return val % 2 === 0;

});

I'm wonderabout about the return val % 2 ===0 part, how does that filter out odd numbers? It looks to me that it's returning the remainder of 2 that is the same as zero...yeah. I don't get it.

Rob Eichenlaub
@eichenlaub
Nov 08 2015 04:01
@Junmr4 make sure you have the correct variable name
Sarai Flowers
@MadreDeLobos
Nov 08 2015 04:02
help!!
CamperBot
@camperbot
Nov 08 2015 04:02

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Sarai Flowers
@MadreDeLobos
Nov 08 2015 04:02
<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 class="background-color">
  <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>
my div background wont change.
i tried it a different way and it worked with changing the color. but it wont let me pass the waypoint.
anyone else having this issue?
Venkat Polumahanti
@venkat4541
Nov 08 2015 04:05
class name needs to be same in style and tag declaration
@c0d9x
Sarai Flowers
@MadreDeLobos
Nov 08 2015 04:06
@venkat4541 but it wont let me pass even when i remove the .gray-background class and add the DIV class in there.
Michael Guest
@MichaelGuest
Nov 08 2015 04:07
@Kilitan val % 2 === 0 means that any even number for example 6 % 2 will = 0 or 20 % 0 will = 0
Kilitan
@Kilitan
Nov 08 2015 04:07
@c0d9x What error are you getting when you run test?
M Used
@mildused
Nov 08 2015 04:08
@MichaelGuest You are wrong about 20 % 0
Sarai Flowers
@MadreDeLobos
Nov 08 2015 04:08
@Kilitan Give your div element the class gray-background.
Your div element should have a gray background.
M Used
@mildused
Nov 08 2015 04:08
It is probably NaN
Venkat Polumahanti
@venkat4541
Nov 08 2015 04:08
did you try <div class="gray-background">
Michael Guest
@MichaelGuest
Nov 08 2015 04:09
@mildused thanks for telling me
CamperBot
@camperbot
Nov 08 2015 04:09
michaelguest sends brownie points to @mildused :sparkles: :thumbsup: :sparkles:
:star: 51 | @mildused | http://www.freecodecamp.com/mildused
Sarai Flowers
@MadreDeLobos
Nov 08 2015 04:09
@venkat4541 thank you. that was it. lol -- i was over thinking it.
CamperBot
@camperbot
Nov 08 2015 04:09
c0d9x sends brownie points to @venkat4541 :sparkles: :thumbsup: :sparkles:
:star: 176 | @venkat4541 | http://www.freecodecamp.com/venkat4541
M Used
@mildused
Nov 08 2015 04:09
We're in a similar boat @MichaelGuest . What grade are you in?
Venkat Polumahanti
@venkat4541
Nov 08 2015 04:09
nevermind :+1:
Michael Guest
@MichaelGuest
Nov 08 2015 04:09
@mildused haha yeah im a junior in high school how about yourself?
M Used
@mildused
Nov 08 2015 04:10
Same
Michael Guest
@MichaelGuest
Nov 08 2015 04:10
@mildused nice!
@mildused im taking AP Computer Science we are learning Java. At the same time im learning freecodecamp
M Used
@mildused
Nov 08 2015 04:10
I took APCS last year. It's pretty useless
Michael Guest
@MichaelGuest
Nov 08 2015 04:11
I would have to agree lol
Kilitan
@Kilitan
Nov 08 2015 04:14
Thank you @MichaelGuest . That's a nice, concise answer and makes sense for my questions, but now I have another. Does the computer default to even numbers or does the === make it so? If we used val % 2 !== 0 it would know we were talking about odd numbers?
CamperBot
@camperbot
Nov 08 2015 04:14
kilitan sends brownie points to @michaelguest :sparkles: :thumbsup: :sparkles:
:star: 184 | @michaelguest | http://www.freecodecamp.com/michaelguest
Lorkan
@Lorkan
Nov 08 2015 04:15
Hey what's up guys I need help on Waypoint: Uncomment HTML. I did everything and I have the green check. But every time I click on the run tests it wouldnt let me go the next challenge
Kilitan
@Kilitan
Nov 08 2015 04:15
Wish my High school taught classes like y'alls. We were lucky to have a computer lab.
Michael Guest
@MichaelGuest
Nov 08 2015 04:17
@Kilitan My pleasure. === means that a number is = to another number. The symbol = gets a variable or value. In terms of your second question for odd numbers I think you would have to do val % another number maybe 3. I'm am not exactly sure. I'm still learning myself.
Kilitan
@Kilitan
Nov 08 2015 04:17
@Lorkan Try clicking Map at the top of your page and seeing if it passed you on that challenge. Then manually select the next one in the list.
Lorkan
@Lorkan
Nov 08 2015 04:19
Thank you!! But it didn't let me pass the test
CamperBot
@camperbot
Nov 08 2015 04:19
if you want to thank someone, put an @ before their name!
Kilitan
@Kilitan
Nov 08 2015 04:20
@MichaelGuest That's cool. I'm sitting here thinking it's pretty cool that the education system isn't failing us completely. Haha. I suppose they don't make you use common core when learning Java...=)
Lorkan
@Lorkan
Nov 08 2015 04:21
@Kilitan haha i got it thanks for your help
CamperBot
@camperbot
Nov 08 2015 04:21
lorkan sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 186 | @kilitan | http://www.freecodecamp.com/kilitan
Kilitan
@Kilitan
Nov 08 2015 04:21
@Lorkan Hmm, try again, at least that is a rather fast challenge. As long as both comment tags (at top and bottom) are deleted it should pass you.
@Lorkan Oh cool. Okay. You are welcome
Michael Guest
@MichaelGuest
Nov 08 2015 04:23
@Kilitan Haha. For Java after 2 weeks we have a multiple choice test. Also a free response which you make a program based on the prompt. I guess we have some aspects of common core haha.
@Kilitan brb going to eat dinner.
Kilitan
@Kilitan
Nov 08 2015 04:26
@MichaelGuest Maybe not for too much longer. I do wonder how my little brother is making it in math when he's having to anchor 9s. There is a plus side to it, at least when he doesn't know an answer he can draw a funny picture and get counted right.
JL GARZA
@Garza0783
Nov 08 2015 04:40
i need help on something please
i just started and im on Prioritize One Style Over Another
I cant remember how to change my h1 element so it has a class entered. where can i go back and relearn that????
Kilitan
@Kilitan
Nov 08 2015 04:43
@Garza0783 At the very beginning of the HTML CSS list is where they talk about styling elements with classes. Number 10 challenge
JL GARZA
@Garza0783
Nov 08 2015 04:44
awesome!!! thank you!!!
CamperBot
@camperbot
Nov 08 2015 04:44
if you want to thank someone, put an @ before their name!
JL GARZA
@Garza0783
Nov 08 2015 04:44
@Kilitan thank you!!
Kilitan
@Kilitan
Nov 08 2015 04:44
You are welcome.
JL GARZA
@Garza0783
Nov 08 2015 04:51
ok i am missing something...

Create a CSS class called pink-text that gives an element the color pink.

Give your h1 element the class of pink-text.

<style>
.pink-text {
background-color: black;
font-family: Monospace;
color: pink;
}
</style>

<h1 class:"pink-text">Hello World!</h1>

what did i miss in there??
bruglesco
@bruglesco
Nov 08 2015 04:51
class="pink-text"
just a typo
JL GARZA
@Garza0783
Nov 08 2015 04:52
ugh i knew it was simple
bruglesco
@bruglesco
Nov 08 2015 04:52
also wiki format
wiki format
CamperBot
@camperbot
Nov 08 2015 04:52

: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

JL GARZA
@Garza0783
Nov 08 2015 04:52
@bruglesco thank you!
CamperBot
@camperbot
Nov 08 2015 04:52
garza0783 sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 225 | @bruglesco | http://www.freecodecamp.com/bruglesco
bruglesco
@bruglesco
Nov 08 2015 04:52
no prob
Jasmin Ibrahim
@jazzofett
Nov 08 2015 04:56
having trouble on Waypoint: Set the ID of an Element :/
is this correct? <form action="/submit-cat-photo">
<form id="cat-photo-app">
<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>
whoops the second line should be <form id="cat-photo-form"> but it still isnt correct
i guess my main question is where exactly does the id attribute go in the form element
Kilitan
@Kilitan
Nov 08 2015 04:59
@jazzofett You are correct except it should be the ID cat-photo-form
Jasmin Ibrahim
@jazzofett
Nov 08 2015 05:00
hi @Kilitan i saw that error as soon as i posted but when i changed it and submitted, it is still wrong
Kilitan
@Kilitan
Nov 08 2015 05:01
@jazzofett You didn't change any other code, did you? Should just add that ID and submit
Jasmin Ibrahim
@jazzofett
Nov 08 2015 05:01
ohhhhhhh nvm, I got it. I had to place the form id before the form action
Kilitan
@Kilitan
Nov 08 2015 05:02
Ahh, awesome.
Jasmin Ibrahim
@jazzofett
Nov 08 2015 05:02
thank you @kilitan you were my rubber duck just now haha
CamperBot
@camperbot
Nov 08 2015 05:02
jazzofett sends brownie points to @kilitan :sparkles: :thumbsup: :sparkles:
:star: 192 | @kilitan | http://www.freecodecamp.com/kilitan
Kilitan
@Kilitan
Nov 08 2015 05:04
@jazzofett Glad to be of assistance, even if I didn't catch the mistake. It's better you did, anyway.
Jason
@Jauble
Nov 08 2015 05:05
Anyone know how I can keep my break length and session length centered when minimized? http://codepen.io/auble220/pen/avyZZE
Jeremy Roe
@jeremyroe
Nov 08 2015 05:06
I’m fighting the similar thing right now @Jauble - feel free to look at my code for ideas but I’m not sure if it’ll help at all - http://codepen.io/jeremyroe/pen/dYKdve?editors=010
Jason
@Jauble
Nov 08 2015 05:07
Ok thanks @jeremyroe
CamperBot
@camperbot
Nov 08 2015 05:07
jauble sends brownie points to @jeremyroe :sparkles: :thumbsup: :sparkles:
:star: 258 | @jeremyroe | http://www.freecodecamp.com/jeremyroe
Jeremy Roe
@jeremyroe
Nov 08 2015 05:09
@Jauble thinking you
Kilitan
@Kilitan
Nov 08 2015 05:09
Have you two tried using the auto tag with your margins?
Jeremy Roe
@jeremyroe
Nov 08 2015 05:09
you’ll want to work on a min-width on columns perhaps
it’s the fluid shoving them around form what I can see
Matt Yamamoto
@MattYamamoto
Nov 08 2015 05:21
@Jauble I'm sure there is more than one way, but instead of floating those elements left and right give your #sesDiv and #breakDiv the css property text-align: center;. That will center them in their rows. I know that will break the look at large screen widths, but I think if you rethought your boostrap grid layout you could solve that.
Jason
@Jauble
Nov 08 2015 05:24
@MattYamamoto I'm pretty sure I've tried that, but I'll see if it does anything. What could I do differently with my layout?
Brian Hankins
@brianhankins
Nov 08 2015 05:26
I need help understanding Waypoint: Make Object Properties Private. How can you tell the difference between public and private; making it accessible from inside or outside the method?(Using 'this' is also confusing too.)
M Used
@mildused
Nov 08 2015 05:27
Is anyone familiar with either Parse or Firebase?
Nathan
@terakilobyte
Nov 08 2015 05:27
@brianhankins a public property would be anything that you could access by typing something like obj.prop
@brianhankins a private property would be something the object could reference internally, but if you typed obj.prop you'd get undefined back
Matt Yamamoto
@MattYamamoto
Nov 08 2015 05:28
@Jauble actually, now that I think about it maybe you could just put a max-width on the container element... that might be the easiest thing to do to keep the break/session times from getting to spread out.
@Jauble or just use a fixed width container.
Jason
@Jauble
Nov 08 2015 05:30
@MattYamamoto Didn't think about that. Thanks
CamperBot
@camperbot
Nov 08 2015 05:30
jauble sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 482 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Sujay K.
@dassh
Nov 08 2015 06:10
Guys, I'm stuck at Waypoint: Responsively Style Radio Buttons.
Can anyone help me ?
Del
@RoboDel
Nov 08 2015 06:11
@dassh your question?
Sujay K.
@dassh
Nov 08 2015 06:11
It says to nest radio buttons in a row, and then further nest them with col-xs-6. I've done it correctly as per my understanding, but not getting through.
Shall I share my code ?
DJ
@qualitymanifest
Nov 08 2015 06:12
@dassh post your code. usually when i see people making mistakes on this it's because they're styling the wrong thing
Sujay K.
@dassh
Nov 08 2015 06:12
@RoboDel
ok
<ul>
<div class="row">
<div class="col-xs-6"><li>cat nip</li></div>
<div class="col-xs-6"><li>laser pointers</li></div>
<div class="col-xs-6"><li>lasagna</li></div>
</div>
</ul>
DJ
@qualitymanifest
Nov 08 2015 06:13
@dassh yeah you're assigning col-xs-6 to the wrong part
@dassh you need to leave your list elements at col-xs-4 and make your radio elements (look further down on your code) col-xs-6
Sujay K.
@dassh
Nov 08 2015 06:14
But it no where says to use col-xs-4.
Question is : Nest all of your radio buttons within a <div class="row"> element. Then nest each of them within a <div class="col-xs-6"> element.
DJ
@qualitymanifest
Nov 08 2015 06:14
@dassh since there are 3 list elements, and bootstrap rows are only 12 columns long, you're probably seeing the 3rd button show up underneath the first 2.
@dassh hit "reset" to reset your code for this waypoint, you will see they start out at 4. leave the col-xs-4 ones alone
Sujay K.
@dassh
Nov 08 2015 06:15
Ok, let me figure it out. May be I mis understood the question.
DJ
@qualitymanifest
Nov 08 2015 06:17
@dassh actually, looking at that waypoint now - you're not supposed to apply columns to your list elements at all. so don't do that. just give your radio buttons (they are near the bottom) a row and then col-xs-6 for each.
radio buttons look like this :radio_button:
Sujay K.
@dassh
Nov 08 2015 06:21
Yeah, I know what they're. Stupid me, I didn't see them as they were on page 2 of the output page.
@qualitymanifest Thanks for the help buddy. Level cleared.
CamperBot
@camperbot
Nov 08 2015 06:21
dassh sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 340 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Nov 08 2015 06:22
@dassh don't worry i see a lot of people get stuck on this one. waypoints usually go so fast that people just bust out the first answer they think of, often without fully reading the instructions
(i've certainly been guilty of it)
Sujay K.
@dassh
Nov 08 2015 06:24
haha :smile:
Kevin Brewer
@appleJax
Nov 08 2015 06:32
I'm having trouble getting past Waypoint: Add Borders Around Your Elements. The instruction "Give your image a border width of 10px" keeps displaying an X even though I have added "border-width: 10px;" to .thick-green-border in the style tag. The border displays correctly in the preview, but the error will not go away. Suggestions? screenShot
DJ
@qualitymanifest
Nov 08 2015 06:32
@appleJax check to see if your browser is zoomed or shrunk. it needs to be at 100% for this one
Kevin Brewer
@appleJax
Nov 08 2015 06:34
You da man! I wish I would have asked for help sooner, lol.
DJ
@qualitymanifest
Nov 08 2015 06:35
@appleJax no problem, yeah this is another one that a lot of people get stuck on. it's kind of a bug, they're working on a solution
i don't think there are any other ones you will have this problem with
Kevin Brewer
@appleJax
Nov 08 2015 06:37
Ok, awesome. Thanks for the quick response!
CamperBot
@camperbot
Nov 08 2015 06:37
if you want to thank someone, put an @ before their name!
Kevin Brewer
@appleJax
Nov 08 2015 06:39
thanks @qualitymanifest
CamperBot
@camperbot
Nov 08 2015 06:39
applejax sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 342 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Bryan Hatton
@bryan-hatton
Nov 08 2015 07:11
Is there a more concise way to write this CSS? How about with preprocessors?
.wrapper {
     color: white;
}
.wrapper.big {
     font-size: 300%;
}
.wrapper.small {
     font-size: 50%;
}
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 07:13

I'm confused about what exactly the Exact Change Bonfire is asking me to do. The instructions say:

"needs to return an array of the change in the form of an array"

Am I supposed to return the original array....but updated to reflect the money taken out to pay the change? That's what I think. However, I just want to be sure.

Tamer
@tamer4cross
Nov 08 2015 07:16
Hi,
Anybody know how to show the embeded text editor of freecidecamp in firefox
the page show only the right and left panes with no text editor
MirkaG
@MirkaG
Nov 08 2015 07:19

var Car = function() {
this.wheels = 4;
};

// Only change code below this line.
var myCar = new Car();

// Only change code above this line.
(function() {return JSON.stringify(myCar);})();

I need to make an engine property with a number
Bryan Hatton
@bryan-hatton
Nov 08 2015 07:19
explain format
CamperBot
@camperbot
Nov 08 2015 07:19

: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

Bryan Hatton
@bryan-hatton
Nov 08 2015 07:20
@MirkaG Use backticks to get black background and syntax highlighting around your code
MirkaG
@MirkaG
Nov 08 2015 07:21
var Car = function() {
   this.wheels = 4;
};

// Only change code below this line.
var myCar = new Car();



// Only change code above this line.
(function() {return JSON.stringify(myCar);})();
The property engines of myCar should be a number.
Frank Tamre
@tamzi
Nov 08 2015 07:22
@tamzi
Hi guys
Do not now whethere this is the appropriate place to post an error on this page: http://www.freecodecamp.com/challenges/waypoint-learn-how-free-code-camp-works
when i get t the end, it says finish challenge, but the button is not clickable.
MirkaG
@MirkaG
Nov 08 2015 07:23
Can anyone help me?
Bryan Hatton
@bryan-hatton
Nov 08 2015 07:23
@MirkaG Add the property with dotted lookup eg
myCar.warrantyLength = 5;
MirkaG
@MirkaG
Nov 08 2015 07:24
@bryan-hatton Thank you!
CamperBot
@camperbot
Nov 08 2015 07:24
mirkag sends brownie points to @bryan-hatton :sparkles: :thumbsup: :sparkles:
:star: 208 | @bryan-hatton | http://www.freecodecamp.com/bryan-hatton
MirkaG
@MirkaG
Nov 08 2015 07:36
var oldArray = [1,2,3,4,5];

// Only change code below this line.


var newArray = oldArray;

var addThree= oldArray.map(function(val){

  return val + 3;

});

// Only change code above this line.

(function() {return newArray;})();
I need to add 3 to every value in the variable array using the map function. I''m doing something wrong. CAn anyone figure it out?
Markus Kiili
@Masd925
Nov 08 2015 07:41
@MirkaG I think you should just edit the first line as: var newArray = oldArray.map...
MirkaG
@MirkaG
Nov 08 2015 07:42
@Masd925 It comes up as an error if I do that
Markus Kiili
@Masd925
Nov 08 2015 07:44
@MirkaG Could you post your whole code. And the name of the exercise.
MirkaG
@MirkaG
Nov 08 2015 07:44
@Masd925 That is the whole code
Waypoint: Iterate over Arrays with map
var oldArray = [1,2,3,4,5];

// Only change code below this line.


var newArray = oldArray;



// Only change code above this line.

(function() {return newArray;})();
This is the code when I reset the exercise
Markus Kiili
@Masd925
Nov 08 2015 07:46
@MirkaG then add the map function to the oldArray.
MirkaG
@MirkaG
Nov 08 2015 07:47

as in

var oldArray = map function code

?

Markus Kiili
@Masd925
Nov 08 2015 07:48
@MirkaG just like you did originally but without the extra variable addthree. Just edit the one line var newArray = oldArray.map(function...
MirkaG
@MirkaG
Nov 08 2015 07:50
@Masd925 Doesn't seem to be working :'(
Markus Kiili
@Masd925
Nov 08 2015 07:50
@ I mean you solved it correctly originally but just stored it in wrong variable.
MirkaG
@MirkaG
Nov 08 2015 07:51
@Masd925 Never mind, I misunderstood what you meant. Totally worked. Thanks so much for the help!
CamperBot
@camperbot
Nov 08 2015 07:51
mirkag sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 266 | @masd925 | http://www.freecodecamp.com/masd925
Markus Kiili
@Masd925
Nov 08 2015 07:52
@MirkaG You're wellcome.
vamus7
@vamus7
Nov 08 2015 07:58
hi, how to assign class to div element?
<div class="gray-background"> this is not working
Markus Kiili
@Masd925
Nov 08 2015 07:58
This message was deleted
vamus7
@vamus7
Nov 08 2015 07:59
ok thanks
CamperBot
@camperbot
Nov 08 2015 07:59
if you want to thank someone, put an @ before their name!
vamus7
@vamus7
Nov 08 2015 08:00
but another think
thing
i need to have a grey background
Markus Kiili
@Masd925
Nov 08 2015 08:02
@vamus7 Do you have a style element and inside it : .gray-background {css rule here;}
vamus7
@vamus7
Nov 08 2015 08:02
@Masd925 .grey-background {
background-color: grey;
} ?
Markus Kiili
@Masd925
Nov 08 2015 08:03
@vamus7 use gray :)
vamus7
@vamus7
Nov 08 2015 08:04
@Masd925 ouuu thanks a lot :D
CamperBot
@camperbot
Nov 08 2015 08:04
vamus7 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 267 | @masd925 | http://www.freecodecamp.com/masd925
Mary Chew
@marychew97
Nov 08 2015 08:55
This message was deleted
Adole Samuel
@int-elligentSam
Nov 08 2015 08:57
String s = "hello "; s = s.concat("campers");
Avrozavr
@Avrozavr
Nov 08 2015 08:58
@samconnor ?
Adole Samuel
@int-elligentSam
Nov 08 2015 09:02
@Avrozavr am trying to put that in a preformated form here but I can't
Avrozavr
@Avrozavr
Nov 08 2015 09:03
@samconnor use "```"
h4r1m4u
@h4r1m4u
Nov 08 2015 09:04
wiki format
CamperBot
@camperbot
Nov 08 2015 09:04

: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

h4r1m4u
@h4r1m4u
Nov 08 2015 09:04
:point_up:
Randy Goldsmith
@Dueldrawer8
Nov 08 2015 09:04
anyone familar with gitbash?
Adole Samuel
@int-elligentSam
Nov 08 2015 09:08
@Avrozavr thanks
CamperBot
@camperbot
Nov 08 2015 09:08
:star: 229 | @avrozavr | http://www.freecodecamp.com/avrozavr
samconnor sends brownie points to @avrozavr :sparkles: :thumbsup: :sparkles:
Adole Samuel
@int-elligentSam
Nov 08 2015 09:11
'''#include <iostream>
CamperBot
@camperbot
Nov 08 2015 09:11
:bulb: to format code use backticks! ``` more info
Adole Samuel
@int-elligentSam
Nov 08 2015 09:11
'''
CamperBot
@camperbot
Nov 08 2015 09:11
:bulb: to format code use backticks! ``` more info
Adole Samuel
@int-elligentSam
Nov 08 2015 09:12
'''
CamperBot
@camperbot
Nov 08 2015 09:12
:bulb: to format code use backticks! ``` more info
Adole Samuel
@int-elligentSam
Nov 08 2015 09:12
OK OK @camperbot

<!DOCTYPE HTML>

What's happening to me.... :-(
Adole Samuel
@int-elligentSam
Nov 08 2015 09:18

<!DOCTYPE HTML>```
Clemson
@iSchematic
Nov 08 2015 09:31
Hello All.
h4r1m4u
@h4r1m4u
Nov 08 2015 09:33
@iSchematic hi!
Adole Samuel
@int-elligentSam
Nov 08 2015 09:34
@camperbot I tried it but this is what I get hello
Avrozavr
@Avrozavr
Nov 08 2015 09:34
@samconnor what do you want to do?
Clemson
@iSchematic
Nov 08 2015 09:45
Hello, Can I post the code I'm trying to work on here?
I'm on Waypoint: Set the Font Family of an Element. And wanted to know where I would put the h2 {font-family: Sans-serif;}
Avrozavr
@Avrozavr
Nov 08 2015 09:47
@iSchematic sure
@iSchematic I'll help
h4r1m4u
@h4r1m4u
Nov 08 2015 09:51
@iSchematic in between <style> and </style> tags
Avrozavr
@Avrozavr
Nov 08 2015 09:51
yep

@iSchematic ```

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

p {
font-size: 16px;

}
h2 {
font-family: Sans-serif;
}
</style>
```

Clemson
@iSchematic
Nov 08 2015 09:51
@h4r1m4u Anywhere in between them?
Is there particular order?
Avrozavr
@Avrozavr
Nov 08 2015 09:52
no
Clemson
@iSchematic
Nov 08 2015 09:52
Ok thanks
CamperBot
@camperbot
Nov 08 2015 09:52
if you want to thank someone, put an @ before their name!
Clemson
@iSchematic
Nov 08 2015 09:53
@Avrozavr @h4r1m4u Thanks
CamperBot
@camperbot
Nov 08 2015 09:53
ischematic sends brownie points to @avrozavr and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 575 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
:star: 230 | @avrozavr | http://www.freecodecamp.com/avrozavr
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 09:58
I'm looking at the solution to the Bonfire Exact Change and I'm confused about this:
var totalCash = +cid.map(function(money) {
    // Gets 1D array of values
    return money[1];
  }).reduce(function(cash1, cash2) {
    // Reduces the values to one number
    return cash1 + cash2;

    // Rounds to two decimal places
  }).toFixed(2);
what is +cid mean?
What does that .map do exactly?
Gleb
@GlebShaucou
Nov 08 2015 10:04
Hello World!)
CamperBot
@camperbot
Nov 08 2015 10:04

welcome to FreeCodeCamp @HlebShautsou!

Clemson
@iSchematic
Nov 08 2015 10:07
I have a Question. When putting in the {} does he ending } have to be on another line or can it be on the same line? Is it a style? or a good practice to get into? Hope you under stood this.
Adole Samuel
@int-elligentSam
Nov 08 2015 10:07
Hello @HlebShautsou
Clemson
@iSchematic
Nov 08 2015 10:07
@HlebShautsou Hows it going? And Hello.
h4r1m4u
@h4r1m4u
Nov 08 2015 10:12

@iSchematic you mean when creating CSS rules? it can be on the same line, e.g.:

.some-class {color: white; font-size: 20xp;}

however, for the sake of code legibility and easy maintenance, it's a common practice to style your CSS like so:

.some-class {
   color: white;
   font-seize: 20px;
}
Mach
@vijesh-s
Nov 08 2015 10:12
Hi @iSchematic , for the code, it does not matter if the } is in the same line or the next. I like my } to be on an another line for the sake of keeping the code clean.
Welcome @HlebShautsou
Clemson
@iSchematic
Nov 08 2015 10:14
@h4r1m4u @vijesh-s Thanks again. I'm sure I well have more questions. :)
CamperBot
@camperbot
Nov 08 2015 10:14
ischematic sends brownie points to @h4r1m4u and @vijesh-s :sparkles: :thumbsup: :sparkles:
:warning: ischematic already gave h4r1m4u points
:star: 150 | @vijesh-s | http://www.freecodecamp.com/vijesh-s
PeterGabriel2
@PeterGabriel2
Nov 08 2015 10:19
Hi, i am trying to write button element in my page and open a link on click at this element, but it did't work. I am trying to do this at http://codepen.io/ . Any ideas?
 <form>
    <button class="btn btn-block" formaction="http://www.freecodecamp.com/petergabriel2/" type="submit" target="_blank">Free Code Camp</button>
</form>
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 10:22
Does this plus sign in front of cid have a special meaning?
var totalCash = +cid.map(function(money)
Avrozavr
@Avrozavr
Nov 08 2015 10:24
@PeterGabriel2 you missed a space it seems
<form>
    <button class="btn btn-block" form 
action="http://www.freecodecamp.com/petergabriel2/" type="submit" target="_blank">Free Code Camp</button>
</form>
@PeterGabriel2 try this
PeterGabriel2
@PeterGabriel2
Nov 08 2015 10:27
@Avrozavr i think this is not the case. According to this http://www.w3schools.com/tags/att_button_formaction.asp this should not be a problem. But i am not sure if codepen.io block that action somehow.
Clemson
@iSchematic
Nov 08 2015 10:31
Is the <style>.larger-image {width: 500px;}</style> supposed to be its own section in a sense? or do I put .larger-image {width: 500px;} in between the already present <style> </style>?
Avrozavr
@Avrozavr
Nov 08 2015 10:32
@iSchematic in between existing one
PeterGabriel2
@PeterGabriel2
Nov 08 2015 10:35
I have answer for my question ... it's because of codepi.io ... it's blocking that action
Avrozavr
@Avrozavr
Nov 08 2015 10:36
@PeterGabriel2 seems so
Clemson
@iSchematic
Nov 08 2015 10:40
Ok I have tried two different ways and I'm not getting anywhere. Please Tell me if I missed anything.

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

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

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

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

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

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

PeterGabriel2
@PeterGabriel2
Nov 08 2015 10:44
@iSchematic try this
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>

  .smaller-image {
    width: 100px;
  }

  .larger-image {
    width: 500px;
  }

  .red-text {
  color: red;
  } 

  h2 {
  font-family: Lobster, Monospace;
  }

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

</style>
<h2 class="red-text">CatPhotoApp</h2>
<img class="larger-image" src="https://bit.ly/fcc-relaxing-cat">
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Clemson
@iSchematic
Nov 08 2015 10:44
Meant to make it smaller I apologize, I put .smaller-image {width:100px;} in between the <style> & </style> and it wont run right. Could be something so small I just don't see it.
PeterGabriel2
@PeterGabriel2
Nov 08 2015 10:45
it seams in the code you posted before you dont have defined the class on element img
<img class="larger-image" src="https://bit.ly/fcc-relaxing-cat">
Avrozavr
@Avrozavr
Nov 08 2015 10:45
@iSchematic which waypoint is it?
Clemson
@iSchematic
Nov 08 2015 10:46
@Avrozavr Waypoint: Size your Images
Avrozavr
@Avrozavr
Nov 08 2015 10:48
<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 class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
@iSchematic here
Clemson
@iSchematic
Nov 08 2015 10:49
Yes finally Thanks
CamperBot
@camperbot
Nov 08 2015 10:49
if you want to thank someone, put an @ before their name!
Clemson
@iSchematic
Nov 08 2015 10:50
@Avrozavr @PeterGabriel2 Thanks again.
CamperBot
@camperbot
Nov 08 2015 10:50
ischematic sends brownie points to @avrozavr and @petergabriel2 :sparkles: :thumbsup: :sparkles:
:warning: ischematic already gave avrozavr points
:star: 202 | @petergabriel2 | http://www.freecodecamp.com/petergabriel2
Avrozavr
@Avrozavr
Nov 08 2015 10:50
@iSchematic no problem
Zarina
@zarinasaroyan
Nov 08 2015 10:51
Need some help. The way <space> is represented as \s in javascript. How are <.> & <,> represented as?
this is for a palindrome function. where i need to replace . & , with blank characters before testing
Avrozavr
@Avrozavr
Nov 08 2015 10:52
@zarinasaroyan I used regexp
Zarina
@zarinasaroyan
Nov 08 2015 10:53
@Avrozavr whats that
Avrozavr
@Avrozavr
Nov 08 2015 10:53
@zarinasaroyan regular expression
Zarina
@zarinasaroyan
Nov 08 2015 10:53
How to use that
I liked this
Zarina
@zarinasaroyan
Nov 08 2015 11:00
Will need to figure this out. Thanks @Avrozavr
CamperBot
@camperbot
Nov 08 2015 11:00
zarinasaroyan sends brownie points to @avrozavr :sparkles: :thumbsup: :sparkles:
:star: 231 | @avrozavr | http://www.freecodecamp.com/avrozavr
Avrozavr
@Avrozavr
Nov 08 2015 11:00
@zarinasaroyan You're welcome
Clemson
@iSchematic
Nov 08 2015 11:15
I'm back! I am now stuck on the creating a border around an image.
<style>.thick-green-border {border-color: red;border-width: 10px; border-style: solid;}</style>
PeterGabriel2
@PeterGabriel2
Nov 08 2015 11:18
@iSchematic style is writen ok, you have to put it into class for your element like this:
<img class="thick-green-border" ...
@iSchematic and rewrite the color from red to green maybe
Clemson
@iSchematic
Nov 08 2015 11:21
Ok well let you know if I got it.
sagar
@sagarbhaila
Nov 08 2015 11:21
hello
i am stuck on placeholder attribute to "cat photo URL".
kranthi123
@kranthi123
Nov 08 2015 11:23
hello
PeterGabriel2
@PeterGabriel2
Nov 08 2015 11:23
@kranthi123 @sagarbhaila welcome
kranthi123
@kranthi123
Nov 08 2015 11:24
iam stuck in understand boolean values
Mach
@vijesh-s
Nov 08 2015 11:25
welcome guys
Clemson
@iSchematic
Nov 08 2015 11:25
<img class="thick-green-border"{border-color:green; border-width: 10px; border-style: solid; } Now this goes in between the <style> & </style> or next to the <img class="smaller-image"? This is confusing the heck out of me.
PeterGabriel2
@PeterGabriel2
Nov 08 2015 11:27
This message was deleted
@iSchematic (oops) you have to separate style from other html code like this:
<style>
 .thick-green-border {
  border-color:green; border-width: 10px; border-style: solid; }
</style>

<body>
  <img class="smaller-image thick-green-border"  ...>
</body>
@iSchematic keep all style definitions in <style>...</style> section and use just a class name within your html elements.
PeterGabriel2
@PeterGabriel2
Nov 08 2015 11:33
@kranthi123 what exactly you don't understand? If your variable A is Boolean then A can hold one of two possible values, true or false.
And then you can use it to control program.
if (A === true)
   do something;
else
  do something else;
Gulshan Saini
@gulshansainis
Nov 08 2015 12:14
This message was deleted
This message was deleted
This message was deleted
This message was deleted
Danylo
@DanyloSas
Nov 08 2015 13:06
help pls with .length
CamperBot
@camperbot
Nov 08 2015 13:06
no wiki entry for: pls with length
:pencil: click here to create one now!after creating your page type update to reload it here
Aleksander Gębicki
@Takumar
Nov 08 2015 13:07

@DannySmile .length is the property of strings and arrays, it simply contains value which is number of characters in your string (text) or elements in an array.
i.e.

[1, 2, 3].length => 3

In case of arrays you often use length of array to loop through elements of that array:

for (var i = 0; i < arr.length; i++) {
  console.log( arr[i] ); // this will print out single element from an array
}
margrayga
@margrayga
Nov 08 2015 13:10
Hello world
CamperBot
@camperbot
Nov 08 2015 13:10

welcome to FreeCodeCamp @margrayga!

Danylo
@DanyloSas
Nov 08 2015 13:11
@Takumar Thank you! s\
CamperBot
@camperbot
Nov 08 2015 13:11
dannysmile sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 655 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 08 2015 13:11
@DannySmile do you need more? Write what you don't understand.
@margrayga welcome to our community - Happy Coding!
Danylo
@DanyloSas
Nov 08 2015 13:12
@Takumar I have a task - Use the .length property to count the number of characters in the lastName variable. but icannot write this correct
Aleksander Gębicki
@Takumar
Nov 08 2015 13:14
@DannySmile just add .length to the name of your string ("lastName") in your case and assign this to a new variable which will save number of characters for you for later.
It is very simple: var strLength = "abc".length;
You create variable which will contain number of characters of given string.
If it don't work, maybe you write it in wrong place and exercise cannot be checked by FCC.
PeterGabriel2
@PeterGabriel2
Nov 08 2015 13:16
This message was deleted
CamperBot
@camperbot
Nov 08 2015 13:16

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Aleksander Gębicki
@Takumar
Nov 08 2015 13:16
@PeterGabriel2 You don't sink, don't you? :-)
Danylo
@DanyloSas
Nov 08 2015 13:16
@Takumar thank you Takumar I understood
CamperBot
@camperbot
Nov 08 2015 13:16
dannysmile sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: dannysmile already gave takumar points
PeterGabriel2
@PeterGabriel2
Nov 08 2015 13:17
This message was deleted
CamperBot
@camperbot
Nov 08 2015 13:17
petergabriel2 sends brownie points to @dannysmile :sparkles: :thumbsup: :sparkles:
:star: 131 | @dannysmile | http://www.freecodecamp.com/dannysmile
PeterGabriel2
@PeterGabriel2
Nov 08 2015 13:19
@Takumar no, i just search for bot commands :) and made some typo
Aleksander Gębicki
@Takumar
Nov 08 2015 13:20
That's good. :ship:
Ray Nobles
@ds863
Nov 08 2015 13:23
on waypoint 8 in object oriented javascript and functional js there is a bunch of text missing from the waypoint explanation and the code example is missing as well
so im not sure what to do
kinda stuck
Aleksander Gębicki
@Takumar
Nov 08 2015 13:26

@ds863 maybe something is wrong with your browse. If you talk about "Waypoint: Sort Arrays with sort" I see a description and an example code:

Here is an example of using sort with a compare function that will sort the elements from smallest to largest number:

var array = [1, 12, 21, 2];

array.sort(function(a, b) {

  return a - b;

});

Use sort to sort array from largest to smallest.

jpjenkins
@jpjenkins
Nov 08 2015 13:27
Hey folks, I was introduced to ternary operators earlier and now a whole new world of possibilities have been opened. I have a question, just to better understand and gather examples from this fcc course, is it possible to solve this with a ternary operator?
function mutation(arr) {
  firstWord = arr[0].toLowerCase().split('');
  secondWord = arr[1].toLowerCase().split('');

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

    if(firstWord.indexOf(secondWord[i]) === -1){
      return false;
    }

  } // close loop

  return true;
}

mutation(["hello", "hey"]);
Bonfire mutations
CamperBot
@camperbot
Nov 08 2015 13:27

:fire:Bonfire: Mutations :link:

function mutation(arr) {
  return arr;
}

mutation(['hello', 'hey']);

Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.

more info:  bf details | bf links | hint

Ray Nobles
@ds863
Nov 08 2015 13:27
ty takumar
Abhishek Das
@abhishek1012
Nov 08 2015 13:36
hey guys.. I need some help
I'm stuck at waypoint 21 HTML and CSS
I think I've written it correctly but unable to pass that level
<a href="http://freecatphotoapp.com">cat photos</a>
this is what I wrote
jpjenkins
@jpjenkins
Nov 08 2015 13:39
Is the line 'cat photos' exactly the same as displayed at the side? @abhishek1012
Serhii Borovskyi
@serhiicss
Nov 08 2015 13:40
@abhishek1012 Can we please see the entire code?
jpjenkins
@jpjenkins
Nov 08 2015 13:40
if there are capitals that you've not included it will fail
Abhishek Das
@abhishek1012
Nov 08 2015 13:41
I removed the space between cat and photos and then added it back again and somehow it started working. thanks @jpjenkins thanks @serhiicss
CamperBot
@camperbot
Nov 08 2015 13:41
abhishek1012 sends brownie points to @jpjenkins and @serhiicss :sparkles: :thumbsup: :sparkles:
:star: 431 | @serhiicss | http://www.freecodecamp.com/serhiicss
:star: 216 | @jpjenkins | http://www.freecodecamp.com/jpjenkins
jpjenkins
@jpjenkins
Nov 08 2015 13:42
:) if you copied and pasted it from the side, sometimes there are invisible characters included that cause the code to fail
Abhishek Das
@abhishek1012
Nov 08 2015 13:42
i will remember that in the future.
copy and paste is never good :P
Serhii Borovskyi
@serhiicss
Nov 08 2015 13:43
Yeah, cats don't like it
Dogs are ok with that, but not cats :)
Abhishek Das
@abhishek1012
Nov 08 2015 13:43
you're funny :D
Alexandru
@anutaalexandru
Nov 08 2015 13:46
hello
Serhii Borovskyi
@serhiicss
Nov 08 2015 13:47
@anutaalexandru Hello!
Justine
@justine06
Nov 08 2015 14:22

guys please help!!!

You should have multiplied the result of Math.random by 10 to make it a number that is between zero and nine.

PeterGabriel2
@PeterGabriel2
Nov 08 2015 14:32
@justine06 is just a how javascript works. Math.random() gives you real number , but you need integer, so trick is to multiply it with 10 to get the range 1-9 and then round it
Math.floor(Math.random() * 10);
Justine
@justine06
Nov 08 2015 14:34
@PeterGabriel2 tnx a lot... :)
CamperBot
@camperbot
Nov 08 2015 14:34
justine06 sends brownie points to @petergabriel2 :sparkles: :thumbsup: :sparkles:
:star: 204 | @petergabriel2 | http://www.freecodecamp.com/petergabriel2
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:05
Is there a bonfire help chat?
jpjenkins
@jpjenkins
Nov 08 2015 15:06
!hint
CamperBot
@camperbot
Nov 08 2015 15:06
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
jpjenkins
@jpjenkins
Nov 08 2015 15:06
@TheHighPriestess :point_up:
I think that might be it
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:07
it looks like it's just hints
I have four more bonfires left...and they're getting pretty tough.
jpjenkins
@jpjenkins
Nov 08 2015 15:07
stack exchange is always a good shout too
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:08
yeah...I do Google a lot and then I'm directed there
jpjenkins
@jpjenkins
Nov 08 2015 15:09
FreeCodeCamp/HelpBonfires
CamperBot
@camperbot
Nov 08 2015 15:09
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
jpjenkins
@jpjenkins
Nov 08 2015 15:09
gitter room
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:09
I'm trying to figure out what this means....from Exact Change bonfire:
var totalCash = +cid.map(function(money) {
    // Gets 1D array of values
    return money[1];
  }).reduce(function(cash1, cash2) {
    // Reduces the values to one number
    return cash1 + cash2;
Is that just the total amount of cash in the drawer?
jpjenkins
@jpjenkins
Nov 08 2015 15:10
the plus sign?
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:10
well..the whole thing
I wrote a function myself that gets the total amount of cash in the drawer and i'm trying to find out if this does as well.
the plus sign....i found..converts a variable to a number
however, i don't understand how it's being used here
because....my function uses a simple for loop
jpjenkins
@jpjenkins
Nov 08 2015 15:13
If you post that on stackexchange you'll get an answer no doubt
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:13
You know...i have posted stuff over there and nobody ever responded
jpjenkins
@jpjenkins
Nov 08 2015 15:13
or reddit.com/r/javascript is good too
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:13
i have never tried reddit
jpjenkins
@jpjenkins
Nov 08 2015 15:13
ah, time to jump into the rabbit hole :P
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:13
lol
jpjenkins
@jpjenkins
Nov 08 2015 15:15
you can also use irc
irc.freenode.net ##javascript
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:16
i've never tried that either
jonkoW
@jonkoW
Nov 08 2015 15:16
I'm stuck on some kitty code.
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:16
I've found this forum very helpful. Sunday's are always slow
jpjenkins
@jpjenkins
Nov 08 2015 15:16
you're missing out :)
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:17
kitty code?
jpjenkins
@jpjenkins
Nov 08 2015 15:17
yeah this is a good place, really nice for beginners
is that your pet name for javascript @jonkoW
jonkoW
@jonkoW
Nov 08 2015 15:19
code camp font size, css
jpjenkins
@jpjenkins
Nov 08 2015 15:19
what's the problem mate?
@TheHighPriestess did you have a look at 'HelpBonfires'?
CamperBot
@camperbot
Nov 08 2015 15:20
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
jonkoW
@jonkoW
Nov 08 2015 15:20
Can't get past a waypoint for font size
jpjenkins
@jpjenkins
Nov 08 2015 15:20
just had a browse, looks like they might be able to help
the users are fairly active there just now
@jonkoW let's see your code and tell me what the difficulty is
jonkoW
@jonkoW
Nov 08 2015 15:22

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

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

<p class="red-text" class="font-size"> 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" class="font-size"> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:22
@jpjenkins Yes...I do look at that
jpjenkins
@jpjenkins
Nov 08 2015 15:22
filter code
what's the command for bot to show the code display help again?
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:23
you don't need a class for font-size
oh well..maybe that's the way the waypoint is set up
which waypoint is this?
jpjenkins
@jpjenkins
Nov 08 2015 15:23
If I remember right, the assignment is to have all <p> elements a certain font size
am I right @jonkoW ?
jonkoW
@jonkoW
Nov 08 2015 15:23
Yes, that's right
jpjenkins
@jpjenkins
Nov 08 2015 15:24
which means you previously had to alter the <h2> element
within the style brackets
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:24
you don't need to add "class" twice
class="red-text font-size"
jpjenkins
@jpjenkins
Nov 08 2015 15:24
ah there it is
I though it was creating a rules for p with font-size
jonkoW
@jonkoW
Nov 08 2015 15:25
I see, without the quotation marks.
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:25
it should work if you move font-size into the first class
yeah..try that
you only need class= once
and then the various classes applied to that element are in it..with spaces between them
Taro
@TaroWong
Nov 08 2015 15:27
Hey guys
jpjenkins
@jpjenkins
Nov 08 2015 15:27
out of curiosity @TheHighPriestess what bonfire are you on?
hiya
Taro
@TaroWong
Nov 08 2015 15:28
I am stuck at Waypoint: Iterate Odd Numbers With a For Loop.
jpjenkins
@jpjenkins
Nov 08 2015 15:28
Waypoint: Iterate Odd Numbers With a For Loop
Taro
@TaroWong
Nov 08 2015 15:28
Opps
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:28
@jpjenkins Exact Change
Taro
@TaroWong
Nov 08 2015 15:29
I am sorry
I found the error.
jpjenkins
@jpjenkins
Nov 08 2015 15:29
:)
Taro
@TaroWong
Nov 08 2015 15:29
What are you guys working on?
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:29
I'm getting bored with the bonfires. I only have 4 left..and I'm thinking of leaving them until later
jpjenkins
@jpjenkins
Nov 08 2015 15:30
ah, you really are at the end
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:30
plus...they're getting really hard LOL
jpjenkins
@jpjenkins
Nov 08 2015 15:30
There's no triumph without a trial! :P
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:30
I never looked a solution to a bonfire..until today
jpjenkins
@jpjenkins
Nov 08 2015 15:31
I'd reach out to the communities I listed above, there's good support there
Kevin Dessely
@kevindessely
Nov 08 2015 15:32
hi @jpjenkins !
jpjenkins
@jpjenkins
Nov 08 2015 15:33
hi ouphana :)
having a good day?
Kevin Dessely
@kevindessely
Nov 08 2015 15:33
not really. been wasting my time on games(csgo) instead of doing codecamp
How's urs progress?
Elizabeth Hatleli
@TheHighPriestess
Nov 08 2015 15:33
@jonkoW Did that work?
jpjenkins
@jpjenkins
Nov 08 2015 15:34
finished basic basecamps, and now creating a portfolio
obviously procrastinating by helping too :P there are worse things...
basic 'algorithms!
woop
Kevin Dessely
@kevindessely
Nov 08 2015 15:36
nice! u are far ahead of me now.
Taro
@TaroWong
Nov 08 2015 15:37
How long have you been on FCC?
Kevin Dessely
@kevindessely
Nov 08 2015 15:37
Well, I will be catching up soon.
jpjenkins
@jpjenkins
Nov 08 2015 15:37
Not without some blood sweat n tears hehe
It's been about a week now @TaroWong
yeah, last sunday
Kevin Dessely
@kevindessely
Nov 08 2015 15:39
Haha.
anthonygallina1
@anthonygallina1
Nov 08 2015 15:42
Hello I am having trouble with Waypoint: Save your Code Revisions Forever with Git
jpjenkins
@jpjenkins
Nov 08 2015 15:43
sorry, a little further than me...
Robert Uivarosi
@URobert
Nov 08 2015 15:43
can I countdown from the above format (obj) in js, am I on the right path to create this pomodoro timer
?
anthonygallina1
@anthonygallina1
Nov 08 2015 15:47
jpjenkins
@jpjenkins
Nov 08 2015 15:54
congratulations ;)
Ademola Adegbuyi
@ooade
Nov 08 2015 15:54
@anthonygallina1 congrats ! Completed!
Kevin Dessely
@kevindessely
Nov 08 2015 15:59
Grats!
Yulia
@gorelikova1993
Nov 08 2015 16:04
Hello there!
could someone explain me a task? english is not my native language
PeterGabriel2
@PeterGabriel2
Nov 08 2015 16:05
@gorelikova1993 and what language is?
@PeterGabriel2 aaa., i see, russia
Yulia
@gorelikova1993
Nov 08 2015 16:05
I mean someone probably could explain better
Elise
@EliseCeri
Nov 08 2015 16:06
okay so i'm new to this, so don't judge but how do you add a class called smaller-image to this code:
<img src="https://bit.ly/fcc-relaxing-cat">
Kevin Dessely
@kevindessely
Nov 08 2015 16:08
@EliseCeri each html tag is allowed to have attributes
e.g your image tag right now is having a src attribute
so to add a class attribute just do the same thing
class="smaller-image"
the result would be
<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
it doesnt matter whether the class comes first or last.
Elise
@EliseCeri
Nov 08 2015 16:09
@ouphana AHHH thank you, i didn't know where to put it
CamperBot
@camperbot
Nov 08 2015 16:09
eliseceri sends brownie points to @ouphana :sparkles: :thumbsup: :sparkles:
:star: 116 | @ouphana | http://www.freecodecamp.com/ouphana
Hans van Riet
@hansinla
Nov 08 2015 16:11
@gorelikova1993 What do you need help with?
Yulia
@gorelikova1993
Nov 08 2015 16:11
I can not understand what's task exactly want :D
Hans van Riet
@hansinla
Nov 08 2015 16:11
Wich waypoint are you on? @gorelikova1993
Yulia
@gorelikova1993
Nov 08 2015 16:12
@hansinla Bonfire: Truncate a string
Hans van Riet
@hansinla
Nov 08 2015 16:14
@gorelikova1993 You need to mae a string that doesn’t exceed the length specified in the second parameter. If that means that you have to cut the strung, you’ll have to add three eclipses and remember that these three characters count in determining the length.
Yulia
@gorelikova1993
Nov 08 2015 16:15
I got it
but there is something I can not get
like
truncate("A-", 1) should return "A...".
it makes me confused!
@hansinla
I thought if string < 3 or syting < num it should return just string
Hans van Riet
@hansinla
Nov 08 2015 16:18
@gorelikova1993 Remember it says: If the length of the string is less than or equal to 3 characters, then the length of the three dots is not added to the string length.
Yulia
@gorelikova1993
Nov 08 2015 16:19
@hansinla I do not get
it
Ademola Adegbuyi
@ooade
Nov 08 2015 16:20
@gorelikova1993 if string.length <=3 return string; else truncate string
Hans van Riet
@hansinla
Nov 08 2015 16:20
@gorelikova1993 In your example the length is supposed to be 1.
truncate("A-", 1) So a string length of 1 would be A and you add the three because the length is smaller than 3 and in that cases the do not count.
Yulia
@gorelikova1993
Nov 08 2015 16:22
:(
I am stupid
function truncate(str, num) {
  if (str.length <= num || str.length <= 3) {
    return str;
  }
  else {
   return str.slice(0, num -3).concat("...");
  }


}
Ademola Adegbuyi
@ooade
Nov 08 2015 16:24
No, you're not. Dont say that again @gorelikova1993
Hans van Riet
@hansinla
Nov 08 2015 16:24
@gorelikova1993 Almost there. remember, truncate("A-", 1) must return A… so your first if statement is not entirely correct.
Yulia
@gorelikova1993
Nov 08 2015 16:25
I have no idea
Hans van Riet
@hansinla
Nov 08 2015 16:27
@gorelikova1993 Lose the second part of your if statement || str.length <= 3 and make another if statement that tests for if (num <= 3) and think how you would handle that.
chermandu
@chermandu
Nov 08 2015 16:27
Hello everyone :smile:
Ademola Adegbuyi
@ooade
Nov 08 2015 16:28
Hello @chermandu
Hans van Riet
@hansinla
Nov 08 2015 16:28
@chermandu hi!
chermandu
@chermandu
Nov 08 2015 16:28
I'm stuck where I was yesterday on centering a div. center-block and text-center doesn't work. Can someone help me out?
Yulia
@gorelikova1993
Nov 08 2015 16:29
ah,I got it
thank you @hansinla
CamperBot
@camperbot
Nov 08 2015 16:29
gorelikova1993 sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 573 | @hansinla | http://www.freecodecamp.com/hansinla
Hans van Riet
@hansinla
Nov 08 2015 16:29
@chermandu Yes, show your code
chermandu
@chermandu
Nov 08 2015 16:29
@hansinla hey man. here it is
typicaljoe111
@typicaljoe111
Nov 08 2015 16:30
At "Waypoint: Nest an Anchor Element within a Paragraph" I have added <p>View more <a href="http://freecodecamp.com">cat photos</a></p> but it doesn't work. Help?
chermandu
@chermandu
Nov 08 2015 16:30
They look stacked on a small window which is fine. But on a full screen they are on the left side
Himad Mouhtar
@hmouhtar
Nov 08 2015 16:31
Hi!! i can't understand this code line, can someone explain me? : $($(".slot")[0]).html(slotOne);
typicaljoe111
@typicaljoe111
Nov 08 2015 16:33
@hmouhtar I think... HTML of first element with class "slot" is replaced with value held by "slotOne" variable.
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:34
hey guys. I'm having some trouble with background color to a div element
Hans van Riet
@hansinla
Nov 08 2015 16:34
@chermandu Not sure what you’re trying to accomplish
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:34
here's my code

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

.smaller-image {
width: 100px;
}

.grey-background {
background-color: grey;
}
</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="grey-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">
<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>

Ademola Adegbuyi
@ooade
Nov 08 2015 16:35
@gavinwadetyler what div element is that?
chermandu
@chermandu
Nov 08 2015 16:36
@hansinla can you open the link on a new tab? maybe its just me but all of the elements are on the left side of the page. I want to center them.
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:36
ok
do i just copy the link from my browser?
ps. sorry i'm kinda a noob
tva10
@tva10
Nov 08 2015 16:37
@gavinwadetyler hey
so
grey should be grAy
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:37
oh really
Angelo C. IGITEGO
@AngeloRwanda
Nov 08 2015 16:38
@tva10 I doubt
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:38
????
Angelo C. IGITEGO
@AngeloRwanda
Nov 08 2015 16:38
@gavinwadetyler Please check if you need the dot before the selector you used.
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:39
nope still a problem
her's the criteria
  1. give your div element the class grey-background
Ademola Adegbuyi
@ooade
Nov 08 2015 16:39
@gavinwadetyler dont bother about the American British issh , Grey color code is #808080. Be making use of that instead
tva10
@tva10
Nov 08 2015 16:40
you should check that you write grAy three times
in class name
in back color
and tag div class='gray...'
Ademola Adegbuyi
@ooade
Nov 08 2015 16:41
.grey-background{background-color:#808080;}
tva10
@tva10
Nov 08 2015 16:42
@gavinwadetyler
.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>
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:42
i did that but i think it may be something with the way I assigned it to the div element
tva10
@tva10
Nov 08 2015 16:42
check this
Hans van Riet
@hansinla
Nov 08 2015 16:42
@chermandu Wrap everything in <div class="container container-fluid”>. It’s a bit hard to trouble shoot since the inmages are broken links for me.
typicaljoe111
@typicaljoe111
Nov 08 2015 16:42
At "Waypoint: Nest an Anchor Element within a Paragraph" I have added <p>View more <a href="http://freecodecamp.com">cat photos</a></p> but it doesn't work. Help?
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:44
@tva10 i already have that
chermandu
@chermandu
Nov 08 2015 16:45
@hansinla I already did and it doesn't changed a thing. Shouldn't broken images irrelevant on the alignment of an element? I just want to center them all :D
tva10
@tva10
Nov 08 2015 16:45
@gavinwadetyler good :)
gavinwadetyler
@gavinwadetyler
Nov 08 2015 16:46
@tva10 its showing up grey but the website says NO
tva10
@tva10
Nov 08 2015 16:47
@gavinwadetyler really?
what errors does it says?
h4r1m4u
@h4r1m4u
Nov 08 2015 16:47
@chermandu are you looking to center the entire columns or just whatever is within them?
chermandu
@chermandu
Nov 08 2015 16:47
@h4r1m4u the entire collumns
Hans van Riet
@hansinla
Nov 08 2015 16:48
@chermandu Ok start adding Jquery and bootstrap in the correct place in Pen Settings
chermandu
@chermandu
Nov 08 2015 16:48
I nested them inside a single div, so I was asking "how do I center a div?"
h4r1m4u
@h4r1m4u
Nov 08 2015 16:48
@chermandu add offset to your first col-md-2 (and only to the first one):
<div class="col-md-2 col-md-offset-3">....</div>
tva10
@tva10
Nov 08 2015 16:49
@typicaljoe111 Do you pass that task?
chermandu
@chermandu
Nov 08 2015 16:50
@h4r1m4u wow that worked! care to explain what happened?
typicaljoe111
@typicaljoe111
Nov 08 2015 16:50
@tva10 Yes, I just passed it. I was creating new <p> tag instead of editing the existing one. It is clear now.
h4r1m4u
@h4r1m4u
Nov 08 2015 16:51
@chermandu the col-x-x bootstrap classes are floated. the offset creates a 'faux' column and pushes the other columsn away from the left edge of the screen
tva10
@tva10
Nov 08 2015 16:51
@typicaljoe111 looks good )
h4r1m4u
@h4r1m4u
Nov 08 2015 16:51
@chermandu check the bootstrap documentation regarding offsetting: http://getbootstrap.com/css/#grid-offsetting
Ademola Adegbuyi
@ooade
Nov 08 2015 16:51
@chermandu the total number of grids is 6, meant to be 12
chermandu
@chermandu
Nov 08 2015 16:52
@h4r1m4u does this mean that I shouldn't have nested the three collumns on a <div>? And just add offset on the first collumn since it's the one nearest to the left?
Ademola Adegbuyi
@ooade
Nov 08 2015 16:53
like <div class="col-mid-4"></div><div class="col-mid-4"></div><div class="col-mid-4"></div>,<div class="col-mid-5"></div><div class="col-mid-2"></div><div class="col-mid-5"></div>
h4r1m4u
@h4r1m4u
Nov 08 2015 16:53
@chermandu the divs with col-x-x classes should be a direct child of a <div class="row"></div>
that's how bootstrap does it
container -> row -> cols
if the cols are nested inside a row, all the padding and other alignment will be fine
if you nest them in some other div, it may be off
Ademola Adegbuyi
@ooade
Nov 08 2015 16:55
@chermandu make sure it adds up to 12.
h4r1m4u
@h4r1m4u
Nov 08 2015 16:55
@marhyorh it's not entirely necessary. he may not want to have columns across the entire screen
Hans van Riet
@hansinla
Nov 08 2015 16:56
@chermandu Your columns need to add up to 12
http://codepen.io/anon/pen/bVmLMm?editors=100
chermandu
@chermandu
Nov 08 2015 16:56
@h4r1m4u So I removed the <div class="row"> where the three colummns are nested, and nothing changed
h4r1m4u
@h4r1m4u
Nov 08 2015 16:56
@chermandu can you post the link to your codepen again? i already closed it
chermandu
@chermandu
Nov 08 2015 16:57
@h4r1m4u I updated the pics for clarity
h4r1m4u
@h4r1m4u
Nov 08 2015 16:57
@chermandu ok. so what's the issue that you're trying to solve now?
Hans van Riet
@hansinla
Nov 08 2015 16:58
@chermandu That’s centered for me
h4r1m4u
@h4r1m4u
Nov 08 2015 16:58
@hansinla yes, it is now. he offsetted the first col
chermandu
@chermandu
Nov 08 2015 16:59
I'm just trying to clarify if it is necessary to add a class="row" or adding an offset on the first col is enough
Hans van Riet
@hansinla
Nov 08 2015 16:59
@h4r1m4u Yes, 12 columns in a row
h4r1m4u
@h4r1m4u
Nov 08 2015 16:59
@chermandu ah, i see. yes, you should keep 'cols' in a 'row'. it's better
Ademola Adegbuyi
@ooade
Nov 08 2015 17:00
@h4r1m4u yeah buh you know he could just set the remaining 6 to the left and right side
h4r1m4u
@h4r1m4u
Nov 08 2015 17:00
@marhyorh why create additional <div>s when it's not necessary? keep your HTML clean
it would have worked, you're right, but there's no need to have empty divs in your code
Hans van Riet
@hansinla
Nov 08 2015 17:01
@marhyorh correct
chermandu
@chermandu
Nov 08 2015 17:02
@h4r1m4u gotya. I'll bring back the row now :D
@h4r1m4u @marhyorh @hansinla THANKS A LOT guys!
CamperBot
@camperbot
Nov 08 2015 17:02
chermandu sends brownie points to @h4r1m4u and @marhyorh and @hansinla :sparkles: :thumbsup: :sparkles:
:star: 574 | @hansinla | http://www.freecodecamp.com/hansinla
:star: 319 | @marhyorh | http://www.freecodecamp.com/marhyorh
:star: 576 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 08 2015 17:02
@chermandu from what i see, you already have it there. the #picture-column div has a class row
you don't need to add another one
@chermandu oh, and btw, img-responsive is a class to be used on <img> elements, not <div>s
chermandu
@chermandu
Nov 08 2015 17:03
@h4r1m4u Oh I was talking about my local copy, I removed it to check :D
h4r1m4u
@h4r1m4u
Nov 08 2015 17:03
ah, gotcha
Ademola Adegbuyi
@ooade
Nov 08 2015 17:03
You're welcome @chermandu
M Used
@mildused
Nov 08 2015 17:03
I need help with some Mongoose...
chermandu
@chermandu
Nov 08 2015 17:04
I see. I thought if I add it in divs it'll automatically apply on all elements inside it?
Thanks for the heads up.
CamperBot
@camperbot
Nov 08 2015 17:04
if you want to thank someone, put an @ before their name!
Ademola Adegbuyi
@ooade
Nov 08 2015 17:05
@mildused what help do u nid?
M Used
@mildused
Nov 08 2015 17:07
@marhyorh I sent you message
Ademola Adegbuyi
@ooade
Nov 08 2015 17:08
Okay
Johnathon Sykes
@seesykescode
Nov 08 2015 17:12
Hey, I think i broke the website lol. Im on Bonfire: Factorize and I inadvertently created an infinite loop. I can't reset the page either because when I reload or close Chrome and reopen the exercise, it instantly freezes. Any ideas?
Ademola Adegbuyi
@ooade
Nov 08 2015 17:14
@johndsykes86 End the process
CoreyThomas
@CoreyThomas
Nov 08 2015 17:15
147
h4r1m4u
@h4r1m4u
Nov 08 2015 17:15
@johndsykes86 try to open the page, but use the browser stop button before it starts executing the code. then you can edit the code and remove the infinite loop.
Johnathon Sykes
@seesykescode
Nov 08 2015 17:16
thanks @h4r1m4u that worked out
CamperBot
@camperbot
Nov 08 2015 17:16
johndsykes86 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 577 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 08 2015 17:16
great!
KaurEST
@KaurEST
Nov 08 2015 17:17
Hey!
I don't know if i'm stupid or just too tired but i can't seem to understand a task.
"Give the text input in your form the class form-control."
h4r1m4u
@h4r1m4u
Nov 08 2015 17:18
@KaurEST do you see <input type="text"...> in your form?
you're supposed to give it class form-control
KaurEST
@KaurEST
Nov 08 2015 17:19
Lots
There are 5 of those in my <form> tab
Oh wait... no there arent any of those
I found a solution... I think i need a break of it :D
h4r1m4u
@h4r1m4u
Nov 08 2015 17:21
cool
Nick Snow
@nicholasrsnow
Nov 08 2015 17:51
Im on Waypoint: Learn how Script Tags and Document Ready Work and I cannot get the script to work.... is there something wrong with this? <script $(document).ready(function() { }); >
</script>
There directions are kind of vague...
h4r1m4u
@h4r1m4u
Nov 08 2015 17:54
@nicholasrsnow you don't add the document.ready function inside the opening <script> tag. instead you put it in between them:
<script> 
// it goes here
</script>
just like your CSS goes in between <style> and </style>. same thing
Nick Snow
@nicholasrsnow
Nov 08 2015 17:55
AHHH Thanks! @h4r1m4u
CamperBot
@camperbot
Nov 08 2015 17:55
nicholasrsnow sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 578 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 08 2015 17:56
my pleasure
123manav
@123manav
Nov 08 2015 18:12
hi
rbrtn
@rbrtn
Nov 08 2015 18:14

Greetings to all! I'm new to the Help pages, so please excuse any blunders I may be about to make. I'm having a problem on Waypoint 5 of Object Oriented and Functional Programming. The example in the instructional panel is as follows:

var timesFour = oldArray.map(function(val){

return val * 4;

});

Using that as my model (without understanding where "val" came from), my solution was this:

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

This fails to add 3 to each value in the array, as is required, and none of my experimental alternative solutions have worked. The code pre-written above my code is

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

// Only change code below this line.

var newArray = oldArray;

Although I consider Free Code Camp to be, by far, the best of all the online instructional sites I have used, I agree with commenters who say that this section is insufficiently clear. In this waypoint, for example, the origin of "val" should have been explained.
If anyone can supply the code that will get me through this waypoint, I'm confident I can figure out how it works. I would appreciate any help I can get on this.

Rex Schrader
@SaintPeter
Nov 08 2015 18:17
@rbrtn "Use the map function to add 3 to every value in the variable array."
@rbrtn Which I just realized is wrong. IT's actually newArray you need to modify.
@rbrtn add a .map to oldArray in this line:
var newArray = oldArray;
Joel M. Swensen
@JoelMSwensen
Nov 08 2015 18:40
Hey all can anyone tell me why replaceWith() only replaces the contents of the vid once?
$( document ).ready(function() {
   $("input").click(function(){
   var x = $(this).attr("value"); 
   $("#text").replaceWith(x);
   console.log(x);
  });
});
div, not vid
h4r1m4u
@h4r1m4u
Nov 08 2015 18:42
@JoelMSwensen because it will replace the #text div
so after the function executes once, the #text div will be gone
Joel M. Swensen
@JoelMSwensen
Nov 08 2015 18:42
OH!
h4r1m4u
@h4r1m4u
Nov 08 2015 18:43
if you want to insert the input value into the #text div, use .html() or .text() method instead
Joel M. Swensen
@JoelMSwensen
Nov 08 2015 18:45
@h4r1m4u cool thank you so much :)
CamperBot
@camperbot
Nov 08 2015 18:45
joelmswensen sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 579 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 08 2015 18:45
my pleasure
Floris Warmenhoven
@FlorisWarmenhoven
Nov 08 2015 19:07
I need to add an ' engines' propery witha number value to the 'myCar' instance. I have no idea what they expect me to do...
var Car = function() {
   this.wheels = 4;
};

// Only change code below this line.
var myCar = new Car();





// Only change code above this line.
(function() {return JSON.stringify(myCar);})();
Viktor
@VPererushev
Nov 08 2015 19:08
@FlorisWarmenhoven do the same as in Car above
Rex Schrader
@SaintPeter
Nov 08 2015 19:09
@FlorisWarmenhoven You can set a property of an object like this:
obj.propertyName = "value"
@FlorisWarmenhoven Your object is called myCar
Floris Warmenhoven
@FlorisWarmenhoven
Nov 08 2015 19:10
ahh, gotcha.
So I just type
myCar.engines = 1;
?
Thank you @SaintPeter
CamperBot
@camperbot
Nov 08 2015 19:10
floriswarmenhoven sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1452 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Nov 08 2015 19:11
@FlorisWarmenhoven Got it :D
amaiellu
@amaiellu
Nov 08 2015 19:13
This message was deleted

How does sort use the compare function to sort things? I don't understand why in this example, it will sort an array from smallest to largest: array.sort(function(a, b) {

return a - b;

});

MirkaG
@MirkaG
Nov 08 2015 19:24
Has anyone finished Waypoint: Filter Arrays with filter? I can't figure out what I'm supposed to do
Franco Benner
@FrancoBenner
Nov 08 2015 19:24
how do I add an i element within a button
Add an i element with the classes fa and fa-thumbs-up.
 Nest your i element within your button element.
 Make sure your i element has a closing tag

<i><button class="btn btn-block btn-primary fa fa-thumbs-up">Like</i></button>
Viktor
@VPererushev
Nov 08 2015 19:26
@codeofcolor add <i> tag inside button. Near name "Like"
MirkaG
@MirkaG
Nov 08 2015 19:26
@codeofcolor I think the <i> needs to be after <button>. Which waypoint is it?
Aleksander Gębicki
@Takumar
Nov 08 2015 19:27
@amaiellu normally sort() function compares elements of array alphabetically, so if you want to compare numbers you have to provide "compare function". In your case this function makes subtraction of given arguments so if first is bigger than second it will return positive value and sort() function will reverse the order of these two numbers. Otherwise it will leave current order.
@codeofcolor You have in your instruction: "Nest your i element within your button" so you have to put it inside button like that: <button><i></i></button>
h4r1m4u
@h4r1m4u
Nov 08 2015 19:28
@codeofcolor <button><i class="..."></i> Button text</button>
Franco Benner
@FrancoBenner
Nov 08 2015 19:28
oh
i class
Aleksander Gębicki
@Takumar
Nov 08 2015 19:28
@MirkaG what's your problem?
Franco Benner
@FrancoBenner
Nov 08 2015 19:28
never knnew you could do that
Aleksander Gębicki
@Takumar
Nov 08 2015 19:29
@codeofcolor you can add class to different HTML tags.
Franco Benner
@FrancoBenner
Nov 08 2015 19:29
oh wow
MirkaG
@MirkaG
Nov 08 2015 19:30

@Takumar I need to filter an array

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

// Only change code below this line.

var newArray = oldArray;

// Only change code above this line.

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

This is the code I was given. Below is the code of the example:

```array = array.filter(function(val) {

return val % 2 === 0;

});
```

I need to filter to remove all elements from array that are greater than 5.

Fadimelhem
@Fadimelhem
Nov 08 2015 19:30

how can i solve this: var Car = function() {
this.wheels = 4;
};

// Only change code below this line.
var myCar= new Car();
Add an engines property with a number value to the myCar instance

Franco Benner
@FrancoBenner
Nov 08 2015 19:30
oops
<button class="btn btn-block btn-primary" i class="fa fa-thumbs-up"><i>Like</i></button>
Add an i element with the classes fa and fa-thumbs-up.
not working
Viktor
@VPererushev
Nov 08 2015 19:31
@codeofcolor you need to put <i> tag iutside <button> tag
<button class=""><i class=""></i></button>
Franco Benner
@FrancoBenner
Nov 08 2015 19:31
ah
Ademola Adegbuyi
@ooade
Nov 08 2015 19:32
@Fadimelhem obj.propertyName = "value"
amaiellu
@amaiellu
Nov 08 2015 19:32
thanks @Takumar
CamperBot
@camperbot
Nov 08 2015 19:32
amaiellu sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 659 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 08 2015 19:32

@MirkaG in your example you see that you have to put function as an argument of filter() like that:

arr.filter(function(value) {
   // do something with value
  // return true or false
 }

when your anonymous function will return true, element will remain in your array, when false it will be removed from array arr
Filter will run your function against every element of your array.

Franco Benner
@FrancoBenner
Nov 08 2015 19:33
<button class="btn btn-block btn-primary fa fa-thumbs-up"><i class="fa fa-thumbs">Like</i></button>
works now
but
MirkaG
@MirkaG
Nov 08 2015 19:33
@Takumar This is the part that I'm having a hard time with. I can't seem to figured that out what to actually write in
Franco Benner
@FrancoBenner
Nov 08 2015 19:33
Add an i element with the classes fa and fa-thumbs-up.
so thats not working
ahh
fa-thumbs-up
LOL
Viktor
@VPererushev
Nov 08 2015 19:34
@codeofcolor don't put inside <i> tag text Like :)
Franco Benner
@FrancoBenner
Nov 08 2015 19:34
sorry guys
Fadimelhem
@Fadimelhem
Nov 08 2015 19:34
The property engines of myCar should be a number
Franco Benner
@FrancoBenner
Nov 08 2015 19:34
i know
got it
lolz
Richard Sithole
@Sliqric7053
Nov 08 2015 19:34
This message was deleted
Aleksander Gębicki
@Takumar
Nov 08 2015 19:34
@MirkaG your function will get first element from your array, so you have to check in your function if it passes your condition and if yes, return true, otherwise return false.
Then it will get second element of array (passed to variable "value") and again run your function with argument
Ademola Adegbuyi
@ooade
Nov 08 2015 19:35
And it should be <i class="fa fa-thumbs"></i> Like
Fadimelhem
@Fadimelhem
Nov 08 2015 19:35

need help with these = var Car = function() {
this.wheels = 4;
};

// Only change code below this line.
var myCar= new Car();

MirkaG
@MirkaG
Nov 08 2015 19:35
@Takumar Got it, thanks!
CamperBot
@camperbot
Nov 08 2015 19:35
mirkag sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 660 | @takumar | http://www.freecodecamp.com/takumar
Fadimelhem
@Fadimelhem
Nov 08 2015 19:35
Add an engines property with a number value to the myCar instance.
Ademola Adegbuyi
@ooade
Nov 08 2015 19:36
@codeofcolor remove the fa fa-thumbs-up from your button
Sz3th
@Sz3th
Nov 08 2015 19:36
I'm on the palindrome waypoint and I'm struggling with getting the code to work for the last test case: "0_0 (: /-\ :) 0-0". It doesn't look like a palindrome to me so I'm not sure how to handle getting my code to pass the test.
Aleksander Gębicki
@Takumar
Nov 08 2015 19:37
@MirkaG remember that you can check condition direct in return, because when you return expression, it is evaluated and result of this evaluation is returned.
i.e. return (4 > 5);, returns false.
Ademola Adegbuyi
@ooade
Nov 08 2015 19:38
@Fadimelhem obj.proname = value
MirkaG
@MirkaG
Nov 08 2015 19:38
@Takumar Thanks!
CamperBot
@camperbot
Nov 08 2015 19:38
mirkag sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: mirkag already gave takumar points
Viktor
@VPererushev
Nov 08 2015 19:38
@Fadimelhem you need add to your object myCar new property "engines". To do that you need use "this" keyword. Like "this.wheels" you can add a engines property
Aleksander Gębicki
@Takumar
Nov 08 2015 19:41
@VPererushev are you sure? @Fadimelhem you have to add new property "engines" to just created object "myCar", not constructor "Car()".
Fadimelhem
@Fadimelhem
Nov 08 2015 19:41

@VPererushev is not working var Car = function() {
this.wheels = 4;
};

// Only change code below this line.
var myCar= new Car();

this.engines = 2;

Aleksander Gębicki
@Takumar
Nov 08 2015 19:42
@Fadimelhem you use "this." inside constructor. When you create object "myCar" you work directly on this object.
Lets think about just bought "yellowCar", you want to add something to it, so you write:
yellowCar.colour = "green"; and you have your car painted to green colour.
Ademola Adegbuyi
@ooade
Nov 08 2015 19:44
The this keyword you used above dont point to any object
MirkaG
@MirkaG
Nov 08 2015 19:45
var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val) {

  return val 

});

// Only change code above this line.

(function() { return newArray; })();
What do I need to put in after "return val" in order to filter out numbers above 5?
Fadimelhem
@Fadimelhem
Nov 08 2015 19:45
@Takumar like this var myCar= new Car(engines=1);
@MirkaG how did you take the scrrenshot?
screenshot*
Ademola Adegbuyi
@ooade
Nov 08 2015 19:47
@Fadimelhem No, like myCar.windows = 4;
MirkaG
@MirkaG
Nov 08 2015 19:47
@Fadimelhem typ in (shift+ enter) put code (shift + enter)
oops hold on
``` type this in first
enter your code and finish with ```
``` should be on different lines from your code not on the same lines
Ademola Adegbuyi
@ooade
Nov 08 2015 19:49
@Fadimelhem enclose code in three backticks to format
Susan Nowoslawski
@susannowo
Nov 08 2015 19:49

I'm having some issues with #169 "Bring your JavaScript Slot Machine to Life"

// Only change code below this line.
$(".slot")
$($(".slot")[0]).html(slotOne);
$($(".slot")[0]).html(slotTwo);
$($(".slot")[0]).html(slotThree);

// Only change code above this line.
Any Ideas?
MirkaG
@MirkaG
Nov 08 2015 19:51
@susannowo
$($(".slot")[0]).html(slotOne);
    $($(".slot")[1]).html(slotTwo);
    $($(".slot")[2]).html(slotThree);
@susannowo remove the first $(".slot")
Aleksander Gębicki
@Takumar
Nov 08 2015 19:56
@Fadimelhem so how is your code? (I had a phone call)
Fadimelhem
@Fadimelhem
Nov 08 2015 19:57
@Takumar @marhyorh @MirkaG yes it ´s working thanks for the help
CamperBot
@camperbot
Nov 08 2015 19:57
fadimelhem sends brownie points to @takumar and @marhyorh and @mirkag :sparkles: :thumbsup: :sparkles:
:star: 661 | @takumar | http://www.freecodecamp.com/takumar
:star: 180 | @mirkag | http://www.freecodecamp.com/mirkag
:star: 320 | @marhyorh | http://www.freecodecamp.com/marhyorh
Aleksander Gębicki
@Takumar
Nov 08 2015 19:57
good job :-)
MirkaG
@MirkaG
Nov 08 2015 20:03
@susannowo did that help?
Fadimelhem
@Fadimelhem
Nov 08 2015 20:10

```

<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>
``` i cant manage to take the screenshot

MirkaG
@MirkaG
Nov 08 2015 20:11
@Fadimelhem there should not be anything else on the lines with ```
3 backticks
shift enter <insert code> shift enter
3 backticks
ctrl enter
Matt Leonard
@matty22
Nov 08 2015 20:13
explain format
CamperBot
@camperbot
Nov 08 2015 20:13

: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

MirkaG
@MirkaG
Nov 08 2015 20:16
Guys, I'm seriously stuck on Waypoint: Filter Arrays with filter can anyone please tell me the secret code to pass this challenge?
Rex Schrader
@SaintPeter
Nov 08 2015 20:16
@MirkaG Sure - can you share your code?
MirkaG
@MirkaG
Nov 08 2015 20:16
@SaintPeter
@SaintPeter
var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray;

// Only change code above this line.

(function() { return newArray; })();
Rex Schrader
@SaintPeter
Nov 08 2015 20:17
@MirkaG Ah, so . . no code?
MirkaG
@MirkaG
Nov 08 2015 20:17
I need to filter the array of anything greater 5
hahaha
I'm so stuck I don't even know what to do
Rex Schrader
@SaintPeter
Nov 08 2015 20:18
@MirkaG What you need to do is write a callback function that evaluates each element. If the element should be kept, that function should return true. If it should not be kept, return false
MirkaG
@MirkaG
Nov 08 2015 20:18
I tried many different things and nothing seems to work

@SaintPeter this is the example they provided in the challenge
`array = array.filter(function(val) {

return val % 2 === 0;

});`

I can't seem to figure out how I need to change it in order to filter out anything greater than 5 from the array
Rex Schrader
@SaintPeter
Nov 08 2015 20:20

@MirkaG Right, so the callback function is this part:

function(val) {
return val % 2 === 0;
}

It returns true if val % 2 === 0 - meaning that the number is even.

MirkaG
@MirkaG
Nov 08 2015 20:20
@SaintPeter So what do I need to change inorder to filter out all number great than 5?
Rex Schrader
@SaintPeter
Nov 08 2015 20:21
@MirkaG Well, can you write a statement that evaluates to true if val is greater than 5?
abouleila
@abouleila
Nov 08 2015 20:21

Waypoint: Filter Arrays with filter
});
what's wrong with this code?
newarray = oldArray.filter(function(val) {

return val > 5;

});

Rex Schrader
@SaintPeter
Nov 08 2015 20:21
@abouleila Please do not share solutions. The value for the learner is in getting there on their own.
@abouleila Do apprecaite your willingness to help, though :)
abouleila
@abouleila
Nov 08 2015 20:22
@SaintPeter i'm just trying to get assistance
Rex Schrader
@SaintPeter
Nov 08 2015 20:23
@abouleila Oh, goodness, I thought you were trying to give it :D
Fadimelhem
@Fadimelhem
Nov 08 2015 20:23
color: red;
Rex Schrader
@SaintPeter
Nov 08 2015 20:23
@SaintPeter The problem is that it should be newArray, not newarray
Fadimelhem
@Fadimelhem
Nov 08 2015 20:23
@MirkaG @matty22 thanks
CamperBot
@camperbot
Nov 08 2015 20:23
fadimelhem sends brownie points to @mirkag and @matty22 :sparkles: :thumbsup: :sparkles:
:warning: fadimelhem already gave mirkag points
:star: 226 | @matty22 | http://www.freecodecamp.com/matty22
MirkaG
@MirkaG
Nov 08 2015 20:24
@SaintPeter and @abouleila I still don't get it! Ahhh, so frustrating
Rex Schrader
@SaintPeter
Nov 08 2015 20:25
@MirkaG Humm - do you know how to evaluate a mathematical statement?
@MirkaG Essentially, how do you tell if something is greater than or less than?
abouleila
@abouleila
Nov 08 2015 20:26
@SaintPeter not just like that . it didn't make it
Rex Schrader
@SaintPeter
Nov 08 2015 20:27
@abouleila Oh, sorry, it's looking for array = array.filter(//etc
MirkaG
@MirkaG
Nov 08 2015 20:27
@SaintPeter do you mean something < than another
Rex Schrader
@SaintPeter
Nov 08 2015 20:27
@MirkaG Precisely.
@abouleila Just like the example code
MirkaG
@MirkaG
Nov 08 2015 20:29
@SaintPeter I just got it!!!! WOOHOOO I had to change 5 to a 6 Now it all makes sense
Rex Schrader
@SaintPeter
Nov 08 2015 20:29
@MirkaG :D :D
MirkaG
@MirkaG
Nov 08 2015 20:30
@SaintPeter and @abouleila Thank you!!!!!!!!
CamperBot
@camperbot
Nov 08 2015 20:30
mirkag sends brownie points to @saintpeter and @abouleila :sparkles: :thumbsup: :sparkles:
:star: 178 | @abouleila | http://www.freecodecamp.com/abouleila
:star: 1456 | @saintpeter | http://www.freecodecamp.com/saintpeter
abouleila
@abouleila
Nov 08 2015 20:30
@MirkaG Thank you too
CamperBot
@camperbot
Nov 08 2015 20:30
abouleila sends brownie points to @mirkag :sparkles: :thumbsup: :sparkles:
:star: 182 | @mirkag | http://www.freecodecamp.com/mirkag
Rex Schrader
@SaintPeter
Nov 08 2015 20:30
@MirkaG BTW, love the bow :D
@abouleila Have you resolved your issue?
abouleila
@abouleila
Nov 08 2015 20:33
@SaintPeter Yes thanks to @MirkaG and of course you
CamperBot
@camperbot
Nov 08 2015 20:33
abouleila sends brownie points to @saintpeter and @mirkag :sparkles: :thumbsup: :sparkles:
:warning: abouleila already gave mirkag points
:star: 1457 | @saintpeter | http://www.freecodecamp.com/saintpeter
Joseph Botros
@josephwasily
Nov 08 2015 20:45
@abouleila welcome neighbor
abouleila
@abouleila
Nov 08 2015 20:46
@josephwasily welcome
Fadimelhem
@Fadimelhem
Nov 08 2015 20:46

You should add three to each value in the array.

```

Joseph Botros
@josephwasily
Nov 08 2015 20:47
Fadi melhem and abouleila, مرحبا بيكم :D
Fadimelhem
@Fadimelhem
Nov 08 2015 20:47

You should add three to each value in the array.

var newArray = oldArray.map(function(val){
  return val * 4,5,6;
});
 var newArray = oldArray.map(function(val){
   return val * 3,4,5;
 });
var newArray = oldArray.map(function(val){
  return val * 4,5,6;
});

is this right

@josephwasily ahlan fik
Ademola Adegbuyi
@ooade
Nov 08 2015 20:47
@Fadimelhem code??
Rex Schrader
@SaintPeter
Nov 08 2015 20:47
@Fadimelhem Not even close, sorry.
@Fadimelhem First of all, you only need one instance of your assignment, etc.
@Fadimelhem Secondly, you should do a mathematical transformation to val
@Fadimelhem In this case you would add 3 to val and return it.
roadlesstraveled
@roadlesstraveled
Nov 08 2015 20:49
Hello. I am attempting to create a class called smaller-image and resize it so that the image is only 100 pixels wide. The next chat will show what my code looks like after having just refreshed it. Everything I've tried doesn't seem to be working and I need some help

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

I copy/pasted everything but I'm just working with the img src right now.
Fadimelhem
@Fadimelhem
Nov 08 2015 20:50
@SaintPeter do you mean i did to many val
Rex Schrader
@SaintPeter
Nov 08 2015 20:50
@Fadimelhem I mean that this:
return val * 4,5,6; is not valid javascript. I don't know what it would even mean.
Fadimelhem
@Fadimelhem
Nov 08 2015 20:50

in our example the callback only uses the value of the array element (the val argument) but your callback can also include arguments for the index and array being acted on.

Use the map function to add 3 to every value in the variable array.

this is the instruction

Rex Schrader
@SaintPeter
Nov 08 2015 20:51
@Fadimelhem Have you looked at the sample code?
Fadimelhem
@Fadimelhem
Nov 08 2015 20:51
var oldArray = [1,2,3,4,5];

// Only change code below this line.
Rex Schrader
@SaintPeter
Nov 08 2015 20:51
@Fadimelhem In the sample code they multiply val by 4. Can you identify which part of the code does that multipication?
Fadimelhem
@Fadimelhem
Nov 08 2015 20:52

var timesFour = oldArray.map(function(val){

return val * 4;

});

Fadimelhem
@Fadimelhem
Nov 08 2015 20:53
is this waht you mean @SaintPeter
Rex Schrader
@SaintPeter
Nov 08 2015 20:53
@Fadimelhem Yes, what part of that function multiplies val by 4?
Ademola Adegbuyi
@ooade
Nov 08 2015 20:54
@Fadimelhem in the example given, return val * 4 multiplies each value in the array with 4
Fadimelhem
@Fadimelhem
Nov 08 2015 20:54
timesFour
Ademola Adegbuyi
@ooade
Nov 08 2015 20:54
So use that idea to add 3 to each value in the array
Rex Schrader
@SaintPeter
Nov 08 2015 20:54
@Fadimelhem Yes, so can you change that from times 4 to plus 3?
Fadimelhem
@Fadimelhem
Nov 08 2015 20:55
@SaintPeter thanks
CamperBot
@camperbot
Nov 08 2015 20:55
fadimelhem sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1461 | @saintpeter | http://www.freecodecamp.com/saintpeter
tchan811
@tchan811
Nov 08 2015 20:55

Hi everyone, why do we define this variable lastNameLength as 0 in this example?

http://www.freecodecamp.com/challenges/waypoint-check-the-length-property-of-a-string-variable

Alex
@alexzita
Nov 08 2015 21:06
hello
EmotionlessRock
@EmotionlessRock
Nov 08 2015 21:06
You mean why does it start off as 0 @tchan811 ?
@alexzita Hello!
Rex Schrader
@SaintPeter
Nov 08 2015 21:07
@alexzita Greetings - if you've got a problem, yo, we'll solve it, check out our grooves while the DJ revolves it.
Ademola Adegbuyi
@ooade
Nov 08 2015 21:07
LOL
EmotionlessRock
@EmotionlessRock
Nov 08 2015 21:08
That was fire
Rex Schrader
@SaintPeter
Nov 08 2015 21:08
:cd:
Fadimelhem
@Fadimelhem
Nov 08 2015 21:10
var newArray = oldArray.filter(function(val){
  return val 5;
});
Use filter to remove all elements from array that are greater than 5.
stuck on this
Nicole F.
@gitasong
Nov 08 2015 21:11
In Waypoint #182, "Bring your JavaScript Slot Machine to Life," why are there two $ signs in each expression?
Ademola Adegbuyi
@ooade
Nov 08 2015 21:11
@Fadimelhem keep calm, dont rush things check out your return statement
Rex Schrader
@SaintPeter
Nov 08 2015 21:13
@Fadimelhem You need to have a comparison operator between val and 5
Fadimelhem
@Fadimelhem
Nov 08 2015 21:13
@marhyorh ye i know but how shoulld i put it to not become greater than 5
@SaintPeter i tried many things but could not solve it
Rex Schrader
@SaintPeter
Nov 08 2015 21:14
@Fadimelhem What operator means greater than?
Fadimelhem
@Fadimelhem
Nov 08 2015 21:14
>
Rex Schrader
@SaintPeter
Nov 08 2015 21:15
@Fadimelhem How do you say that val is greater than 5?
Fadimelhem
@Fadimelhem
Nov 08 2015 21:15
var newArray = oldArray.filter(function(val){
  return val  0>5;
ByShadow
@ByShadow
Nov 08 2015 21:15
Hello
Rex Schrader
@SaintPeter
Nov 08 2015 21:15
@Fadimelhem Where did that 0 come from?
@Fadimelhem Because 0 is never greater than 5 and . . .honestly .. that just doesn't make any sense.
Fadimelhem
@Fadimelhem
Nov 08 2015 21:16
@SaintPeter i dont know just trying all kind of stuff
Rex Schrader
@SaintPeter
Nov 08 2015 21:17
@Fadimelhem Well, I'm trying to walk you through the thought process and you're just throwing random stuff in there. So . . . how do you write that val is greater than 5?
Fadimelhem
@Fadimelhem
Nov 08 2015 21:18
val > 5
Rex Schrader
@SaintPeter
Nov 08 2015 21:18
@Fadimelhem If you're going to be a programmer you need to take deliberate steps. While it's ok to experiment, you should at least have a hypothesis to test.
Nicole F.
@gitasong
Nov 08 2015 21:18
Is anyone available to answer a question?
Rex Schrader
@SaintPeter
Nov 08 2015 21:18
@Fadimelhem precisely.
@gitasong Sure, lay it on me.
Nicole F.
@gitasong
Nov 08 2015 21:18
In Waypoint #182, "Bring your JavaScript Slot Machine to Life," why are there two $ signs in each expression?
Rex Schrader
@SaintPeter
Nov 08 2015 21:18
@Fadimelhem So, val > 5 returns a true or false value. You can return it in your function and you're good to go.
Nicole F.
@gitasong
Nov 08 2015 21:19
(I think I know the answer; I'm just checking to make sure.)
Rex Schrader
@SaintPeter
Nov 08 2015 21:19
@gitasong Because the inside one selects all instances of items with a class of slot and then chooses an offet [0] or [1], etc. And then the outer one says "take that element and do the next bits with it"
Nicole F.
@gitasong
Nov 08 2015 21:20
That's what I thought; thanks. :)
CamperBot
@camperbot
Nov 08 2015 21:20
if you want to thank someone, put an @ before their name!
Nicole F.
@gitasong
Nov 08 2015 21:20
Another question?
Rex Schrader
@SaintPeter
Nov 08 2015 21:20
@gitasong We don't have a limit here ;)
Nicole F.
@gitasong
Nov 08 2015 21:20
:)
Rex Schrader
@SaintPeter
Nov 08 2015 21:21
Maybe I should start charging?
:moneybag: :moneybag: :moneybag:
Nicole F.
@gitasong
Nov 08 2015 21:21
LOL--then you'd be SaintPeter, Inc. ;)
MirkaG
@MirkaG
Nov 08 2015 21:22
@SaintPeter Thanks. Bows are kind of my thing ;)
CamperBot
@camperbot
Nov 08 2015 21:22
mirkag sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: mirkag already gave saintpeter points
ByShadow
@ByShadow
Nov 08 2015 21:22
Gitasog
Gitasong