These are chat archives for FreeCodeCamp/Help

18th
Feb 2016
Zay
@incognitonerd
Feb 18 2016 00:00
@MindfulBell i need an example of addin online courses to a resume
Tim Bell
@MindfulBell
Feb 18 2016 00:04
@borner12 sure, so what are you having trouble with? what have you tried?
borner12
@borner12
Feb 18 2016 00:04
You'll need to see the code there, but I was wondering why $(".target:nth-child(3)").addClass("animated bounce"); works to bounce anything. It bounces 3rd button, but what parent is being referenced here exactly (i.e. who is the parent of these 'child'ren?
I can get through this challenge, just don't understand exactly what is going on when .target is being referenced since all of these buttons have class targets
class target, rather
@MindfulBell Thanks for listening
CamperBot
@camperbot
Feb 18 2016 00:06
borner12 sends brownie points to @mindfulbell :sparkles: :thumbsup: :sparkles:
borner12
@borner12
Feb 18 2016 00:06
Well that was unexpected but cool
Tim Bell
@MindfulBell
Feb 18 2016 00:07
@borner12 yea that is a strange selector...basically it is finding any element with class name '.target'
Kris Tarling
@KrisTarling
Feb 18 2016 00:07
@borner12 .target is the child - you're telling it to bounce the second .target child of a parent
borner12
@borner12
Feb 18 2016 00:08
But it only bounces the 3rd button of each well
Tim Bell
@MindfulBell
Feb 18 2016 00:08
and then it is saying, 'OK lets find the 3rd child of its parent"
jquery doesn't care what the parent is
Kris Tarling
@KrisTarling
Feb 18 2016 00:08
*yeah, third rather
Tim Bell
@MindfulBell
Feb 18 2016 00:08
it just has a list of them (probably in an array or some such) and you want the nth one
so .target is doing the finding, and the number is helping you get specific...it just assumes it has a parent, doesn't matter what the name is or where it is even, it just wants to distinguish 'WHICH' .target do you want? Because there are many children with the same class .target
borner12
@borner12
Feb 18 2016 00:09
So, anything that has 3 target children, will be looked at and then bounce the 3rd one? So I could make some other element entirely with three subelements that have the word 'target' as a class, and it would bounce it?
Kris Tarling
@KrisTarling
Feb 18 2016 00:10
yep
Tim Bell
@MindfulBell
Feb 18 2016 00:10
yessum
borner12
@borner12
Feb 18 2016 00:10
Weird.
Tim Bell
@MindfulBell
Feb 18 2016 00:10
i remember being confused by that one too when i stumbled upon it
borner12
@borner12
Feb 18 2016 00:11
So the id of left well right well is irrelevant here. As long as something has 3 'brothers' that have same class name, then i can pretend that there's a parent I can reference and do a nth selection on. Ok
Thanks @KrisTarling and thanks @MindfulBell
CamperBot
@camperbot
Feb 18 2016 00:12
borner12 sends brownie points to @kristarling and @mindfulbell :sparkles: :thumbsup: :sparkles:
borner12
@borner12
Feb 18 2016 00:12
Does this kind of thing come up later? It seems like an awfully specific case
Kris Tarling
@KrisTarling
Feb 18 2016 00:12
It comes in handy more than you'd think
and you can specify the parent
borner12
@borner12
Feb 18 2016 00:13
So do you guys sort of as a just in case add a class name to elements like this just in case you'll need to do something to reference a sibling?
Hoping you know from context what I mean by sibling
This message was deleted
Tobias
@tobiaswik
Feb 18 2016 00:20
I've been on challenge 117 for a long time now, trying to figure out how to fix the code without using this chatt. But nope. Here I am. Should have just saved time and went here for the start
anyone done that guy recently?
Gerti
@S3condG3ar
Feb 18 2016 00:21
@tobiaswik i can help
Tobias
@tobiaswik
Feb 18 2016 00:23
@S3condG3ar Thanks bud, just trying to figure out how to put the 3 different things on the buttons.
CamperBot
@camperbot
Feb 18 2016 00:23
tobiaswik sends brownie points to @s3condg3ar :sparkles: :thumbsup: :sparkles:
Gerti
@S3condG3ar
Feb 18 2016 00:24
@tobiaswik gimme a sec
Tobias
@tobiaswik
Feb 18 2016 00:24

$(document).ready(function() {
$("button").addClass("animated")
$(".btn").addClass("shake")
$("target1").addclass("btn-primary")
});

This is what i've been having trouble with.

Huang Shih-Yu
@ShihYu619
Feb 18 2016 00:24

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

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

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}
.smaller-image{
width: 100px
}
</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 can't run the tests after adding smaller image; however, everything seems fine.
Gerti
@S3condG3ar
Feb 18 2016 00:26
@tobiaswik challenge name?
Huang Shih-Yu
@ShihYu619
Feb 18 2016 00:27
size your images
Tobias
@tobiaswik
Feb 18 2016 00:27

117 Target the same element with multiple jQuery Selectors

wow things got big
Aracelly
@asolis92
Feb 18 2016 00:28
Hello World
CamperBot
@camperbot
Feb 18 2016 00:28

welcome to FreeCodeCamp @asolis92!

borner12
@borner12
Feb 18 2016 00:28
@asolis92 howdy
Gerti
@S3condG3ar
Feb 18 2016 00:28
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");
borner12
@borner12
Feb 18 2016 00:28
@asolis92 Hi rather
Gerti
@S3condG3ar
Feb 18 2016 00:28
@tobiaswik try it out
BrittanyEllen
@BrittanyEllen
Feb 18 2016 00:29

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

.smaller-image {
width: 100px;
}


</style>

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

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

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

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

whats wrond with my code up above ^
wrong
Gerti
@S3condG3ar
Feb 18 2016 00:29
gimme challenge name
@BrittanyEllen challenge name
BrittanyEllen
@BrittanyEllen
Feb 18 2016 00:30
nest an anchow element with paragraph
anchor
Marsallis Jones
@iamdarthjones
Feb 18 2016 00:30
hey guys im confused on this challenge

<h2 style="color: red">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>

borner12
@borner12
Feb 18 2016 00:32
@iamdarthjones What's the issue?
Kris Tarling
@KrisTarling
Feb 18 2016 00:32
@BrittanyEllen can't find anything wrong. What is it saying? Could just be a bug
Marsallis Jones
@iamdarthjones
Feb 18 2016 00:32
Im confused about what aspect im suppose to be changing in the h2
borner12
@borner12
Feb 18 2016 00:34
Can you give me the url/link of that challenge?
@iamdarthjones that was for you
Gerti
@S3condG3ar
Feb 18 2016 00:35

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

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

try it out
David Enos
@bluedangerforyou
Feb 18 2016 00:35
hi guys, how do i add a social media icon to my <button>
BrittanyEllen
@BrittanyEllen
Feb 18 2016 00:36
@KrisTarling its telling me my p element should have "View more" nested
Kris Tarling
@KrisTarling
Feb 18 2016 00:37
@BrittanyEllen weird, I've pasted your exact code into my screen and it works.
J. Wiles
@ForMM82
Feb 18 2016 00:37
Hello folks. New to the room and coding. I'll try not to be stupid.
David Enos
@bluedangerforyou
Feb 18 2016 00:38
@ForMM82 howdy!
Erica Mitchell
@scarlettbrooke1221
Feb 18 2016 00:39
hi all! im in the size your images challenge and i cant get past it ...

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

what am i doing wrong?
BrittanyEllen
@BrittanyEllen
Feb 18 2016 00:39
@KrisTarling thank you im going to refresh the page and try again... could it be a problem with google chrome?
CamperBot
@camperbot
Feb 18 2016 00:39
brittanyellen sends brownie points to @kristarling :sparkles: :thumbsup: :sparkles:
Kris Tarling
@KrisTarling
Feb 18 2016 00:40
@BrittanyEllen possibly. The only thing that looks remotely 'wrong' in yours is the space just before 'cat photos'
Tobias
@tobiaswik
Feb 18 2016 00:40

@S3condG3ar Yep that sure did it. I had forgot a hashtag infront of target1. Aaaaand all the ; at the end of each row.

I did post your code under mine, changed mine to look like yours, and then Run test. Didnt work. Had to delete mine and paste yours and then it liked it. lolz

Franco Zapata
@Francozt01
Feb 18 2016 00:41
@ericamithell1221 is about the p font-size: 16px; ?
Gerti
@S3condG3ar
Feb 18 2016 00:41
@tobiaswik glad i could help u :D
Mariya
@mariyadiminsky
Feb 18 2016 00:41
Can someone please advice me on my every function? It's supposed to take an array and a callback function and return false if even one instance returns false in the callback function. So EVERY iteration must be true. I figured this out easily with a for loop but I want to try it with a reduce and it just doesn't work for me. Why do I keep getting undefined?
console.log(every([2, 4, 6], function(elem) {
  return elem % 2 == 0;
}));  // true

console.log(every([2, 4, 7], function(elem) {
  return elem % 2 == 0;
}));  // false

// BONUS: use reduce in your answer
function every(array, func) {
    array.reduce(function(item) {
     if(!func(item)) {
        return false; 
     }
    })

    return true;
}
Gerti
@S3condG3ar
Feb 18 2016 00:42
@EskimoBurd that's easy
Kris Tarling
@KrisTarling
Feb 18 2016 00:42
@ericamithell1221 have you given the "smaller-image" class to the img tag?
Erica Mitchell
@scarlettbrooke1221
Feb 18 2016 00:42
@Francozt01 that seemed to be ok in the previous challenge bc it let me move forward
Gerti
@S3condG3ar
Feb 18 2016 00:42
@EskimoBurd on each boots trap button element add
Franco Zapata
@Francozt01
Feb 18 2016 00:43
@ericamithell1221 ahhh is about the image size
Erica Mitchell
@scarlettbrooke1221
Feb 18 2016 00:43
@KrisTarling what would that look like?
@Francozt01 no its about the image size...
Franco Zapata
@Francozt01
Feb 18 2016 00:43
give the link or exercises name
Tobias
@tobiaswik
Feb 18 2016 00:43
@S3condG3ar Thanks!
CamperBot
@camperbot
Feb 18 2016 00:43
tobiaswik sends brownie points to @s3condg3ar :sparkles: :thumbsup: :sparkles:
:star: 133 | @s3condg3ar | http://www.freecodecamp.com/s3condg3ar
Kris Tarling
@KrisTarling
Feb 18 2016 00:43
@ericamithell1221 <img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Gerti
@S3condG3ar
Feb 18 2016 00:43
@EskimoBurd <div class="col-xs-4> the button code than underneath it close the div </div>
Erica Mitchell
@scarlettbrooke1221
Feb 18 2016 00:44
@Francozt01 "size your images"
Franco Zapata
@Francozt01
Feb 18 2016 00:44
@ericamithell1221 pay attention to what @KrisTarling said
Erica Mitchell
@scarlettbrooke1221
Feb 18 2016 00:44
@KrisTarling @Francozt01 thank you! that worked!
CamperBot
@camperbot
Feb 18 2016 00:44
ericamithell1221 sends brownie points to @kristarling and @francozt01 :sparkles: :thumbsup: :sparkles:
:star: 545 | @francozt01 | http://www.freecodecamp.com/francozt01
:star: 50 | @kristarling | http://www.freecodecamp.com/kristarling
Kris Tarling
@KrisTarling
Feb 18 2016 00:45
You're welcome :)
Franco Zapata
@Francozt01
Feb 18 2016 00:45
@ericamithell1221 u got it :+1: keep going and don't give up! :D
BrittanyEllen
@BrittanyEllen
Feb 18 2016 00:50
@KrisTarling thanks for your help the code was right it was in the wrong place
CamperBot
@camperbot
Feb 18 2016 00:50
brittanyellen sends brownie points to @kristarling :sparkles: :thumbsup: :sparkles:
:star: 51 | @kristarling | http://www.freecodecamp.com/kristarling
Joshua Abu
@Absolutestunna
Feb 18 2016 00:51
Is there anyone who has worked on the calculator that can help me complete my project? I have the html, css and js calculation between two numbers finished but I need help in calculating more than two numbers
Matt Burd
@EskimoBurd
Feb 18 2016 00:51

https://gyazo.com/2ece4ed58c16939b0ec45a6465d96a23

obviously not right yet @S3condG3ar was a little confused over how you said to do it.

Gerti
@S3condG3ar
Feb 18 2016 00:52
@EskimoBurd challange name
Matt Burd
@EskimoBurd
Feb 18 2016 00:52
use the bootstrap grid to put elements side by side
Gerti
@S3condG3ar
Feb 18 2016 00:53
Matt Burd
@EskimoBurd
Feb 18 2016 00:56
Ok ty yea, im glad im not totally lost, its usually the tricky part for me is locating where exactly it goes.
Gerti
@S3condG3ar
Feb 18 2016 00:57
@EskimoBurd glad i could help u :D
Matt Burd
@EskimoBurd
Feb 18 2016 00:57
ty ty :) just started about 2 weeks ago really
Gerti
@S3condG3ar
Feb 18 2016 00:58
good luck :D
Tony
@Rogers187
Feb 18 2016 00:58
can anyone help with why my pic want size. Looks the same from phone to laptop. http://codepen.io/Rogers187/pen/RrOBKx
adamboyer
@adamboyer
Feb 18 2016 01:08
I'm confused, does bootstrap make my h2-h6 italicized?
Victor Cho
@victorc25
Feb 18 2016 01:12
Hi, I'm stuck on getting the h2 element to red and class to red-text.
<style>
<h2 .red-text { color: red; } </style>
can someone help?
Thomas Bartels
@tbartels
Feb 18 2016 01:13
@adamboyer by default, no: https://getbootstrap.com/css/#type
@victorc25 you've got what seems like some stray characters in there, you don't need the <h2 stuff before the .red-text line
<style>
.red-text { color: red; }
</style>
adamboyer
@adamboyer
Feb 18 2016 01:14
@tbartels what if they are seated in a well?
@tbartels that's a class="well"
Thomas Bartels
@tbartels
Feb 18 2016 01:15
don't think so, are you doing this in a CodePen?
Victor Cho
@victorc25
Feb 18 2016 01:18
@tbartels I tried that but the h2 element is not red and have red-text
am I missing something still?
Mark Anthony Gallant
@markgallant01
Feb 18 2016 01:18
can you post your whole code
Travis
@TravisHi
Feb 18 2016 01:18
guys I'm having trouble using keypress, can anyone help?
Matt Burd
@EskimoBurd
Feb 18 2016 01:19

https://gyazo.com/03a1e2577931908867c52ecc38636872

frst time in awhile that i have been stumped and semi lost right when i entered a lesson

Thomas Bartels
@tbartels
Feb 18 2016 01:19
@victorc25 do you have the class of red-text on your <h2> element?
<h2 class="red-text">...
adamboyer
@adamboyer
Feb 18 2016 01:20
@tbartels Yes I'm making the tribute page. I wanted to use as little css as possible and rely mainly on bootstrap, but I ended up having to make a class with font-style: normal; and apply to my heading.
Thomas Bartels
@tbartels
Feb 18 2016 01:21
@adamboyer you can paste the url for your CodePen right into this chat and it will render so we can help
Victor Cho
@victorc25
Feb 18 2016 01:22
yes
Victor Cho
@victorc25
Feb 18 2016 01:23

<style>
<h2 class"red-text"> {
color: red;
}
</style>

<h2>CatPhotoApp</h2>

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

adamboyer
@adamboyer
Feb 18 2016 01:23
@tbartels there you go
Thomas Bartels
@tbartels
Feb 18 2016 01:24
@adamboyer hehe, you have an italics tag inside your <h2>:
<h2><i>The Father of Modern Science</h2>
remove that <i>
help format
CamperBot
@camperbot
Feb 18 2016 01:26

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

MikeBeers
@MikeBeers
Feb 18 2016 01:27
Looking for help with jquery on codepen
Thomas Bartels
@tbartels
Feb 18 2016 01:27
<style>
.red-text { color: red; }
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
like that @victorc25
adamboyer
@adamboyer
Feb 18 2016 01:27
@tbartels thanks man, I guess since I didn't close that <i> tag it affected the rest of my page.
CamperBot
@camperbot
Feb 18 2016 01:27
adamboyer sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:star: 269 | @tbartels | http://www.freecodecamp.com/tbartels
MikeBeers
@MikeBeers
Feb 18 2016 01:27
Quote project
Thomas Bartels
@tbartels
Feb 18 2016 01:27
@adamboyer that's that HTML does :)
Mark Anthony Gallant
@markgallant01
Feb 18 2016 01:28
just ask a question @MikeBeers
Thomas Bartels
@tbartels
Feb 18 2016 01:28
@MikeBeers general etiquette dictates just asking your questions and if someone is around that can help, they will, if not /shrug :(
MikeBeers
@MikeBeers
Feb 18 2016 01:29
I am trying to assign the same random color to two locations
adamboyer
@adamboyer
Feb 18 2016 01:29
Hey @tbartels could you also tell me why there is that grey space next to my quote on both sides?
Victor Cho
@victorc25
Feb 18 2016 01:30
@tbartels thanks for the guidance
CamperBot
@camperbot
Feb 18 2016 01:30
victorc25 sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:star: 270 | @tbartels | http://www.freecodecamp.com/tbartels
Victor Cho
@victorc25
Feb 18 2016 01:30
I was stuck on that for the last 20 mins
MikeBeers
@MikeBeers
Feb 18 2016 01:30
Right now my random colors are not in sync
Victor Cho
@victorc25
Feb 18 2016 01:30
I also tried googling but that didn't help much either
I appreciate it!
Thomas Bartels
@tbartels
Feb 18 2016 01:31
@adamboyer the grey vertical bars you mean?
adamboyer
@adamboyer
Feb 18 2016 01:31
yes
Thomas Bartels
@tbartels
Feb 18 2016 01:31
@victorc25 no worries, it's a bit hard to know what to google for early on, don't worry, it gets easier.
adamboyer
@adamboyer
Feb 18 2016 01:31
@tbartels yes
Thomas Bartels
@tbartels
Feb 18 2016 01:32
@adamboyer that is part of bootstrap, from the <blockquote> tag
Donovan
@tronovan
Feb 18 2016 01:33
@MikeBeers My understanding is that when you use the random variable, it's rerunning the function and thus generating a new value... could be wrong
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:33
This message was deleted
Donovan
@tronovan
Feb 18 2016 01:33
@MikeBeers Try making a named function to return the random number,, store it in a variable, and use the variable in the different locations in your code
adamboyer
@adamboyer
Feb 18 2016 01:33
@tbartels thanks again!
CamperBot
@camperbot
Feb 18 2016 01:33
adamboyer sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:warning: adamboyer already gave tbartels points
Mark Anthony Gallant
@markgallant01
Feb 18 2016 01:35
@MikeBeers I think @tronovan is right, also you want to put your JS inside a $(document).ready(function() {}); so everything loads before your JS runs
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:35
I’m stuck on “Access MultiDimensional Arrays With Indexes”. This lesson isn’t making a lot of sense to me. The task is to Read from myArray using bracket notation so that myData is equal to 8. Here is the code:
// Setup
var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];
// Only change code below this line.
var myData = myArray[][];
Thomas Bartels
@tbartels
Feb 18 2016 01:36
@MikeBeers you may want to use a global variable to save the color outside of the function and then use that
Victor Cho
@victorc25
Feb 18 2016 01:36
@tbartels thanks for the encouragement! It's my first time coding and it's great to be in an supportive environment
CamperBot
@camperbot
Feb 18 2016 01:36
victorc25 sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:warning: victorc25 already gave tbartels points
Thomas Bartels
@tbartels
Feb 18 2016 01:37
@lbattaglioli2000 do you understand how to access a specific element in an array?
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:37
I do understand how to use the bracket notation like `myArray[] @tbartels
Donovan
@tronovan
Feb 18 2016 01:37
Can I get some feedback on my RandomQuoteGenerator? http://codepen.io/tronovan/full/XXQxxL/ Does anyone know how I can use a really large JSON file? Is there a way I can link to the JSON file here on github? https://github.com/erabug/simpsons-quotes/blob/master/quotes.json ?
Thomas Bartels
@tbartels
Feb 18 2016 01:38
@lbattaglioli2000 so the part you're struggling with is the nested arrays?
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:38
I think that is where I’m having a hard time, I don’t understand what it means then it has to equal 8
Thomas Bartels
@tbartels
Feb 18 2016 01:39
it just wants you to use the array notation to find the item in that nested array that is the number 8
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:39
Okay, I think that makes a little more sense, let me try it real quick.
Thomas Bartels
@tbartels
Feb 18 2016 01:40
var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];
____________________________________^
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:40
Ahhhahaa!! Thank you so much @tbartels I get this now!
CamperBot
@camperbot
Feb 18 2016 01:40
lbattaglioli2000 sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:star: 271 | @tbartels | http://www.freecodecamp.com/tbartels
Thomas Bartels
@tbartels
Feb 18 2016 01:41
cool :)
Luigi Battaglioli
@lbattaglioli2000
Feb 18 2016 01:41
:smile: you da bomb!
Joshua Briley
@somecallmejosh
Feb 18 2016 01:43
Hey guys, looking to see if someone can help point me in the right direction. Working on the pomodoro clock, and I'm drawing a blank on how to "toggle" between the two clocks. Here's my js: https://github.com/somecallmejosh/pomodoro-clock/blob/gh-pages/scripts/main.js
Thomas Bartels
@tbartels
Feb 18 2016 01:44
@tronovan specifically to the file on github, no, they block that unfortunately
Joshua Briley
@somecallmejosh
Feb 18 2016 01:44
The session clock works... and I can also get the "break" clock to work by adjusting a couple of variables. I just don't know how to trigger the break clock once the session clock is complete.
Donovan
@tronovan
Feb 18 2016 01:44
@tbartels could I host a json file on codepen?
Thomas Bartels
@tbartels
Feb 18 2016 01:46
@tronovan I don't know codepen well enough to know that, I don't think so though, there are github raw sites https://rawgit.com/
hemanth mannem
@hemanthmannem
Feb 18 2016 01:46
how to add image in html?
Donovan
@tronovan
Feb 18 2016 01:46
@tbartels thanks :)
CamperBot
@camperbot
Feb 18 2016 01:46
tronovan sends brownie points to @tbartels :sparkles: :thumbsup: :sparkles:
:star: 272 | @tbartels | http://www.freecodecamp.com/tbartels
Thomas Bartels
@tbartels
Feb 18 2016 01:47
@hemanthmannem <img src="/path/to/file.ext">
hemanth mannem
@hemanthmannem
Feb 18 2016 01:47

<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;
}
<img src="http://www.your-image-source.com/your-image.jpg">
<img src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg">
</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>

Thomas Bartels
@tbartels
Feb 18 2016 01:48
@hemanthmannem you look to be doing it right, looks like you have a bocus src in one of them though
Donovan
@tronovan
Feb 18 2016 01:48
hemanth mannem
@hemanthmannem
Feb 18 2016 02:04
@tbartels the img src code must be written down to </style>
Jelani Thompson
@JelaniThompson
Feb 18 2016 02:05
Hey there!
Just finishing up my Pomodoro Timer app
Franco Zapata
@Francozt01
Feb 18 2016 02:05
@JelaniThompson Congratulations :D
Jelani Thompson
@JelaniThompson
Feb 18 2016 02:06
Does anyone happen to know why my break length counts down by two once the break timer starts?
You can set the work length to 1 to speed up the process of checking
The code is pretty much copied from work length, but it's still giving me a hard time for some reason
Franco Zapata
@Francozt01
Feb 18 2016 02:09
@JelaniThompson is working fine
@JelaniThompson after break is over it stops and can't be restarted. i have to refresh th page to start again
philipsiu
@philipsiu
Feb 18 2016 02:25
Hi. Can anyone help with the challenge "Title Case a Sentence"?
hemanth mannem
@hemanthmannem
Feb 18 2016 02:29
how to use two classes in img?
Collin
@collinferry
Feb 18 2016 02:31
@philthyfill Where are you stuck?
@hemanthmannem I'm guessing you would do: <img src="url" class="class1 class2">
philipsiu
@philipsiu
Feb 18 2016 02:34
@collinferry I'm able to change the string to lowercase and split to an array. I'm looping through the array and trying to make charAt 0 uppercase. That is where I'm stuck. I'll post the code.
function titleCase(str) {
  var splitr = str.toLowerCase().split(" ");
  var splitr2 = [];
  for (var i = 0; i < splitr.length; i++) {
    splitr2.push(splitr[i][0].toUpperCase());
  }
  return splitr2;
}
titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");
@collinferry I'm testing out a second var and pushing charAt 0 to it, but it's only returning the first character uppercase.
Collin
@collinferry
Feb 18 2016 02:36
@philthyfill I think I had an issue there too. Looking at my code now I divided into a bunch of different steps.
philipsiu
@philipsiu
Feb 18 2016 02:37
@collinferry Yeah, I'm breaking it down into parts as I go. I can see how to make the first character uppercase, but I need to figure out how to push the entire word into the new array and join them back into a string.
Collin
@collinferry
Feb 18 2016 02:38
Yeah I've got a variable called newWord
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:38
Can someone help? I'm having an issue in the using a CSS class to style an Element challenge. for some reason, my h2 element isn't red and doesn't have the class 'red.text'
Collin
@collinferry
Feb 18 2016 02:40
@philthyfill I can link you to my whole code if ya like, unless you're digging in and want to figure out on your own.
@YugHug link me I'll take a look
use bit.ly since the link is massive
philipsiu
@philipsiu
Feb 18 2016 02:40
@collinferry Thx for the offer, but I wanna figure this out on my own.
CamperBot
@camperbot
Feb 18 2016 02:40
philthyfill sends brownie points to @collinferry :sparkles: :thumbsup: :sparkles:
:star: 301 | @collinferry | http://www.freecodecamp.com/collinferry
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:42
how do I link @collinferry ?
Collin
@collinferry
Feb 18 2016 02:47
@YugHug Copy paste the URL from your browser to bit.ly, then paste the result here
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:47
http://bit.ly/1KrePGk @collinferry
Collin
@collinferry
Feb 18 2016 02:48
@YugHug look at your "red-text" class in your h2 tag
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:48
ohh!
the parentheses
Collin
@collinferry
Feb 18 2016 02:49
@YugHug :)
@YugHug It's always some tiny typo like that
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:49
thanks @collinferry
CamperBot
@camperbot
Feb 18 2016 02:49
yughug sends brownie points to @collinferry :sparkles: :thumbsup: :sparkles:
:star: 302 | @collinferry | http://www.freecodecamp.com/collinferry
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:49
i feel slow... lol
Collin
@collinferry
Feb 18 2016 02:49
@YugHug Sure thing man, keep on trucking
@YugHug Nah, believe me, we all do it
Jasmine (Jay) Yugen
@YugHug
Feb 18 2016 02:50
i stared at that thing for like 10 minutes! @collinferry thanks so much
CamperBot
@camperbot
Feb 18 2016 02:50
yughug sends brownie points to @collinferry :sparkles: :thumbsup: :sparkles:
:warning: yughug already gave collinferry points
Matt Burd
@EskimoBurd
Feb 18 2016 03:16

https://gyazo.com/ad4d9203594debf046488b26c20981f9

just missing something, cant figure ou reallhow to format the remaining objectives

Jeffrey Zhang
@Jeffrey-Zhang-WOF
Feb 18 2016 03:34
How do you refer to elements within the style tag?
for example, if I wanted to modify all p
how do I do that again?
Craig Banach
@CraigBanach
Feb 18 2016 03:35
@Jeffrey-Zhang-WOF
p {
// css goes here
}
Jeffrey Zhang
@Jeffrey-Zhang-WOF
Feb 18 2016 03:35
thanks!
newbie here :)
Matt Burd
@EskimoBurd
Feb 18 2016 03:36
Pranav Doshi
@pranavdoshi
Feb 18 2016 03:48
@EskimoBurd input type = text class = "form-control"
within html
Sam
@SamOBry
Feb 18 2016 03:55
need some help here but do not understand how to post code
im stuck on adding id attributes to boot strap elements
Bon
@OriBon
Feb 18 2016 03:58
What part is confusing you
Sam
@SamOBry
Feb 18 2016 03:59
where to put the id of left-well
@OriBon
Bon
@OriBon
Feb 18 2016 04:01
which waypoint is it
oh i see it
You're going to give each of your well elements a new id. One is a left-well, the other is right-well.
<div class="well" id="left-well">
Akhil
@akhilsura7
Feb 18 2016 04:05
How to give font family and color properties to body element?
Shea Stock
@vashea
Feb 18 2016 04:07
Stuck on the image size. i have .smaller-image { width: 100px;
where do i place this code, inside style or img element
oh yay! nvm!
Alex N.
@N0bl3
Feb 18 2016 04:13
@vashea you just got stuck-unstuck!
MikeBeers
@MikeBeers
Feb 18 2016 04:15
```js
var color = ["red","orange","yellow","green","blue","indigo","violet"];
var quotes = ['<i class="fa fa-quote-left"></i>quote 1', '<i class="fa fa-quote-left"></i>quote 2', '<i class="fa fa-quote-left"></i>quote 3', '<i class="fa fa-quote-left"></i>quote 4', '<i class="fa fa-quote-left"></i>quote 5' ];

var newColor = "";
var random = function () {

  var randomNum =[Math.floor(Math.random()* 7)];
  newColor = color[randomNum];

};

 $( "button" ).click(function() {    
  $("body").css("background-color", newColor);
  $("#target3").css("color", newColor);
   $("#target2").html(quotes[Math.floor(7*Math.random())])
});
I am trying to get newColor to assign a color to css.
Hayley A Carlisle
@hac544
Feb 18 2016 04:16
I'm kind of stuck on nesting an i element within my button element? Am I supposed to put the i element after the button classes?
Shea Stock
@vashea
Feb 18 2016 04:17
@N0bl3 I'm loving this!
Hayley A Carlisle
@hac544
Feb 18 2016 04:18
never mind got it
Sam
@SamOBry
Feb 18 2016 04:20
@OriBon thanks bro
CamperBot
@camperbot
Feb 18 2016 04:20
samobry sends brownie points to @oribon :sparkles: :thumbsup: :sparkles:
bitgrower
@bitgrower
Feb 18 2016 04:20
what happens when you run it, @MikeBeers ?
CamperBot
@camperbot
Feb 18 2016 04:20
:star: 641 | @oribon | http://www.freecodecamp.com/oribon
MikeBeers
@MikeBeers
Feb 18 2016 04:21
well it does not change color
when I change the code to this it changes but not to the same color.
var color = ["red","orange","yellow","green","blue","indigo","violet"];
var quotes = ['<i class="fa fa-quote-left"></i>quote 1', '<i class="fa fa-quote-left"></i>quote 2', '<i class="fa fa-quote-left"></i>quote 3', '<i class="fa fa-quote-left"></i>quote 4', '<i class="fa fa-quote-left"></i>quote 5' ];

var newColor = "";
var random = function () {

  var randomNum =[Math.floor(Math.random()* 7)];
  return color[randomNum];

};

 $( "button" ).click(function() {    
  $("body").css("background-color", random);
  $("#target3").css("color", random);
   $("#target2").html(quotes[Math.floor(7*Math.random())])
});
Omar Richardson
@omie86
Feb 18 2016 04:22
any idea what the issue is here? I had to add btn-block to a button
<button class="btn" "btn-block">Like</button>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
<button class="btn" "btn-block">Like</button>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
bitgrower
@bitgrower
Feb 18 2016 04:24
This message was deleted
MikeBeers
@MikeBeers
Feb 18 2016 04:25
@omie86 I dont think you need " " around the btn-block
bitgrower
@bitgrower
Feb 18 2016 04:25
@Mike Beers -- you are putting random in your code, shouldn't it be random() ?
MikeBeers
@MikeBeers
Feb 18 2016 04:26
it works with out the()
bitgrower
@bitgrower
Feb 18 2016 04:26
actually ... it should be class = " btn btn-block" <-- like that ... @omie86
all your classes do need to be contained within quotes ... but they are only separated by whitespace/blanks
MikeBeers
@MikeBeers
Feb 18 2016 04:27
I am trying to assign the color to a variable then use that variable to make both CSS values the same. Right now they are both random
bitgrower
@bitgrower
Feb 18 2016 04:28
lol .... help me out here .. you say it doesnt work, but says it works ... so, I'm a wee bit confused ...
MikeBeers
@MikeBeers
Feb 18 2016 04:28
lol
bitgrower
@bitgrower
Feb 18 2016 04:28
try this ... do typeof random
MikeBeers
@MikeBeers
Feb 18 2016 04:29
?
bitgrower
@bitgrower
Feb 18 2016 04:29
right now you have random defined as a function, do you not ? not a variable containing a numeric value
MikeBeers
@MikeBeers
Feb 18 2016 04:29
one sec. let me change one thing
bitgrower
@bitgrower
Feb 18 2016 04:30
if you want to set random to a number ... random = theNameOfMyfunction(someVar);
MikeBeers
@MikeBeers
Feb 18 2016 04:30
var color = ["red","orange","yellow","green","blue","indigo","violet"];
var quotes = ['<i class="fa fa-quote-left"></i>quote 1', '<i class="fa fa-quote-left"></i>quote 2', '<i class="fa fa-quote-left"></i>quote 3', '<i class="fa fa-quote-left"></i>quote 4', '<i class="fa fa-quote-left"></i>quote 5' ];

var newColor = "";
var random = function () {

  var randomNum =[Math.floor(Math.random()* 7)];
  newColor = color[randomNum];

};

 $( "button" ).click(function() {    
  $("body").css("background-color", newColor);
  $("#target3").css("color", newColor);
   $("#target2").html(quotes[Math.floor(7*Math.random())])
});
bitgrower
@bitgrower
Feb 18 2016 04:31
does that work any better ?
you still have random defined as a function, though ...
MikeBeers
@MikeBeers
Feb 18 2016 04:32
it does not seem to assign color to newColor
bitgrower
@bitgrower
Feb 18 2016 04:32
that's because random contains a function ...
not a numeric value
that's why I said to do typeof random ...
which would then confirm my suspicions -- or prove me wrong ... :)
MikeBeers
@MikeBeers
Feb 18 2016 04:33
lol
hemanth mannem
@hemanthmannem
Feb 18 2016 04:33
<a href="http://freecatphotoapp.com "> cat photos</a>
bitgrower
@bitgrower
Feb 18 2016 04:34
if you want to use the number randomNum, you'll have to move it outside of the function ... no matter how you define it ... because it's local to the function ... and your function should have a return statement, anyway ... :) Otherwise it just calculates stuff and doesn't do anything with it ...
Thomas Noe
@t3h2mas
Feb 18 2016 04:34
^^
bitgrower
@bitgrower
Feb 18 2016 04:34
what's the question @hemanthmannem ?
hemanth mannem
@hemanthmannem
Feb 18 2016 04:35
what is the mistake in it while 'a' element should have the anchor text of "cat photos"
Thomas Noe
@t3h2mas
Feb 18 2016 04:35
is that a space after .com
bitgrower
@bitgrower
Feb 18 2016 04:35
sure looks like it ... good eye, @t3h2mas
hemanth mannem
@hemanthmannem
Feb 18 2016 04:36
Create an a element that links to http://freecatphotoapp.com and has "cat photos" as its anchor text.
James
@milesmeow
Feb 18 2016 04:36
how many people in this forum are non-technical folks learning to code?
bitgrower
@bitgrower
Feb 18 2016 04:36
dunno -- haven't done a study ...
James
@milesmeow
Feb 18 2016 04:37
I was just conducting an informal pole of the people in this ‘room'
bitgrower
@bitgrower
Feb 18 2016 04:37
@hemanthmannem -- try removing the space out of the quoted URL and see if that helps ...
Andrea R.
@amr08
Feb 18 2016 04:37
"Use the Bootstrap Grid to Put Elements Side By Side" can someone send me their code.
Thomas Noe
@t3h2mas
Feb 18 2016 04:37
@aroche08 then how would you learn??
bitgrower
@bitgrower
Feb 18 2016 04:37
This message was deleted

@aroche08 then how would you learn??

^^^

Andrea R.
@amr08
Feb 18 2016 04:38
lol in that case how can i screen shot it like others #n00b
bitgrower
@bitgrower
Feb 18 2016 04:38
oops wrong one ...
hemanth mannem
@hemanthmannem
Feb 18 2016 04:39
not working
bitgrower
@bitgrower
Feb 18 2016 04:39
um ... @aroche08 -- I found the bootstrap challenges pretty straight forward ...
if you want to post your code, we might be able to help -- but to just hand you our code ... well, at least let us try and help you gain insight ...
@hemanthmannem -- then there is probably something else within your code which is messing up ... can you paste your code?
Andrea R.
@amr08
Feb 18 2016 04:41
Yes, me as well, but i'm having a glitch with this one in particular. @hemanthmannem yes thanks, I was hoping to screen shot it, but i'll get it
CamperBot
@camperbot
Feb 18 2016 04:41
aroche08 sends brownie points to @hemanthmannem :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for hemanthmannem
bitgrower
@bitgrower
Feb 18 2016 04:41
for instance ... you might have a missing </div> or have done a <div> trying to close it and ending up with another <div> instead of a </div>
DJ
@qualitymanifest
Feb 18 2016 04:41
@MikeBeers still having trouble with that?
bitgrower
@bitgrower
Feb 18 2016 04:41
aroche08 - copy and paste ... screenshots are hard to see ...
use @camperbot's explanation to format your code ...
explain format
CamperBot
@camperbot
Feb 18 2016 04:42

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Andrea R.
@amr08
Feb 18 2016 04:42
Ok i've tried it many ways so this is not correct at all
hemanth mannem
@hemanthmannem
Feb 18 2016 04:42
My code is correct , the isuue is with browser , it didnt reloaded
Andrea R.
@amr08
Feb 18 2016 04:42
<div class="row">
<div class="col-xs-4">
<button class="btn">Like</button>
<button class="btn">Info</button>
<button class="btn">Delete</button>
</div>
hemanth mannem
@hemanthmannem
Feb 18 2016 04:42
thanks buddy
bitgrower
@bitgrower
Feb 18 2016 04:42
well, @aroche08 -- if that's all of your code, you're missing a closing </div>
Andrea R.
@amr08
Feb 18 2016 04:42
"Each of your Bootstrap buttons should be nested within its own div element with the class col-xs-4." I've tried it a few times
bitgrower
@bitgrower
Feb 18 2016 04:42
@hemanthmannem -- I was about to suggest ..
@aroche08 -- did you read what I wrote ?
you are missing a closing </div> you have two <div>s and only one </div>
Andrea R.
@amr08
Feb 18 2016 04:43
<div class="row">
<div class="col-xs-4">
<button class="btn">Like</button>
<button class="btn">Info</button>
<button class="btn">Delete</button>
</div>
</div>
still not letting me get by
bitgrower
@bitgrower
Feb 18 2016 04:44
right ... because you have to enclose EACH line in the <div class> </div> pair
EACH one
DJ
@qualitymanifest
Feb 18 2016 04:44
with col-xs-4... so that there are 12 columns total
bitgrower
@bitgrower
Feb 18 2016 04:44
says so right in the instructions ... I'm pretty sure ... :)
thanks @qualitymanifest -- I did the bootstrap challenges just fine ... but when I went to use them in my web projects, I realized I needed more help -- the part about adding up to 12 helped a great deal ... thanks for the reminder ...
CamperBot
@camperbot
Feb 18 2016 04:45
bitgrower sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 971 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 18 2016 04:46
@bitgrower thanks for helping everyone
CamperBot
@camperbot
Feb 18 2016 04:46
qualitymanifest sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 559 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
Feb 18 2016 04:47
yw -- I figured it helps me as well ... I was reading about one of the coding camps, and they talked about how their students help teach the next cohort after a certain amount of time ... and that peeps with that experience actually get MUCH better paying jobs ...
DJ
@qualitymanifest
Feb 18 2016 04:48
@bitgrower yeah. sometimes i wonder if i'm wasting time by hanging out in the chat. but then i think about it and realize... i can spot problems in code much, much faster now
bitgrower
@bitgrower
Feb 18 2016 04:49
but I think I scared them all off now ... :( @aroche08, @hemanthmannem & @MikeBeers ...
MikeBeers
@MikeBeers
Feb 18 2016 04:49
@bitgrower sorry kid was crying
var color = ["red","orange","yellow","green","blue","indigo","violet"];
var quotes = ['<i class="fa fa-quote-left"></i>quote 1', '<i class="fa fa-quote-left"></i>quote 2', '<i class="fa fa-quote-left"></i>quote 3', '<i class="fa fa-quote-left"></i>quote 4', '<i class="fa fa-quote-left"></i>quote 5' ];

var newColor = "";
//var random = function () {



//};

 $( "button" ).click(function() {  
   var randomNum =[Math.floor(Math.random()* 7)];
  newColor = color[randomNum];
  $("body").css("background-color", newColor);
  $("#target3").css("color", newColor);
   $("#target2").html(quotes[Math.floor(7*Math.random())])
});
bitgrower
@bitgrower
Feb 18 2016 04:49
awww ... :)
MikeBeers
@MikeBeers
Feb 18 2016 04:49
BAM
bitgrower
@bitgrower
Feb 18 2016 04:50
works now ?!?
MikeBeers
@MikeBeers
Feb 18 2016 04:50
lol well at least that part
bitgrower
@bitgrower
Feb 18 2016 04:50
LOL ...
Andrea R.
@amr08
Feb 18 2016 04:50
Nope still over here with problems. lol
bitgrower
@bitgrower
Feb 18 2016 04:51
sorry :( @aroche08 -- post your code ?
Andrea R.
@amr08
Feb 18 2016 04:52
No thanks for your help - I just started here 4 days ago.
Now i'm just putting random stuff down lol: <div class="row">
<div class="col-xs-4">
<button class="btn">Like</button>
<div class="col-xs-4"></div>
<button class="btn">Info</button>
<div class="col-xs-4"></div>
<button class="btn">Delete</button>
</div>
</div>
bitgrower
@bitgrower
Feb 18 2016 04:53
so @MikeBeers -- just a word of caution, your newColor is now a global variable ... I'm not quite sure how to do it properly ... but globals are to be avoided
Thomas Noe
@t3h2mas
Feb 18 2016 04:53
@aroche08 your divs aren't wrapping anything there buddy
@MikeBeers what are you trying to do
bitgrower
@bitgrower
Feb 18 2016 04:53
<div class="col-xs-4">
<button class="btn">Like</button>
you need to have a closing </div> after these 2 lines ...
@t3h2mas -- create not only a random quote, but a random color
<div class="col-xs-4"></div> <--- this does nothing ...
<div> -- door opens, put some stuff in </div> door closes
Andrea R.
@amr08
Feb 18 2016 04:55
ugh! of all things... got it. Thanks guys
Thomas Noe
@t3h2mas
Feb 18 2016 04:55
Why not 1. use one random number for both indexes, and 2. move the repeated html out of the array. That's what I see right off the bat... What happens when you run the code @MikeBeers
MikeBeers
@MikeBeers
Feb 18 2016 04:56
moved new color inside click function
bitgrower
@bitgrower
Feb 18 2016 04:56
yeah, but see how the syntax coloring is white ... that means it's a global variable...
Thomas Noe
@t3h2mas
Feb 18 2016 04:56
@aroche08 no problem. make sure you really understand what divs do before you keep going, or else when you get to the projects you'll be lost
bitgrower
@bitgrower
Feb 18 2016 04:56
you only make it local by sticking a var in front of it ... (somewhere)
@aroche08 -- it can also help if you ident your code ...
MikeBeers
@MikeBeers
Feb 18 2016 04:57
 $( "button" ).click(function() {  
   var newColor = "";
   var randomNum =[Math.floor(Math.random()* 7)];
  newColor = color[randomNum];
  $("body").css("background-color", newColor);
  $("#target3").css("color", newColor);
   $("#target2").html(quotes[Math.floor(7*Math.random())])
});
MrSomebodystopme
@MrSomebodystopme
Feb 18 2016 04:57
  }
  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
  }
</style>

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

<img class="smaller-image" class1="thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
help
CamperBot
@camperbot
Feb 18 2016 04:57

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
  • Algorithm BONFIRENAME info on a Algorithm

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

bitgrower
@bitgrower
Feb 18 2016 04:58
<div>
   <div class="row">
        <div class =" some bootstrap class">
        </div>
   </div>
</div>
Thomas Noe
@t3h2mas
Feb 18 2016 04:58
@MikeBeers what happens when it runs
Andrea R.
@amr08
Feb 18 2016 04:58
@bitgrower Yea i need better code "etiquette" They aren't teaching that here so i'm just winging it. Do you know of a good resource to help with structure?
bitgrower
@bitgrower
Feb 18 2016 04:58
hmmm ... I think there MIGHT be some articles on it in the FCC wiki
Thomas Noe
@t3h2mas
Feb 18 2016 04:58
@aroche08 a good text editor/IDE will help. CodePen also has the 'tidy' button
MikeBeers
@MikeBeers
Feb 18 2016 04:58
@t3h2mas I was having an issue with
css values not being the same color.
bitgrower
@bitgrower
Feb 18 2016 04:59
@MrSomebodystopme -- is that your complete code ?
Thomas Noe
@t3h2mas
Feb 18 2016 04:59
Do you have a codepen or something @MikeBeers
Andrea R.
@amr08
Feb 18 2016 04:59
Awesome i'll check those out
Thomas Noe
@t3h2mas
Feb 18 2016 05:00
@MikeBeers what elements are supposed to match colors
bitgrower
@bitgrower
Feb 18 2016 05:00
@aroche -- basically -- when you come to an if, or a loop, indent your code a few spaces in ... It helps to show which things are "contained" within the if or loop
MrSomebodystopme
@MrSomebodystopme
Feb 18 2016 05:01
yeah @bitgrower
MikeBeers
@MikeBeers
Feb 18 2016 05:01
I was working on trying to get the background color and the color of the twitter icon to be the same color
bitgrower
@bitgrower
Feb 18 2016 05:01
@aroche08 -- they probably don't cover it because HOW to format code is a "religious" issue among software folks .. they get very heated about what's right ...
MrSomebodystopme
@MrSomebodystopme
Feb 18 2016 05:01
nothing is happening
bitgrower
@bitgrower
Feb 18 2016 05:01
@MrSomebodystopme well ... what is that curly brace on your first line ... it looks kinda lonely ...
MikeBeers
@MikeBeers
Feb 18 2016 05:01
until just now they were two random colors but not the same color at the same time
Andrea R.
@amr08
Feb 18 2016 05:01
@bitgrower -LOL good to know
Thomas Noe
@t3h2mas
Feb 18 2016 05:02
@MikeBeers so you want the twitter button to match the background color?
MikeBeers
@MikeBeers
Feb 18 2016 05:02
now I need to work on getting the randoms numbers to not be the same twice in a row
bitgrower
@bitgrower
Feb 18 2016 05:02
kinda like Mac vs Windows vs Linux ... other topics sure to create a lot of energy: best programming language, best editor ...
Thomas Noe
@t3h2mas
Feb 18 2016 05:02
Because that happens when I run it
MikeBeers
@MikeBeers
Feb 18 2016 05:02
@t3h2mas correct
it was now just adjusted to this
bitgrower
@bitgrower
Feb 18 2016 05:03
so ... did you get it to work okay, now @aroche08 ?
Andrea R.
@amr08
Feb 18 2016 05:04
Yes thanks moving along smoothly now! :smile:
bitgrower
@bitgrower
Feb 18 2016 05:04
YAY!!!!
Roy Liu
@pololkk2000
Feb 18 2016 05:04

challenge name:Link to External Pages with Anchor Elements
content:

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

<style>

.red-text {color: red;}
.smaller-image {width: 100px;}
.thick-green-border {border-color: green;border-width: 10px;border-style: solid;border-radius: 50%;}
h2 {font-family: Lobster, Monospace;}
p {font-size: 16px;font-family: Monospace;}

</style>

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

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

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

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

I don't know what's going on? I can't pass it.

MikeBeers
@MikeBeers
Feb 18 2016 05:04
Thanks bitgrower
@t3h2mas thanks
CamperBot
@camperbot
Feb 18 2016 05:05
mikebeers sends brownie points to @t3h2mas :sparkles: :thumbsup: :sparkles:
:star: 130 | @t3h2mas | http://www.freecodecamp.com/t3h2mas
bitgrower
@bitgrower
Feb 18 2016 05:05
you are welcome @MikeBeers -- if you want to bestow brownie points, you have to put an @ in front of my name ... :)
MikeBeers
@MikeBeers
Feb 18 2016 05:06
@bitgrower thanks
CamperBot
@camperbot
Feb 18 2016 05:06
mikebeers sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 560 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
Feb 18 2016 05:06
:)
thank you, @MikeBeers
CamperBot
@camperbot
Feb 18 2016 05:06
bitgrower sends brownie points to @mikebeers :sparkles: :thumbsup: :sparkles:
:star: 269 | @mikebeers | http://www.freecodecamp.com/mikebeers
Luu Nguyen
@nnluukhtn
Feb 18 2016 05:06
lol :D
bitgrower
@bitgrower
Feb 18 2016 05:07
@pololkk2000 -- if it's not working, I would look for some unmatched html elements ...

here we go ...

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

looks like there's a missing <a href ...>

sudheerswamy
@sudheerswamy
Feb 18 2016 05:10

<h2 id="cat-photo-app">

Give your form element the id cat-photo-form.

i'm stuck here...
Jon Selig
@JonSelig
Feb 18 2016 05:11
Any tips on how I can make the buttons on this page go to 2 rows of 2 isntead of one row of 3 and one row of 1 when I make the width small? http://codepen.io/JonSelig/pen/xZeMGB
Roy Liu
@pololkk2000
Feb 18 2016 05:13
@bitgrower sry, i didn't completely paste it on help page. I have done to fix it up.
Liam Bang
@Liam345
Feb 18 2016 05:13
arr=arr.replace(/[^A-Za-z0-9]/g,'');
Can anyone explain me this line of code? Why is it different from arr=arr.replace(/[^A-Z,a-z,0-9]/g,'');
And also what difference does /g (global variable) make?
bitgrower
@bitgrower
Feb 18 2016 05:14
can you repost @pololkk2000
Thomas Noe
@t3h2mas
Feb 18 2016 05:14
g replaces all instances instead of the first
bitgrower
@bitgrower
Feb 18 2016 05:14
@JonSelig -- the mysteries of bootstrap -- I ain't even close to mastering that puppy yet
Roy Liu
@pololkk2000
Feb 18 2016 05:15
@bitgrower actually it works before 2 sec. thx
CamperBot
@camperbot
Feb 18 2016 05:15
pololkk2000 sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 561 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
Feb 18 2016 05:16
awesome!!!!
that was easy ... LOL ...
Valeesi
@Valeesi
Feb 18 2016 05:17

RandomQuoteMachine I am stuck with trying to get the getElementIdBy(".text").innerHTML to work with my button. Thank you for any help that I could get. My code: http://codepen.io/Valeesi/pen/ZQZOQE

bitgrower
@bitgrower
Feb 18 2016 05:17
@Liam345 -- like @t3h2mas said ... g replaces all ... it's spoken of as "global replace"
I don't know whether this would be of help to all you codepeners ... but there IS a frontend room ... might help for these projects (a little bit more focussed)
help rooms
CamperBot
@camperbot
Feb 18 2016 05:18

:point_right: help rooms [wiki]

Help Rooms

Choose the right room for your question!

:pencil: read more about help rooms on the FCC Wiki

Valeesi
@Valeesi
Feb 18 2016 05:18
Thank you!
bitgrower
@bitgrower
Feb 18 2016 05:20
yw
DJ
@qualitymanifest
Feb 18 2016 05:20
@Valeesi you've got getElementIdBy(".text") there's a few things wrong here. it needs to be preceeded by document, it's getElementById not getElementIdBy and it's "text" not ".text"
@Valeesi so document.getElementById("idGoesHere")
@Valeesi it's a little simpler with jQuery. $("#idGoesHere").text(variableGoesHere)
blackwaterx
@blackwaterx
Feb 18 2016 05:22
I try to put two image side by side and thats doent work. I do this <img src="jjfhvfhf" src="fvfjfjv"> it is good ?
bitgrower
@bitgrower
Feb 18 2016 05:23
I may have chased @Valeesi off to the fe room, @qualitymanifest
Taurus Colvin
@colvint
Feb 18 2016 05:24
@blackwaterx what challenge?
blackwaterx
@blackwaterx
Feb 18 2016 05:24
78
Taurus Colvin
@colvint
Feb 18 2016 05:25
what’s the name of the challenge?
blackwaterx
@blackwaterx
Feb 18 2016 05:25
Make Images Mobile Responsive
Taurus Colvin
@colvint
Feb 18 2016 05:26
reading...
doesn’t say side-by-side?
<img class="img-responsive” src=“first.jpg”><img class="img-responsive” src=“second.jpg”>
one src attribute per image
David Enos
@bluedangerforyou
Feb 18 2016 05:27
can someone look at my pen ? I am not sure what is happening here regarding my background image
please
blackwaterx
@blackwaterx
Feb 18 2016 05:28
ok good thanks @colvint
CamperBot
@camperbot
Feb 18 2016 05:28
blackwaterx sends brownie points to @colvint :sparkles: :thumbsup: :sparkles:
:star: 54 | @colvint | http://www.freecodecamp.com/colvint
David Enos
@bluedangerforyou
Feb 18 2016 05:28
The bottom is white but should be filled in with image
like it is cut off
Taurus Colvin
@colvint
Feb 18 2016 05:28
@blackwaterx :+1:
David Enos
@bluedangerforyou
Feb 18 2016 05:28
I used background-size: 100%
I havent done any responsive coding yet so if you look at the pen in browser
Taurus Colvin
@colvint
Feb 18 2016 05:30
@bluedangerforyou background image goes to the bottom in chrome (for me)
what browser are you on?
David Enos
@bluedangerforyou
Feb 18 2016 05:30
ok, I am working on a different pc then when I had made it earlier and I am getting cut off
Chrome
Taurus Colvin
@colvint
Feb 18 2016 05:31
hmm k
weird
David Enos
@bluedangerforyou
Feb 18 2016 05:31
is there any feed back? Does it look ok?
@colvint thanks!
CamperBot
@camperbot
Feb 18 2016 05:31
bluedangerforyou sends brownie points to @colvint :sparkles: :thumbsup: :sparkles:
:star: 55 | @colvint | http://www.freecodecamp.com/colvint
Taurus Colvin
@colvint
Feb 18 2016 05:32
are you into design or mainly wanting to learn to code?
(either is ok obviously)
David Enos
@bluedangerforyou
Feb 18 2016 05:32
coding
I am a terrible designer
Taurus Colvin
@colvint
Feb 18 2016 05:32
ya, me too
so, the design is a bit 90s — but ah well — right?
David Enos
@bluedangerforyou
Feb 18 2016 05:33
haha
its the background
Taurus Colvin
@colvint
Feb 18 2016 05:33
would that we had that design eye :smile:
David Enos
@bluedangerforyou
Feb 18 2016 05:33
for the wolfs of wall street
Taurus Colvin
@colvint
Feb 18 2016 05:33
right haha
have you done the bootstrap challenges yet?
i ask because boostrap is a great help to us design-challenged coders
really imposes a clean / responsive ethic
you could go full 90s and bring back the <blink> tag
David Enos
@bluedangerforyou
Feb 18 2016 05:36
lol
I am at java scripting
Sam
@SamOBry
Feb 18 2016 05:37
how do i give an element a unique id?
David Enos
@bluedangerforyou
Feb 18 2016 05:37
I intend to go back and redo the lessons so i can recall all the details
Victor Cho
@victorc25
Feb 18 2016 05:38

I'm stumped on getting the p tag font size 16px. Can some one help? ```<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 {font-size: 16px;}> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
```

bitgrower
@bitgrower
Feb 18 2016 05:39
I went thru the lessons the other day ... html/css, jquery, bootstrap ... one other I think (didn't hit the JSON section) ... did it all in a few hours ...
Victor Cho
@victorc25
Feb 18 2016 05:39
  .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 {font-size: 16px;}> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Taurus Colvin
@colvint
Feb 18 2016 05:41
@bluedangerforyou :+1:
@victorc25
.red-text {
  color: red;
}
p {
  font-size: 16px;
}
DJ
@qualitymanifest
Feb 18 2016 05:41
@victorc25 in your style, you have your p inside your red-text. also i think you need to get rid of your inline styles, and by that i mean this <p **{font-size: 16px;}** >
Taurus Colvin
@colvint
Feb 18 2016 05:43
css doesn’t support nested styles
Sam
@SamOBry
Feb 18 2016 05:44
guys im on bootstrap on give each element a unique ID.. I am having a hard time figuring out where to put the targets
bitgrower
@bitgrower
Feb 18 2016 05:44
only cascading ones ... although it could depend on your def of "nested" , I s'pose
Taurus Colvin
@colvint
Feb 18 2016 05:44
@qualitymanifest agree, good point about removing the inline styles
bitgrower
@bitgrower
Feb 18 2016 05:44
got some code you can post @SamOBry ?
Sam
@SamOBry
Feb 18 2016 05:45
i wish i could but I never know how to
knew*
Victor Cho
@victorc25
Feb 18 2016 05:45
@qualitymanifest @colvint thanks for you guys help
CamperBot
@camperbot
Feb 18 2016 05:45
victorc25 sends brownie points to @qualitymanifest and @colvint :sparkles: :thumbsup: :sparkles:
:star: 974 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 56 | @colvint | http://www.freecodecamp.com/colvint
bitgrower
@bitgrower
Feb 18 2016 05:46
no time like the present, @SamOBry ...
DJ
@qualitymanifest
Feb 18 2016 05:46
@SamOBry copy and paste. to do it properly:
help format
CamperBot
@camperbot
Feb 18 2016 05:46

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Victor Cho
@victorc25
Feb 18 2016 05:46
I understand what I did wrong now
bitgrower
@bitgrower
Feb 18 2016 05:46
follow @camperbot's instructions to the t ...
Taurus Colvin
@colvint
Feb 18 2016 05:46
@victorc25, as @bitgrower suggests, css does support cascading styles
.red-text p {
  color: red;
  font-size: 16px;
}
after all CSS == cascading style sheets :D
Victor Cho
@victorc25
Feb 18 2016 05:47
good to know
Sam
@SamOBry
Feb 18 2016 05:47
<h1> test</h1>
Victor Cho
@victorc25
Feb 18 2016 05:47
thanks! @bitgrower
CamperBot
@camperbot
Feb 18 2016 05:47
victorc25 sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
Taurus Colvin
@colvint
Feb 18 2016 05:47
(but that doesn’t apply to you here…)
CamperBot
@camperbot
Feb 18 2016 05:47
:star: 562 | @bitgrower | http://www.freecodecamp.com/bitgrower
bitgrower
@bitgrower
Feb 18 2016 05:47
hahahahaha ... good to know? VITAL to know ...
Sam
@SamOBry
Feb 18 2016 05:47
<h1> test </h1>
DJ
@qualitymanifest
Feb 18 2016 05:48
@SamOBry so that's how to paste a single line. to post multiple lines you'll need 3 backticks, on separate lines, above and below your code
bitgrower
@bitgrower
Feb 18 2016 05:48
well, that does some things ... but doesn't get you the nice syntax coloring ..
Victor Cho
@victorc25
Feb 18 2016 05:48
@bitgrower sorry I'm new to code so I'm still learning
thanks for the advice!
Taurus Colvin
@colvint
Feb 18 2016 05:49
@victorc25 you’re doing fine :smile:
Sam
@SamOBry
Feb 18 2016 05:49
```<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
</div>
</div>
sorry
<div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="col-xs-6"> <h4>#left-well</h4> <div class="well" id="left-well"> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> </div> </div> <div class="col-xs-6"> <h4>#right-well</h4> <div class="well" id="right-well"> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> <button class="btn btn-default target"></button> </div> </div> </div> </div>
DJ
@qualitymanifest
Feb 18 2016 05:49
This message was deleted
Victor Cho
@victorc25
Feb 18 2016 05:49
@colvint appreciate the encouragement!
Taurus Colvin
@colvint
Feb 18 2016 05:50
@victorc25 we all started somewhere :+1:
DJ
@qualitymanifest
Feb 18 2016 05:50
@SamOBry separate lines above and below the code. try holding shift and enter, to get a new line
backtick backtick backtick. shift+enter
code
backtick backtick backtick
bitgrower
@bitgrower
Feb 18 2016 05:50
true dat @colvint
Sam
@SamOBry
Feb 18 2016 05:51

```<div class="container-fluid">

<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">

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

<h4>#left-well</h4>

<div class="well" id="left-well">

<button class="btn btn-default target"></button>

<button class="btn btn-default target"></button>

<button class="btn btn-default target"></button>

</div>

</div>

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

<h4>#right-well</h4>

<div class="well" id="right-well">

<button class="btn btn-default target"></button>

<button class="btn btn-default target"></button>

<button class="btn btn-default target"></button>

</div>
</div>
</div>
</div>```

Victor Cho
@victorc25
Feb 18 2016 05:51
Agreed! @colvint
bitgrower
@bitgrower
Feb 18 2016 05:52
@victorc25 -- np -- no worries -- just ... it can be quite a garden of curiosities & misunderstandings & bugs .. that cascading stuff ..
Sam
@SamOBry
Feb 18 2016 05:52
lol im such a noob :(
I almost got it what did i do different for the box that turned black
DJ
@qualitymanifest
Feb 18 2016 05:53
:point_up: February 17, 2016 10:50 PM @SamOBry
Taurus Colvin
@colvint
Feb 18 2016 05:53
@SamOBry if you can get those triple backticks on their own line...
you should be golden
DJ
@qualitymanifest
Feb 18 2016 05:53
platinum
Taurus Colvin
@colvint
Feb 18 2016 05:53
that too
bitgrower
@bitgrower
Feb 18 2016 05:54
and ... best yet ... once you got it, you'll have it down ...
DJ
@qualitymanifest
Feb 18 2016 05:54
:wink2:
bitgrower
@bitgrower
Feb 18 2016 05:54
it's not something you need to keep re-learning ...
Sam
@SamOBry
Feb 18 2016 05:54
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>
Taurus Colvin
@colvint
Feb 18 2016 05:54
boom
Sam
@SamOBry
Feb 18 2016 05:54
F YEAHHHHHH <3
DJ
@qualitymanifest
Feb 18 2016 05:54
@SamOBry success!
Sam
@SamOBry
Feb 18 2016 05:55
lol that was cooler than my actually question im trying to figure out
DJ
@qualitymanifest
Feb 18 2016 05:55
@SamOBry so, what challenge is this?
Victor Cho
@victorc25
Feb 18 2016 05:55
@bitgrower I'm slowly starting to understand cascading more. It's challenging but at the same time fun learning with such a supportive community
Sam
@SamOBry
Feb 18 2016 05:55
give each element a unnique id
under bootstrap
bitgrower
@bitgrower
Feb 18 2016 05:57
that is, actually , the def of id ... something gets an id when it is to only be used once ona page ... use one more than once and you will confuse things considerably ...
DJ
@qualitymanifest
Feb 18 2016 05:57
@SamOBry adding an ID is the same process as adding a class. example:
<button class="btn btn-default target" id="target1"></button>
Sam
@SamOBry
Feb 18 2016 05:57
i did that -_-
ill try again
DJ
@qualitymanifest
Feb 18 2016 05:58
@SamOBry i dont see that in the code you pasted. note the id="target1" or id="targetSOMENUMBER"
sudheerswamy
@sudheerswamy
Feb 18 2016 05:58

<style>
body {
color: pink;
font-family: Monospace;
color: green;
}
pink-text{
color: pink;
}

</style>

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

Sam
@SamOBry
Feb 18 2016 05:58
yeah I reset the code because I wasnt sure what went wrong.
one sec..
sudheerswamy
@sudheerswamy
Feb 18 2016 05:58

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

Give your h1 element the class of pink-text.

DJ
@qualitymanifest
Feb 18 2016 05:58
ah
sudheerswamy
@sudheerswamy
Feb 18 2016 05:58
need help!!
Taurus Colvin
@colvint
Feb 18 2016 05:59
@sudheerswmay you’re missing the dot on your pink-text css selector...
should be .pink-text
DJ
@qualitymanifest
Feb 18 2016 05:59
@sudheerswmay and i think you shouldnt add color:pink; to body
sudheerswamy
@sudheerswamy
Feb 18 2016 05:59
wow @colvint Thanks a lot
CamperBot
@camperbot
Feb 18 2016 05:59
sudheerswmay sends brownie points to @colvint :sparkles: :thumbsup: :sparkles:
:star: 57 | @colvint | http://www.freecodecamp.com/colvint
sudheerswamy
@sudheerswamy
Feb 18 2016 06:00
@qualitymanifest thanks bro...
CamperBot
@camperbot
Feb 18 2016 06:00
sudheerswmay sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 975 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Sam
@SamOBry
Feb 18 2016 06:00
@qualitymanifest thanks for helping me. I realized my browser stopped working on that particular screen and it wouldn't allow me to see if it was correct or not. Thank you for the help homie
CamperBot
@camperbot
Feb 18 2016 06:00
samobry sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 976 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 18 2016 06:02
@SamOBry ahh. yeah sometimes FCC has problems like that, you just need to copy your code, reset, and try again.
Larry Simiyu
@LarrySimiyu
Feb 18 2016 06:10
hello need some quick help with something. making a list that has ten lines, but I need the user input to be rounded up and divisible by 5.. so say they enter 43 i need the list to start at 45.. does anyone have any idea of how I can manage this.
Vickrant Earnest
@vickrantearnest
Feb 18 2016 06:11
let me try
Maulik Darji
@maulikdarji
Feb 18 2016 06:16
@LarrySimiyu Take the user input and do remainder operation. Then add required number to the remainder to make it 5;
i.e. user inputs - 43;
43%5 = 3; so you need to add 2 (5-remainder) to make it 45;`47%5 = 2; so you need to add 3 (5-remainder) to make it 50;`69%5 = 4; so you need to add 1 (5-remainder) to make it 70;`
@LarrySimiyu also you can subtract the remainder directly, if you want to roundup to lower value; i.e. 43%5 = 3 so subtract 3 from input, 43-3=40; makes it divisible by 5
Larry Simiyu
@LarrySimiyu
Feb 18 2016 06:21
@maulikdarji ahh makes sense, its always the simplest solutions, but thank you good sir, back to doing this c++ project lol
CamperBot
@camperbot
Feb 18 2016 06:21
larrysimiyu sends brownie points to @maulikdarji :sparkles: :thumbsup: :sparkles:
:star: 469 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
Maulik Darji
@maulikdarji
Feb 18 2016 06:22
@LarrySimiyu :smile:
Larry Simiyu
@LarrySimiyu
Feb 18 2016 06:25
@maulikdarji hey so what if I want to round up instead of down
like not 43 to 40 but 43 to 45
wait nvm
Catherine Kim
@Catherinesjkim
Feb 18 2016 06:49
Hi! I need help with "Learn how Script Tags and Document Ready Work"

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

Pradeep CE
@cepradeep
Feb 18 2016 06:52
@Catherinesjkim Hi, use backticks (below Esc key on most keyboards) to format your code.
wiki format
CamperBot
@camperbot
Feb 18 2016 06:52

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Jon Selig
@JonSelig
Feb 18 2016 06:53
@Catherinesjkim Youre first line should be <script> $(document).ready(function() { });</script>
Catherine Kim
@Catherinesjkim
Feb 18 2016 06:55
before <!-- Only change code above this line. --> or after?
@JonSelig
Jon Selig
@JonSelig
Feb 18 2016 06:56
The first line in the code you pasted
And it should be above that comment
Catherine Kim
@Catherinesjkim
Feb 18 2016 06:57
still not working...
Create a script element making sure it is valid and has a closing tag.
what is a closing tag?
Jon Selig
@JonSelig
Feb 18 2016 06:58
</script>
or }
SuhasHosamani
@SuhasHosamani
Feb 18 2016 06:58
</tag> @Catherinesjkim
Jon Selig
@JonSelig
Feb 18 2016 06:58
depending on which closing tag
actually } isn't a tag..it means the </script>
Catherine Kim
@Catherinesjkim
Feb 18 2016 07:00

'''<!-- Only change code above this line. -->

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

CamperBot
@camperbot
Feb 18 2016 07:00
:bulb: to format code use backticks! ``` more info
Jon Selig
@JonSelig
Feb 18 2016 07:01
You need to move the code you added above the comment
96street
@96street
Feb 18 2016 07:02
anyone
?
How come ".line-stories tr:first-child {
margin-right: 20px;} doesn't work here? http://codepen.io/anon/pen/YwMBEq?editors=1100
Catherine Kim
@Catherinesjkim
Feb 18 2016 07:03
still not working...
David Rivera
@davidrivera1989
Feb 18 2016 07:05

<style>
h2 {color:blue;}
</style>

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

Jon Selig
@JonSelig
Feb 18 2016 07:05
@Catherinesjkim what part is is saying you're not doing?
David Rivera
@davidrivera1989
Feb 18 2016 07:05
h2 element should be blue
stuck lol
Catherine Kim
@Catherinesjkim
Feb 18 2016 07:05
@JonSelig how do i know that the script element is valid?
Create a script element making sure it is valid and has a closing tag.
Jon Selig
@JonSelig
Feb 18 2016 07:06
@davidrivera1989 Do you have an h2 element that you didn't paste in that code? haha
@Catherinesjkim Try refreshing the page and pasting these 3 lines at the top. It should be working
  $(document).ready(function() {});
</script>
Hmm it didnt paste all of the lines..
<script>
  $(document).ready(function() {});
</script>
there
Catherine Kim
@Catherinesjkim
Feb 18 2016 07:08
it worked. Thank you! @JonSelig
CamperBot
@camperbot
Feb 18 2016 07:08
catherinesjkim sends brownie points to @jonselig :sparkles: :thumbsup: :sparkles:
:star: 195 | @jonselig | http://www.freecodecamp.com/jonselig
Jon Selig
@JonSelig
Feb 18 2016 07:09
No problem
Josh Fisk
@JoshFisk
Feb 18 2016 07:10
Are the algorithm problems supposed to be sorted by difficulty? I don't think they are.
Nick Robson
@nickrobson
Feb 18 2016 07:11
@JoshFisk The categories are meant to be by difficulty, but inside them they aren't.
@JoshFisk Plus, it's practically impossible to judge which are harder, since people will solve them in different ways (some of which are easier than others).
Josh Fisk
@JoshFisk
Feb 18 2016 07:12
I solved the palindrome thing... then faced the challenge of repeating a string...
bitgrower
@bitgrower
Feb 18 2016 07:12
so repeating a string was easier for you, @JoshFisk ?
Josh Fisk
@JoshFisk
Feb 18 2016 07:13
Uhuh
96street
@96street
Feb 18 2016 07:13
How come: .line-stories tr:first-child {
margin-right: 20px;} doesn't work here? http://codepen.io/anon/pen/YwMBEq?editors=1100
Josh Fisk
@JoshFisk
Feb 18 2016 07:13
Much easier then the palindrome
function repeat(str, num) { var result = ""; for(var i = 0;i<num;i++){ result+=str; } return result; }
bitgrower
@bitgrower
Feb 18 2016 07:13
palindrome can be very, VERY easy ...
96street
@96street
Feb 18 2016 07:13
someone pls look at my code ^
Josh Fisk
@JoshFisk
Feb 18 2016 07:14
@bitgrower I probably overkilled it by a lot then.
bitgrower
@bitgrower
Feb 18 2016 07:14
I'm not up to speed on my frontend challenges @96street -- so I'm afraid I can't be much help ...
96street
@96street
Feb 18 2016 07:14
what u mean? @bitgrower
oh
filsledi
@filsledi
Feb 18 2016 07:14
...........................
96street
@96street
Feb 18 2016 07:14
give it a go....
;P
bitgrower
@bitgrower
Feb 18 2016 07:15
lol ... I may have the first time, too @JoshFisk ... I keep trying to improve ...I go back and improve my answers as I learn more ...
others which can be trivial are confirm the ending, falsy bouncer ...
Josh Fisk
@JoshFisk
Feb 18 2016 07:15
This is my palindrome answer function palindrome(str) { str=str.toLowerCase(); var start=-1; var end=str.length; while(start!=end){ do{ start++; }while(!isLowerLetterOrNumeric(str[start])&&start<end); do{ end--; }while(!isLowerLetterOrNumeric(str[end])&&end>start); if(start>=end){ return true; } if(str[start]!==str[end]){ return false; } } return true; } function isLowerLetterOrNumeric(str){ if(str!==" "&&!isNaN(str)){ return true; } var code = str.charCodeAt(0); return (code >= 97) && (code <= 122); }
It's compacting it for some reason...
bitgrower
@bitgrower
Feb 18 2016 07:17
try starting iwth a line containing only ```js -- add your code,, then follow with a line containing only 3 backticks
Josh Fisk
@JoshFisk
Feb 18 2016 07:17
function palindrome(str) {
  str=str.toLowerCase();
  var start=-1;
  var end=str.length;
  while(start!=end){
    do{
      start++;
    }while(!isLowerLetterOrNumeric(str[start])&&start<end);
    do{
      end--;
    }while(!isLowerLetterOrNumeric(str[end])&&end>start);
    if(start>=end){
      return true;
    }
    if(str[start]!==str[end]){
      return false;
    }
  }
  return true;
}
function isLowerLetterOrNumeric(str){
  if(str!==" "&&!isNaN(str)){
    return true;
  }
  var code = str.charCodeAt(0);
  return (code >= 97) && (code <= 122);
}
bitgrower
@bitgrower
Feb 18 2016 07:17
my first recommendation would be to use str.replace ... :)
Josh Fisk
@JoshFisk
Feb 18 2016 07:18
@bitgrower Yeah...I could do that : )
bitgrower
@bitgrower
Feb 18 2016 07:18
you're doing a lot of low level stuff that replace could handle for you completely ...
good practice for regex ... regexes are your friend!
Nick Robson
@nickrobson
Feb 18 2016 07:19
@JoshFisk Try this:
1) Find the middle index of the string
2a) Compare the nth char of the string to the nth last char
2b) If something doesn't match, it's not palindrome.
Josh Fisk
@JoshFisk
Feb 18 2016 07:19
@bitgrower Is it weird I find that more readable then a regex?
bitgrower
@bitgrower
Feb 18 2016 07:19
tell me that in 6 mos ... :)
Josh Fisk
@JoshFisk
Feb 18 2016 07:20
@nickrobson 1) It is finding the middle, it's moving in both directions. 2) It does all of that
Nick Robson
@nickrobson
Feb 18 2016 07:20
function palindrome(str) {
   str = str.toLowerCase().replace(/[^a-z0-9]/g, '');
   for (var i = 0, j = str.length >> 1; i < j; i++)
      if (str[i] != str[str.length-i-1])
         return false;
   return true;
}
That's a solution that works. :)
bitgrower
@bitgrower
Feb 18 2016 07:20
I like that, @nickrobson -- my first take was a variation on that ... used a for loop but quit when I reached halfway thru the string ...
Josh Fisk
@JoshFisk
Feb 18 2016 07:21
@nickrobson How is that going to work without lower-casing or removing the junk?
bitgrower
@bitgrower
Feb 18 2016 07:21
I like the ones with split("").reverse(). and a few other things ...
Maulik Darji
@maulikdarji
Feb 18 2016 07:21
@JoshFisk You can try String.split() Array.reverse() and the String.join() to reverse the whole string, and then compare it with the original string
cannelflow
@cannelflow
Feb 18 2016 07:21
hello @maulikdarji long time
Maulik Darji
@maulikdarji
Feb 18 2016 07:21
@cannelflow Hi
bitgrower
@bitgrower
Feb 18 2016 07:21
yeah, that one ... @maulikdarji
Nick Robson
@nickrobson
Feb 18 2016 07:21
@JoshFisk Modified to include that behaviour.
Maulik Darji
@maulikdarji
Feb 18 2016 07:22
@cannelflow hows it going at FCC?
sudheerswamy
@sudheerswamy
Feb 18 2016 07:23
<div class="container-fluid">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

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

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

.smaller-image {
width: 100px;
}

</style>
</div>
Nick Robson
@nickrobson
Feb 18 2016 07:23
You can also use:
function palindrome(str) {
   return (str = str.toLowerCase().replace(/\W/g, '')) == str.split('').reverse().join('');
}
sudheerswamy
@sudheerswamy
Feb 18 2016 07:23
nest all of our HTML in a div element with the class container-fluid.
help??
CamperBot
@camperbot
Feb 18 2016 07:24

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
  • Algorithm BONFIRENAME info on a Algorithm

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Josh Fisk
@JoshFisk
Feb 18 2016 07:24
@nickrobson I think the one you had before was better.
Nick Robson
@nickrobson
Feb 18 2016 07:24
function palindrome(str) {
   str = str.toLowerCase().replace(/\W/g, '');
   for (var i = 0, j = str.length >> 1; i < j; i++)
      if (str[i] != str[str.length-i-1])
         return false;
   return true;
}
function palindrome(str) {
   return (str = str.toLowerCase().replace(/\W/g, '')) == str.split('').reverse().join('');
}
bitgrower
@bitgrower
Feb 18 2016 07:24
@sudheerswmay -- by html, they kinda mean the stuff below </style>
Nick Robson
@nickrobson
Feb 18 2016 07:25
both work
so take your pick :3
Josh Fisk
@JoshFisk
Feb 18 2016 07:25
@nickrobson I like to pick something that is both nice, and fast. The second one is a turtle compared to the first one.
sudheerswamy
@sudheerswamy
Feb 18 2016 07:25
@bitgrower pardon me.. i dint get you
Nick Robson
@nickrobson
Feb 18 2016 07:26
the str.length >> 1 goes "set the last bit to 0, and half it"
bitgrower
@bitgrower
Feb 18 2016 07:26
do you see the line with </style> on it @sudheerswmay ?
Nick Robson
@nickrobson
Feb 18 2016 07:26
@sudheerswmay When they say "wrap it in a div", they mean your p, h2, etc tags, NOT your style tag
besides, your style tag should really be in your <head>
sudheerswamy
@sudheerswamy
Feb 18 2016 07:27
@nickrobson thank you
CamperBot
@camperbot
Feb 18 2016 07:27
sudheerswmay sends brownie points to @nickrobson :sparkles: :thumbsup: :sparkles:
:star: 388 | @nickrobson | http://www.freecodecamp.com/nickrobson
Nick Robson
@nickrobson
Feb 18 2016 07:27
and <div>s only belong in the <body>
Josh Fisk
@JoshFisk
Feb 18 2016 07:27
Thanks @nickrobson , I do like that trick with the >> in Javascript.
CamperBot
@camperbot
Feb 18 2016 07:27
joshfisk sends brownie points to @nickrobson :sparkles: :thumbsup: :sparkles:
:star: 389 | @nickrobson | http://www.freecodecamp.com/nickrobson
Nick Robson
@nickrobson
Feb 18 2016 07:27
@sudheerswmay @JoshFisk np!
bitgrower
@bitgrower
Feb 18 2016 07:27
well @nickrobson ... I think that's kinda the way FCC has the challenge set up, I wouldn't bee too hard on him ...
Nick Robson
@nickrobson
Feb 18 2016 07:28
@bitgrower Yeah, I know. I'm not trying to be a jerk... I just don't like that they say to put it in the <body>
some web browsers cache the <head> for a while, but not the <body>
so it's usually preferably to put css there
(and that's also a reason for why you should put your javascript at the end of the <body>)
(main reason is for page load time)
Josh Fisk
@JoshFisk
Feb 18 2016 07:30
@nickrobson The main reason is actually the loading order.
Nick Robson
@nickrobson
Feb 18 2016 07:32
@JoshFisk You can put JavaScript in your header, provided you use an event listener for onReady
Josh Fisk
@JoshFisk
Feb 18 2016 07:33
I know that
It's just the browser only does one thing at a time when it's parsing the dom
That is why anything drawing related needs to be above anything slow
Downloading is done async, but parsing elements is done in order
S.L. Ting
@palden
Feb 18 2016 07:35
@nickrobson @JoshFisk maybe fa or something won’t run if Js isn’t loaded before css, any such experience too?
Josh Fisk
@JoshFisk
Feb 18 2016 07:36
fa?
S.L. Ting
@palden
Feb 18 2016 07:36
font awesome :smile:
Samtoto
@Samtoto
Feb 18 2016 07:37
<script>window.console.log("hello,world")</script></body></html>
Josh Fisk
@JoshFisk
Feb 18 2016 07:38
@palden With scripts, you make sure their dependencies are on a line anywhere above them.
Robert Currie Owusu Afari
@RC31
Feb 18 2016 07:41
hello...
i need a little help
just started JQuery today

the lesson asked me to type <script>
$(document).ready(fuction(){

              });

</script>

and run
S.L. Ting
@palden
Feb 18 2016 07:42
@JoshFisk ok thanks, thought maybe i saw this error about js has to be loaded first to work, maybe i’m wrong or because I’m also using an offline editor atom...
CamperBot
@camperbot
Feb 18 2016 07:42
palden sends brownie points to @joshfisk :sparkles: :thumbsup: :sparkles:
:star: 251 | @joshfisk | http://www.freecodecamp.com/joshfisk
Robert Currie Owusu Afari
@RC31
Feb 18 2016 07:42
but i keep getting an error
it says Syntax error: Missing ) after argument
Josh Fisk
@JoshFisk
Feb 18 2016 07:43

@palden To use font awesome, you just stick this in the header

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

Pradeep CE
@cepradeep
Feb 18 2016 07:44
@RC31 It's function :)
Robert Currie Owusu Afari
@RC31
Feb 18 2016 07:45
ooooh thanks
how could i have missed that
thanks @pradeepce
CamperBot
@camperbot
Feb 18 2016 07:45
rc31 sends brownie points to @pradeepce :sparkles: :thumbsup: :sparkles:
:star: 347 | @pradeepce | http://www.freecodecamp.com/pradeepce
Pradeep CE
@cepradeep
Feb 18 2016 07:46
@RC31 haha, glad :)
cloudeigh
@cloudeigh
Feb 18 2016 07:46
// Setup
var myStorage = {
  "car": {
    "inside": {
      "glove box": "maps",
      "passenger seat": "crumbs"
     },
    "outside": {
      "trunk": "jack"
    }
  }
};

// Only change code below this line

var gloveBoxContents = myStorage.car.inside["glove box"]; // Change this line
What's wrong with my notation in the last line?
Getting :SyntaxError: Illegal return statement
S.L. Ting
@palden
Feb 18 2016 07:48
@JoshFisk Yes. i used this method before html codes :)
Samtoto
@Samtoto
Feb 18 2016 07:48
This message was deleted
Taylor
@tknovember
Feb 18 2016 07:49
Hi, I’m having an issue with the API request on my wikipedia project. I get an error saying a CORS header ‘access-control-allow-origin' is missing. Does anyone know what that means?
Pradeep CE
@cepradeep
Feb 18 2016 07:50
@got1up Please post all of your code?
Davinw
@Davinw
Feb 18 2016 07:50
@got1up You are mixing dot notation and bracket notation in your line
cloudeigh
@cloudeigh
Feb 18 2016 07:50
@Davinw But the example given on the left mixes it... ourStorage.cabinet["top drawer"].folder2; // "secrets"
Pradeep CE
@cepradeep
Feb 18 2016 07:51
@Davinw @got1up There is no problem in mixing the two notations. The code you have posted is correct. The problem should lie elsewhere.
Timofey Votyakov
@tvotyakov
Feb 18 2016 07:51
@got1up Why do you think the error in the last line? It looks like you have wrong "return" statement somewhere else in you code.
Pradeep CE
@cepradeep
Feb 18 2016 07:51
Note: the code works in Chrome DevTools' JS console.
cloudeigh
@cloudeigh
Feb 18 2016 07:52
// this is the example code from the sidebar
var ourStorage = {
  "desk": {
    "drawer": "stapler"
  },
  "cabinet": {
    "top drawer": { 
      "folder1": "a file",
      "folder2": "secrets"
    },
    "bottom drawer": "soda"
  }
}
ourStorage.cabinet["top drawer"].folder2;  // "secrets"
ourStorage.desk.drawer; // "stapler"
@tvotyakov That is the entirety of the code
Davinw
@Davinw
Feb 18 2016 07:53
Hmm guess I'm just stylistically used to only using one sort of accessor or the other at a time :)
cloudeigh
@cloudeigh
Feb 18 2016 07:54
I'm trying to google it but not having much luck, maybe I lack the vocabulary
Once I reset it and typed it out again it worked, some quirk of the challenge assessor
Thanks @Davinw @pradeepce @tvotyakov
CamperBot
@camperbot
Feb 18 2016 07:55
got1up sends brownie points to @davinw and @pradeepce and @tvotyakov :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for tvotyakov
:star: 348 | @pradeepce | http://www.freecodecamp.com/pradeepce
:star: 33 | @davinw | http://www.freecodecamp.com/davinw
Pradeep CE
@cepradeep
Feb 18 2016 07:55
@got1up Glad :)
Davinw
@Davinw
Feb 18 2016 07:56
Yw!
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:29
how can we convert a string into array?
Thomas Noe
@t3h2mas
Feb 18 2016 08:29
split
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:29
i did that but its not working
Iqbal Mohammedali
@iqpersonal
Feb 18 2016 08:30
hi
plz help to find out what is the error here

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

</style>

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

Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:30
function reverseString(str) {

var array=str.split();
var rev= array;
rev =array.reverse();
return rev;
} 
reverseString("hello");
Luu Nguyen
@nnluukhtn
Feb 18 2016 08:30
@radheyIndia maybe you forgot join after reverse
Iqbal Mohammedali
@iqpersonal
Feb 18 2016 08:30
Your <style> should have a pink-text CSS class with its color set to pink.
Rohit Choudhary
@rohitChoudharyIndia
Feb 18 2016 08:31
return str.split('').reverse().join(''); @radheyIndia
Oliver Webb
@Ollie15
Feb 18 2016 08:31
try it with the ; after the pink
Iqbal Mohammedali
@iqpersonal
Feb 18 2016 08:32
@Boomybiscuit45 @Boomybiscuit45 @Boomybiscuit45 @Boomybiscuit45 Thanks dear
CamperBot
@camperbot
Feb 18 2016 08:32
iqpersonal sends brownie points to @boomybiscuit45 and @boomybiscuit45 and @boomybiscuit45 and @boomybiscuit45 :sparkles: :thumbsup: :sparkles:
:star: 140 | @boomybiscuit45 | http://www.freecodecamp.com/boomybiscuit45
:star: 140 | @boomybiscuit45 | http://www.freecodecamp.com/boomybiscuit45
:star: 140 | @boomybiscuit45 | http://www.freecodecamp.com/boomybiscuit45
:star: 140 | @boomybiscuit45 | http://www.freecodecamp.com/boomybiscuit45
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:32
cal u please elaborate ur answer @rohitChoudharyIndia
Oliver Webb
@Ollie15
Feb 18 2016 08:32
np
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:33
it is difficult for me to understand it together please break your code into smaller parts @rohitChoudharyIndia
96street
@96street
Feb 18 2016 08:35
why doesn't this class work?
.line-stories tr:first-child { margin-right: 20px; }
^ I want the two columns to have a 20px margin in-between them but this class isn't working
My code: http://codepen.io/anon/pen/YwMBEq?editors=1100
Rohit Choudhary
@rohitChoudharyIndia
Feb 18 2016 08:36
var temp = str.split('');
var temp2 = temp.reverse();
var temp3 = temp2.join('');
return temp3;
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:37
not working;
Luu Nguyen
@nnluukhtn
Feb 18 2016 08:37
@96street do you want affect td instead of tr?
96street
@96street
Feb 18 2016 08:38
basically i want the two columns to have a gap between eachother @nnluukhtn
so i'm putting margin on the left column
which is made up of tr:first-child's
Luu Nguyen
@nnluukhtn
Feb 18 2016 08:39
yup I know, so you must use .line-stories tr td:first-child { margin-right: 20px; } instead of .line-stories tr:first-child { margin-right: 20px; }
Thomas Noe
@t3h2mas
Feb 18 2016 08:39
you shouldn't ever name a variable after a language keyword
even if the cases are diff
96street
@96street
Feb 18 2016 08:40
@nnluukhtn still doesn't work
Radhika Chaudhary
@radheyIndia
Feb 18 2016 08:41
thanks @rohitChoudharyIndia
CamperBot
@camperbot
Feb 18 2016 08:41
radheyindia sends brownie points to @rohitchoudharyindia :sparkles: :thumbsup: :sparkles:
:star: 251 | @rohitchoudharyindia | http://www.freecodecamp.com/rohitchoudharyindia
Rohit Choudhary
@rohitChoudharyIndia
Feb 18 2016 08:41
np @radheyIndia
Timofey Votyakov
@tvotyakov
Feb 18 2016 08:43
@96street try this .line-stories tr :first-child (just put space between tr and :first-child)
ime
@biglemontree
Feb 18 2016 08:44
This message was deleted
96street
@96street
Feb 18 2016 08:44
@tvotyakov wtf
works
thanks
Luu Nguyen
@nnluukhtn
Feb 18 2016 08:46
weird
Asad Waseem
@rx290
Feb 18 2016 08:48
hey can some one help me with jquery ?
Timofey Votyakov
@tvotyakov
Feb 18 2016 08:48
@96street @nnluukhtn yes, you are right. Its weird. I think that you solution should work either but it doesn't and I don't know why.
Asad Waseem
@rx290
Feb 18 2016 08:49
i'm having trouble while disabling a specific button
Timofey Votyakov
@tvotyakov
Feb 18 2016 08:50
@rx290 could you show your code?
Saulius(Soulless)
@archytektas
Feb 18 2016 08:51
question - i cant find that !== mean?
what*
Asad Waseem
@rx290
Feb 18 2016 08:52
@tvotyakov thank you brother :smile: i've debugged it! i was closing my true statement with inverted commas
CamperBot
@camperbot
Feb 18 2016 08:52
rx290 sends brownie points to @tvotyakov :sparkles: :thumbsup: :sparkles:
:star: 9 | @tvotyakov | http://www.freecodecamp.com/tvotyakov
Saulius(Soulless)
@archytektas
Feb 18 2016 08:53

also function convert(celsius) {
// Only change code below this line
fahrenheit=(celsius*9/5)+32;
// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(30);

it worked farenheit without var
how to understand that?
sorry
function convert(celsius) {
  // Only change code below this line
  fahrenheit=(celsius*9/5)+32;
  // Only change code above this line
  if ( typeof fahrenheit !== 'undefined' ) {
    return fahrenheit;
  } else {
    return 'fahrenheit not defined';
  }
}

// Change the inputs below to test your code
convert(30);
Timofey Votyakov
@tvotyakov
Feb 18 2016 08:56
@archytektas in short, it checks "strict inequality". It means !== operator checks that values and types of two operands are not equal.
Saulius(Soulless)
@archytektas
Feb 18 2016 08:56
@tvotyakov its not same as != ?
Timofey Votyakov
@tvotyakov
Feb 18 2016 08:57
@archytektas no.
@archytektas for example, "1" != 1 is false, but "1" !== 1 is true.
@archytektas because != operator will try to convert operands to cast them to one type if they have different types. But !== will not
Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:04
hello ... i need a little help ...
doing JQuery at the moment
Timofey Votyakov
@tvotyakov
Feb 18 2016 09:04

@archytektas

how to understand that?

It is because if you don't write var, javascript thinks that you use property with the given name from global object (In browser it it Window). It will work but it is bad practice. var declares local variable which will exists only in your function.

Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:04
this is the lesson

You can also target elements by their id attributes.

First target your button element with the id target3 by using the $("#target3") selector.

Note that, just like with CSS declarations, you type a # before the id's name.

Then use jQuery's .addClass() function to add the classes animated and fadeOut.

Here's how you'd make the button element with the id target6 fade out:

$("#target6").addClass("animated fadeOut").

and this is what i did
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
$("#target3").addClass("animated fadeout")

});
</script>
sorry
Saulius(Soulless)
@archytektas
Feb 18 2016 09:05
@tvotyakov thanks. Now just need to understand. little by little :)
CamperBot
@camperbot
Feb 18 2016 09:05
archytektas sends brownie points to @tvotyakov :sparkles: :thumbsup: :sparkles:
:star: 10 | @tvotyakov | http://www.freecodecamp.com/tvotyakov
Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:05
<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("animated shake btn-primary");
});
</script>
that is what i did
can anyone help me find out where the error is
Timofey Votyakov
@tvotyakov
Feb 18 2016 09:13
@RC31 do you see a concrete error message?
Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:13
no
it just worked somehow
i just refreshed my page
and it worked
nooo
it didn't
there is still one red X mark
at "Only add one class with each of your three selectors."
but no concrete error message @tvotyakov
Timofey Votyakov
@tvotyakov
Feb 18 2016 09:16
@RC31 could you give me a link to this lesson?
Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:16
sure
wait
Timofey Votyakov
@tvotyakov
Feb 18 2016 09:20
@RC31 it looks like you don't need to add three classes to $('#target1'), just one.
Taylor
@tknovember
Feb 18 2016 09:21
@RC31 get rid of animated and shake in this: $("#target1").addClass("animated shake btn-primary”);
Robert Currie Owusu Afari
@RC31
Feb 18 2016 09:22
i tried it
didnt work
ok.... it just did...
i tried it before i added the animated and shake
thank u @tvotyakov and @tknovember you were very helpful
CamperBot
@camperbot
Feb 18 2016 09:25
rc31 sends brownie points to @tvotyakov and @tknovember :sparkles: :thumbsup: :sparkles:
:star: 310 | @tknovember | http://www.freecodecamp.com/tknovember
:star: 15 | @tvotyakov | http://www.freecodecamp.com/tvotyakov
Charlie
@charles-anew
Feb 18 2016 09:39
I turned off infinite loop protection and now I cannot open the page my code is on anymore
Because I have an infinite loop and it executes when I try to load it
Steven Chew
@chewchewbaka
Feb 18 2016 09:39
o.o struggle...glwt
Charlie
@charles-anew
Feb 18 2016 09:51
Figured it out, thanks
Steven Chew
@chewchewbaka
Feb 18 2016 09:51
great. howd you do it?
AYKKYA
@AYKKYA
Feb 18 2016 10:19
blob
what ı am missing here
Steven Chew
@chewchewbaka
Feb 18 2016 10:23
theyre looking for you to say <img class="smaller-image" "thick-green-border" src="...
not type in the style section
shreeja0
@shreeja0
Feb 18 2016 10:24
you should have another class called thick-green-border
Steven Chew
@chewchewbaka
Feb 18 2016 10:25
@AYKKYA because theyre teaching how to apply two classes at once to a single img tag
AYKKYA
@AYKKYA
Feb 18 2016 10:25
thank you @chewchewbaka
CamperBot
@camperbot
Feb 18 2016 10:25
aykkya sends brownie points to @chewchewbaka :sparkles: :thumbsup: :sparkles:
:star: 40 | @chewchewbaka | http://www.freecodecamp.com/chewchewbaka
luuko
@luuko
Feb 18 2016 10:28
Why doesn't this work? <a href='http://freecatphotoapp.com'>cat photos</a>
Steven Chew
@chewchewbaka
Feb 18 2016 10:28
context?
luuko
@luuko
Feb 18 2016 10:29
What do you mean by context, sorry english isn't my main language
Steven Chew
@chewchewbaka
Feb 18 2016 10:30
where/how does it not work or what is the error? that should create a link to the URL that says "cat photos"
it is possible your coding is correct, but not exactly what the program is asking you to do
i only know this because i was doing that earlier today
luuko
@luuko
Feb 18 2016 10:31
You need an a element that links to "http://www.freecatphotoapp.com"
Your a element should have the anchor text of "cat photos"
Timofey Votyakov
@tvotyakov
Feb 18 2016 10:33
@luuko Do you see an error message or something similar?
Steven Chew
@chewchewbaka
Feb 18 2016 10:33
@luuko is it within your paragraph tag? answer might need to look something like: <p>Here's some <a href="http://freecatphotoapp.com" cat photos> cat photos </a> for you to checkout </p>
David Enos
@bluedangerforyou
Feb 18 2016 10:33
I am stuck at javascript challenge word blanks. I dont understand question. Am I suppose to concat the strings? can someone clarify the question please??
Timofey Votyakov
@tvotyakov
Feb 18 2016 10:34

@luuko

Why doesn't this work? <a href='http://freecatphotoapp.com'>cat photos</a>

Try to replace your single quotes (') by double quotes (")

luuko
@luuko
Feb 18 2016 10:34
@tvotyakov I don't see a error message.
@tvotyakov Shouldn't matter right?
Timofey Votyakov
@tvotyakov
Feb 18 2016 10:39
@luuko Yes, it shouldn't matter by html stadard, but it may have matter by freecodecamp tester. It is just advise to try.
Jean Louis Salbego
@jlouiss
Feb 18 2016 10:40
guys, is it ok if i post my freecodecamp projects on github? are there restrictions?
Alexander Køpke
@alexanderkopke
Feb 18 2016 10:40
@bluedangerforyou if I recall correctly, you return the concatenated variables.
luuko
@luuko
Feb 18 2016 10:41
@tvotyakov I refreshed my browser. Now everything works fine, guess i was inactive for to long.
Kris Tarling
@KrisTarling
Feb 18 2016 10:42
@jlouiss from what I can tell, sharing your projects is encouraged
Timofey Votyakov
@tvotyakov
Feb 18 2016 10:43
@luuko Ok
David Enos
@bluedangerforyou
Feb 18 2016 10:43
@alexanderkopke I will try, the exercise is vague
@alexanderkopke thanks
CamperBot
@camperbot
Feb 18 2016 10:43
bluedangerforyou sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 479 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Jean Louis Salbego
@jlouiss
Feb 18 2016 10:46
@KrisTarling Do i have to mention freecodecamp or something like that?
Kris Tarling
@KrisTarling
Feb 18 2016 10:52
@jlouiss I haven't been able to find any info on that. My gut tells me that no, you don't have to. Guess it wouldn't hurt to contact FCC directly to be safe
Jean Louis Salbego
@jlouiss
Feb 18 2016 10:54
@KrisTarling thanks, i will write them
CamperBot
@camperbot
Feb 18 2016 10:54
jlouiss sends brownie points to @kristarling :sparkles: :thumbsup: :sparkles:
:star: 54 | @kristarling | http://www.freecodecamp.com/kristarling
Job Spits
@lejob
Feb 18 2016 10:59
Hmmm using codepen for the tribute page and CSS doesn't seem to work... E.g. I want to style my h1 element, I can only do so by inline styling, not through css.

This is the code I use in css, it is correct, right?

h1 {
color:#f4a460;
margin-top:10px;
margin-bottom:75px;
font-weight:bold;
}

Blauelf
@Blauelf
Feb 18 2016 11:01
@lejob Looks about right.
Job Spits
@lejob
Feb 18 2016 11:02
Still doesn't work... inline styling does, but when removed, it won't fall back on css
Kris Tarling
@KrisTarling
Feb 18 2016 11:02
@lejob can you give us a link to the pen?
Job Spits
@lejob
Feb 18 2016 11:03
Is that just the link I am on right now?
Probably not right?
Kris Tarling
@KrisTarling
Feb 18 2016 11:04
if it's a public pen, it should work for us
Have a go
David Enos
@bluedangerforyou
Feb 18 2016 11:05
man i am stuck still at the wordblank challenge
here is my code:

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

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks(myNoun, myAdjective, myVerb, myAdverb);

am i overthinking it????
Alessandro Giordo
@bovas85
Feb 18 2016 11:07

Hey guys, I'm at the map called "profile lookup" where you look for values in an object.
I've done this code but it's very different from what the exercise is saying:

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


function lookUp(firstName, prop){
// Only change code below this line
  var property = 0;
  var name = 0;
  for (i=0; i < 4 ; i++){
    if (firstName !== contacts[i].firstName) name ++;
    if (contacts[i].hasOwnProperty(prop) === false) property++;
    if (contacts[i].hasOwnProperty(prop) && firstName === contacts[i].firstName){
      return contacts[i][prop];
    }
  }
  if (property === 4) return "No such property";
  if (name === 4) return "No such contact";
// Only change code above this line
}

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

Code works fine but is there a better/simpler way?

Moisés Man
@moigithub
Feb 18 2016 11:08
u no need to add "extra" words to it.. + "cat"
but concatenate all noun verb etc arguments u passing to ur function and return a "big phrase" using all those...
@bluedangerforyou
David Enos
@bluedangerforyou
Feb 18 2016 11:09
oh sao I dont need to incklude my own
@moigithub tahnks
Alessandro Giordo
@bovas85
Feb 18 2016 11:09
@bluedangerforyou
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
result = "My cat " + myNoun + " is " + myAdjective + " and " + myVerb + " " + myAdverb;

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("tom", "awesome", "is", "fine");
John Deegan
@JohnDeegs
Feb 18 2016 11:10

Hey all, I'm stuck here http://www.freecodecamp.com/challenges/find-the-longest-word-in-a-string and I think I'm somewhat close. I'm trying to find the biggest word in a string.


function findLongestWord(str) {
  str.split(" ");
 var biggestString = "0";
  for (var i = 0; i < str.length; i++){
    if (str[i].length > biggestString){
      biggestString = str[i].length;
    }
  }

  return biggestString.length;
}

findLongestWord("The quick brown fox jumped over the lazy dog");

This is what I understand that I'm doing,
1 - Splitting the string into an array of elements
2 - Creating a variable biggestString which will hold the current biggest string that the loop finds at i
3 - Declaring a for loop to loop through each element in my array
4 - If the element at i that the loop finds is bigger than the current biggestString, it becomes the biggestString variable.
5 - Returning the length of the biggestString, completing the challenge.
However it just seems to be returning errors, can anyone help? :smile:

David Enos
@bluedangerforyou
Feb 18 2016 11:11
@bovas85 I got it, the instructions are vague :(
@bovas85 thanks
CamperBot
@camperbot
Feb 18 2016 11:11
bluedangerforyou sends brownie points to @bovas85 :sparkles: :thumbsup: :sparkles:
:star: 238 | @bovas85 | http://www.freecodecamp.com/bovas85
V Bhargav Chowdary
@bhargav4
Feb 18 2016 11:11
Hello guys! Please give feedback for my portfolio page
Moisés Man
@moigithub
Feb 18 2016 11:12
@JohnDeegs split return a "NEW" array... then u need to do something with that returning value.. like store somewhere
John Deegan
@JohnDeegs
Feb 18 2016 11:12
@bhargav4 Very nice buttons there, black text is hard to see with that background though
David Enos
@bluedangerforyou
Feb 18 2016 11:12
the real question is, how did you conclude to solve this issue?
Alessandro Giordo
@bovas85
Feb 18 2016 11:13
@bluedangerforyou what do you mean?
John Deegan
@JohnDeegs
Feb 18 2016 11:13
@moigithub So the array isn't called str anymore when I split it? I assumed it took the name of str
David Enos
@bluedangerforyou
Feb 18 2016 11:14
what was the logic you took? its hard to understand the task @JohnDeegs
@bovas85 sorry
Moisés Man
@moigithub
Feb 18 2016 11:14

@JohnDeegs if u comparing < OR >and storing the length (number) on the variable biggerString..

if (str[i].length > biggestString){
      biggestString = str[i].length;
    }

then probably u wanna declare it as numeric var biggestString = "0";
(quotes surrounded means itsa string)
u need to DECIDE if u wanna work with string or numbers..

John Deegan
@JohnDeegs
Feb 18 2016 11:14
@bluedangerforyou Sorry, what do you mean by logic? I tried detailing my steps above the best I could.
Moisés Man
@moigithub
Feb 18 2016 11:15
@JohnDeegs nope split dont modify the original value.. but return a new value(array type)
Kris Tarling
@KrisTarling
Feb 18 2016 11:15
@lejob OK, I've figured it out
Moisés Man
@moigithub
Feb 18 2016 11:15
@JohnDeegs so u need to dosomething like var myStrArr = str.split(" ");
Kris Tarling
@KrisTarling
Feb 18 2016 11:15
@lejob your .jumbotron styling is overwriting the h1 styling
you can fix this by nesting your h1 styling inside the .jumbotron in the SCSS
V Bhargav Chowdary
@bhargav4
Feb 18 2016 11:16
@JohnDeegs Cheers
Job Spits
@lejob
Feb 18 2016 11:18
Ahh cheers mate!!
@KrisTarling thanks
CamperBot
@camperbot
Feb 18 2016 11:19
lejob sends brownie points to @kristarling :sparkles: :thumbsup: :sparkles:
:star: 58 | @kristarling | http://www.freecodecamp.com/kristarling
John Deegan
@JohnDeegs
Feb 18 2016 11:19

@moigithub So taking into account what you said, my code currently looks like this

function findLongestWord(str) {
 var myNewArray = str.split(" ");
 var biggestString = 0;
  for (var i = 0; i < myNewArray.length; i++){
    if (myNewArray[i].length > biggestString){
      biggestString = myNewArray[i].length;
    }
  }

  return biggestString.length;
}

findLongestWord("The quick brown fox jumped over the lazy dog");

Is there something else I'm missing here? A piece of logic I'm not thinking of?

Timofey Votyakov
@tvotyakov
Feb 18 2016 11:19
@JohnDeegs First of all you should store result of split as @moigithub said. You can reuse 'str' for that, or use another name. Second, you should store "biggest string" in the biggestString variable, not the length of "biggest string".
Job Spits
@lejob
Feb 18 2016 11:19
@KrisTarling How do I nest my h1 in the styling?
.jumbotron h1 {
.........
}
like that?
Kris Tarling
@KrisTarling
Feb 18 2016 11:20
@lejob That's the regular CSS way you could do it, yes
@lejob The SCSS way (and will be more efficient for your purposes) is
.jumbotron {
Moisés Man
@moigithub
Feb 18 2016 11:21
@JohnDeegs yep..but 1 last thing...
biggestString storing a number or a string...
return biggestString.length; <-- cuz numbers dont have .length
Kris Tarling
@KrisTarling
Feb 18 2016 11:21
.jumbotron {
h1 {}
}
John Deegan
@JohnDeegs
Feb 18 2016 11:21
@tvotyakov @moigithub Ah of course! I've already stored biggestString as a number!
Dumb mistake haha
Job Spits
@lejob
Feb 18 2016 11:21
You're a star

Another question ^^ how can I center 'Youth' above the well. Code:

<div class="col-md-4 col-md-offset-1">
<h3>Youth</h3>
<div class="well">
<ul>
<li>was born in</li>
<li>writes this song</li>
<li>completes first albumli>
<li>in band with wailers, pete tosh etc.</li>
</div>
</div>

John Deegan
@JohnDeegs
Feb 18 2016 11:23
@tvotyakov @moigithub Getting rid of biggestString.length passed the challenge for me, thank you to you both :)
cannelflow
@cannelflow
Feb 18 2016 11:23
@maulikdarji so slow learning react now
CamperBot
@camperbot
Feb 18 2016 11:23
johndeegs sends brownie points to @tvotyakov and @moigithub :sparkles: :thumbsup: :sparkles:
:star: 639 | @moigithub | http://www.freecodecamp.com/moigithub
:star: 29 | @tvotyakov | http://www.freecodecamp.com/tvotyakov
John Deegan
@JohnDeegs
Feb 18 2016 11:23
@lejob Are you using bootstrap? Should be a simple <h3 class="text-center">Youth</h3> if you are.
Job Spits
@lejob
Feb 18 2016 11:24
Ah stupid, tried style="text-center"
@JohnDeegs thank youououou
CamperBot
@camperbot
Feb 18 2016 11:24
lejob sends brownie points to @johndeegs :sparkles: :thumbsup: :sparkles:
:star: 262 | @johndeegs | http://www.freecodecamp.com/johndeegs
Moisés Man
@moigithub
Feb 18 2016 11:25
@cannelflow im learning react too... doin the fcc exercises.. im on dungeon game
stuck on map generation.. n watching some youtube to get an idea
John Deegan
@JohnDeegs
Feb 18 2016 11:25
@lejob Feels weird being the helper rather than the person getting help, no problem :D
cannelflow
@cannelflow
Feb 18 2016 11:26
@moigithub started yesterday still learning
Job Spits
@lejob
Feb 18 2016 11:26
Haha, that's always good progress!
cannelflow
@cannelflow
Feb 18 2016 11:27
@moigithub gr8 you finished projects before in the map
?
@moigithub which video you are watching
Moisés Man
@moigithub
Feb 18 2016 11:32
Pedro Figueiredo
@pedronfigueiredo
Feb 18 2016 11:32
Hi, could anyone help me with JSONP?
George Sotiriou
@elementcodesnow
Feb 18 2016 11:35
guys i'm trying to login to codepen via github and I get an error Unable to login with GitHub (Unknown GitHub User). Try again or contact support@codepen.io.
anyone encountered that before?
Abdul Awali
@awalthefirst
Feb 18 2016 11:38
@elementcodesnow have u verified your github account?
George Sotiriou
@elementcodesnow
Feb 18 2016 11:38
@awalthefirst I thought of that too , but yes , I have a verified account.
Moisés Man
@moigithub
Feb 18 2016 11:38
@elementcodesnow try to login into github first...
George Sotiriou
@elementcodesnow
Feb 18 2016 11:39
@moigithub done that too! I have it open in a separate tab in the same browser where I try to login to codepen...
I sent an email to their support ... All I can do is wait ... Obviously I could just create a separate account as well but since I have authorized all my Free Code Camp training in this account why not code pen as well right?
NikoSara
@nikosara
Feb 18 2016 11:41
var Car = function() {
  // this is a private variable
  var speed = 10;

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

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

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

var Bike = function() {

  // Only change code below this line.
  var getgear = 0;
  this.gear = function(setgear) {
    getgear += setgear;
  };
};

var myCar = new Car();

var myBike = new Bike();
hi i need help with this :/
Job Spits
@lejob
Feb 18 2016 11:42
Could anyone have a look at why my page header is merged with the container above.... Tried to put containers in between and margin-top it etc, didn't work
http://codepen.io/lejob/pen/qbwVKP
Davperino
@davidesamp
Feb 18 2016 11:45
@bitgrower thank you very much, yes I overthinking the problem, I didn't need to execute another .forEach on the passed val, you solution is rigth.... bye :)
CamperBot
@camperbot
Feb 18 2016 11:45
davidesamp sends brownie points to @bitgrower :sparkles: :thumbsup: :sparkles:
:star: 566 | @bitgrower | http://www.freecodecamp.com/bitgrower
Alessandro Giordo
@bovas85
Feb 18 2016 11:47
@lejob <li>Dies at age of</li> </ul> </div you are not closing the div
Job Spits
@lejob
Feb 18 2016 11:48
Jesuuuuus :smile: went over the divs a million times
Yeehaa
@bovas85 thanks
CamperBot
@camperbot
Feb 18 2016 11:48
lejob sends brownie points to @bovas85 :sparkles: :thumbsup: :sparkles:
:star: 241 | @bovas85 | http://www.freecodecamp.com/bovas85
Alessandro Giordo
@bovas85
Feb 18 2016 11:53
@lejob , all I did is copy the code and paste it in Notepad++
It highlighted the colour of the broken div
@lejob anyway in my opinion you should have those 3 columns side by side or push one below the other slightly with some margin, as that's taking too much space
Job Spits
@lejob
Feb 18 2016 11:59
Ohhh I need that program haha!
And thanks, I'll try :)
Alessandro Giordo
@bovas85
Feb 18 2016 12:08
Any text editor will do. I suggest Atom, Brackets or Notepad++
Sebastian lhådö
@miniskurken
Feb 18 2016 12:10
@lejob Brackets is a lifesaver
David Enos
@bluedangerforyou
Feb 18 2016 12:11
can you guys test this to see if looks centered?
in browser
my codepen looks ok but when I open it in full it looks off center, how do I fix this?
Sebastian lhådö
@miniskurken
Feb 18 2016 12:15
@bluedangerforyou The text is not in the center for me
David Enos
@bluedangerforyou
Feb 18 2016 12:15
what can I do to my code to center it?
padding? margin?
use % not px?
Sebastian lhådö
@miniskurken
Feb 18 2016 12:16
i'd go for margin-left:auto and margin-right:auto; but i'm no expert :)
Ashraful Islam
@iashraful
Feb 18 2016 12:20
hello!
I am in need of some regexp help
Its for a pet project of mine
:)
Kris Tarling
@KrisTarling
Feb 18 2016 12:20
@bluedangerforyou why not just text-align: center; and remove the left padding from the div?
Ashraful Islam
@iashraful
Feb 18 2016 12:21
I am trying to split this 'John Doe' 123456 'Here There' LA US
I need to split this into ['John Doe', '123456', 'Here There', 'LA', 'US']
:D
NikoSara
@nikosara
Feb 18 2016 12:26
what is the command to make tha shape round ???
Ashraful Islam
@iashraful
Feb 18 2016 12:26
@nikosara what shape round?
NikoSara
@nikosara
Feb 18 2016 12:27
i made a class and then i put color in it...how i make it round ?
with no corners...
V Bhargav Chowdary
@bhargav4
Feb 18 2016 12:27
img-rounded?
Ashraful Islam
@iashraful
Feb 18 2016 12:27
you can make it with border-radius: 10px
use as much as px you need until you achieve the required roundness :)
Kris Tarling
@KrisTarling
Feb 18 2016 12:29
@iashraful or border-radius: 50%;
NikoSara
@nikosara
Feb 18 2016 12:29
yes i used 1% :P
Ashraful Islam
@iashraful
Feb 18 2016 12:29
@KrisTarling I don't like the %, pixel gives me fine grained control
:D
Kris Tarling
@KrisTarling
Feb 18 2016 12:30
But I think 50% is what's needed for the exercise
Ashraful Islam
@iashraful
Feb 18 2016 12:30
ok then, 50% it is
Correction:
...
border-radius: 50%
...
David Enos
@bluedangerforyou
Feb 18 2016 12:35
@KrisTarling not working :(
it works when it is minized, but maximized its off
@bluedangerforyou this solves the problem on my screen
David Enos
@bluedangerforyou
Feb 18 2016 12:39
what did you do? css? html5????
Kris Tarling
@KrisTarling
Feb 18 2016 12:41
#padding-above-header {
  padding: 100px 0px 10px 0;
  text-align: center;
}
#padding-between-header {
  padding: 0px 0px 10px 0;
  text-align: center;
}
David Enos
@bluedangerforyou
Feb 18 2016 12:42
@KrisTarling ?
Kris Tarling
@KrisTarling
Feb 18 2016 12:44
@bluedangerforyou That's in the CSS. Those are the two containers that your text is in. The '0' at the end of the padding line is the left padding (it goes top>right>bottom>left)
David Enos
@bluedangerforyou
Feb 18 2016 12:44
@KrisTarling yes got it! Thanks a million
CamperBot
@camperbot
Feb 18 2016 12:44
bluedangerforyou sends brownie points to @kristarling :sparkles: :thumbsup: :sparkles:
:star: 61 | @kristarling | http://www.freecodecamp.com/kristarling
Kris Tarling
@KrisTarling
Feb 18 2016 12:46
@bluedangerforyou No problem. Also, avoid names like #padding-between-header, if you remove the padding later, the container name stops making any sense!
David Enos
@bluedangerforyou
Feb 18 2016 12:53
haha true!
Ademola Adegbuyi
@ooade
Feb 18 2016 12:57
Anybody done with the Rougelike game?
Ait
@aitmesss
Feb 18 2016 12:58
hello all.. is it posible to make notes of maak bookmarks in your challenges?
NikoSara
@nikosara
Feb 18 2016 13:03
var Car = function() {
  // this is a private variable
  var speed = 10;

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

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

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

var Bike = function() {

  // Only change code below this line.
  var setgear = 0;
  this.gear = function(getgear) {
    this.setgear = getgear;
  };
};

var myCar = new Car();

var myBike = new Bike();
Now try it yourself! Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value.
what i have wrong? :/
Ademola Adegbuyi
@ooade
Feb 18 2016 13:11
@nikosara you don't have the gear property
NikoSara
@nikosara
Feb 18 2016 13:13
i have "this.gear ="
i dont understand :/
this.gear is a property of bike...
Blauelf
@Blauelf
Feb 18 2016 13:17
@nikosara What they mean with "private property" is not a real property, but a variable for example declared inside the constructor. gear should be such a variable, while setGear and getGear are supposed to be real properties (defined with this.setGear=...) and hold the described functions.
NikoSara
@nikosara
Feb 18 2016 13:20
.gear i have it inside the bike....setgear and getgear are private...
what should i change?
James
@HoskyMate
Feb 18 2016 13:28

Hey everyone! I'm on the Accessing Nested Arrays in JSON and I'm confused at how to select the second element in the trees array. Can someone help please?

// Setup
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];

// Only change code below this line

var secondTree = myPlants.trees0; // Change this line

shubham7858
@shubham7858
Feb 18 2016 13:31
how to use dead link using hash#
James
@HoskyMate
Feb 18 2016 13:32
@shubham7858 href = "#"
Markus Kiili
@Masd925
Feb 18 2016 13:33
@HoskyMate What kind of an object is myPlants ?
James
@HoskyMate
Feb 18 2016 13:35