These are chat archives for FreeCodeCamp/Help

19th
Oct 2015
Varun Upadhyay
@varunu28
Oct 19 2015 00:03

var Bike = function() {
// Only change code below this line.
this.speed = 100;
function addUnit(value) {
return value + "KM/H";
}

getSpeed = function () {
return addUnit(speed);

};

};

I am unable to make getSpeed method of myBike to be accessible outside the object

Jason Wood
@catapixel
Oct 19 2015 00:05
@varunu28 which waypoint is this? to make getSpeed public add "this" ex. this.getSpeed
Varun Upadhyay
@varunu28
Oct 19 2015 00:06
@catapixel Its waypoint 7.3
Jason Wood
@catapixel
Oct 19 2015 00:08
@varunu28 7.3? What is the waypoint called?
Varun Upadhyay
@varunu28
Oct 19 2015 00:09
@catapixel Make Object Properties Private
Jason Wood
@catapixel
Oct 19 2015 00:11
@varunu28 to pass this waypoint you need to do two things. 1) You need to make the speed private. 2) You need to make getSpeed public. If a variable or method has this. before its name it is public. Without this. before its name it is private. There should be no other changes to the code other than removing/adding this. in these two positions. Do you understand?
Varun Upadhyay
@varunu28
Oct 19 2015 00:16
@catapixel Thanks a ton :)
CamperBot
@camperbot
Oct 19 2015 00:16
varunu28 sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 471 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Oct 19 2015 00:17
@varunu28 no problem
Dylan
@whitesn
Oct 19 2015 00:26
hello, would like to ask for recommendation for link / resources on developing game for Android platform :)
M Used
@mildused
Oct 19 2015 00:27
@whitesn What kind of game?
Dylan
@whitesn
Oct 19 2015 00:28
@mildused I'm looking for tutorial with perhaps sample game to learn the basic first
is pretty good
Dylan
@whitesn
Oct 19 2015 00:30
alright thanks for link
CamperBot
@camperbot
Oct 19 2015 00:30
if you want to thank someone, put an @ before their name!
Dylan
@whitesn
Oct 19 2015 00:31
thanks @mildused I guess heh
CamperBot
@camperbot
Oct 19 2015 00:31
whitesn sends brownie points to @mildused :sparkles: :thumbsup: :sparkles:
:star: 46 | @mildused | http://www.freecodecamp.com/mildused
Dylan
@whitesn
Oct 19 2015 00:31
oh it's paid :(
M Used
@mildused
Oct 19 2015 00:31
It's an investment *
Dylan
@whitesn
Oct 19 2015 00:34
from the preview video it seems similar to construct2 with minimal programming tutorial
Nick Trull
@nicktrull
Oct 19 2015 00:39
var Car = function() {
   this.wheels = 4;
};

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

//Add the property "engines" to myCar, and make it a number.


// Only change code above this line.
(function() {return JSON.stringify(myCar);})();
has anyone gotten past this one yet? i'm stumped. i've tried so many variations but i just don't understand the proper structure of writing the function. explain please
Dylan
@whitesn
Oct 19 2015 00:41
Nick Trull
@nicktrull
Oct 19 2015 00:50
@whitesn thanks i'll check it out
Susan
@SusanGrattan
Oct 19 2015 00:51
Can anyone help me with the first jQuery waypoint? I'm not getting it..
M Used
@mildused
Oct 19 2015 00:53
@SusanGrattan I can try
Susan
@SusanGrattan
Oct 19 2015 00:53
Nevermind, I got it. Whew. Thanks @mildused
CamperBot
@camperbot
Oct 19 2015 00:53
susangrattan sends brownie points to @mildused :sparkles: :thumbsup: :sparkles:
:star: 47 | @mildused | http://www.freecodecamp.com/mildused
Susan
@SusanGrattan
Oct 19 2015 00:54
Gonna take some time to get used to all those darn brackets/parentheses/semicolons lol
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 00:59
Hello world!
CamperBot
@camperbot
Oct 19 2015 00:59

welcome to FreeCodeCamp @Miguel117!

Abhishek
@Abhi493
Oct 19 2015 01:05
hi @Miguel117 and @SusanGrattan
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 01:05
hello @Abhi493
Abhishek
@Abhi493
Oct 19 2015 01:07
@Miguel117 waypoints are not that tough but even if u get stuck u can ask me , I am here for a while.
as i want some revisions , :smile:
KofiAkorli
@KofiAkorli
Oct 19 2015 01:08
@Miguel117 welcome
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 01:08
thank you for offering your help @Abhi493
CamperBot
@camperbot
Oct 19 2015 01:08
miguel117 sends brownie points to @abhi493 :sparkles: :thumbsup: :sparkles:
:star: 229 | @abhi493 | http://www.freecodecamp.com/abhi493
Abhishek
@Abhi493
Oct 19 2015 01:09
find js
CamperBot
@camperbot
Oct 19 2015 01:09

find js

more enteries:

:two::zero: jsonp
:two::one: testingjson
:two::two: wiki js template

Abhishek
@Abhi493
Oct 19 2015 01:09
js res
js explain res
M Used
@mildused
Oct 19 2015 01:11
what are you doing?
Abhishek
@Abhi493
Oct 19 2015 01:13
explain js res
Abhishek
@Abhi493
Oct 19 2015 01:13
i wanted camper bot to show me resoureces of javaScript (js) @mildused
resources*
CoreyThomas
@CoreyThomas
Oct 19 2015 01:23
@gratschultz2013 If you dont know the basics with Html and CSS then you shouldn't touch javascript.
Saiduk
@Saiduk
Oct 19 2015 01:25

So, on the add border elements around your images, I put in this code:

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

and have added the class to the image properly, but it says my border is not 10px. Tried a hard refresh, nothing. I think it's a bug

Susan
@SusanGrattan
Oct 19 2015 01:26
Hello @Abhi493 and @Miguel117
Saiduk
@Saiduk
Oct 19 2015 01:26
*add borders around your images
*elements
DJ
@qualitymanifest
Oct 19 2015 01:27
@Saiduk a problem i have seen on this waypoint is that it won't pass if you have your browser zoomed at all.
Susan
@SusanGrattan
Oct 19 2015 01:27
Can you paste your code for the image here @Saiduk
DJ
@qualitymanifest
Oct 19 2015 01:27
@Saiduk if you do, return it back to 100% and try again
Saiduk
@Saiduk
Oct 19 2015 01:28
That worked. Not sure why it was zoomed in
Thanks @qualitymanifest
CamperBot
@camperbot
Oct 19 2015 01:28
saiduk sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 282 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Oct 19 2015 01:28
yeah. it's a funny error. i've spent a while staring at good code trying to find a mistake and it turns out thats all it is.
Johnathan Brown
@Legend28469
Oct 19 2015 01:45
I can’t figure out for the life of me how do to the tweet button for “Zipline: Build a random quote machine”
Danielle "Dani" Moss
@psykobilliethekid
Oct 19 2015 01:48
hey guys! been a while since i could log on. did they change the setup for the ziplines? ive been stuck on the weather app for a while and didnt know if its still even a zipline anymore
@Legend28469 yeah i couldnt figure that out either. let me know if you figure out anything
Eric Hartline
@wildlifehexagon
Oct 19 2015 02:02
@psykobilliethekid It got moved to the intermediate zipline section
Chao
@iseliget
Oct 19 2015 02:06
@Legend28469 I found some code online. It works even though I don’t know how it works exactly.
Johnathan Brown
@Legend28469
Oct 19 2015 02:07
I found something too for links. But I want to understand it
Susan
@SusanGrattan
Oct 19 2015 02:08
Trying to do the // var myName JS waypoint and it won't work. I mean, it's not rocket science so I don't know where I went wrong.. Any advice?
DJ
@qualitymanifest
Oct 19 2015 02:08
@SusanGrattan can you link the waypoint
Chao
@iseliget
Oct 19 2015 02:08
@Legend28469 Not sure if we actually found the same thing. The code I found, I was actually able to modify it so it tweets the quote I generated. But the rest is just like Chiense to me.
Wait, I’m Chinese… Nvmd
DJ
@qualitymanifest
Oct 19 2015 02:08
@iseliget check out the link i just sent to legend
Johnathan Brown
@Legend28469
Oct 19 2015 02:08
Thank you @qualitymanifest . I’ll check it out
CamperBot
@camperbot
Oct 19 2015 02:08
legend28469 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 284 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Johnathan Brown
@Legend28469
Oct 19 2015 02:08
@iseliget lol. Thanks I could use the laugh :D
CamperBot
@camperbot
Oct 19 2015 02:08
legend28469 sends brownie points to @iseliget :sparkles: :thumbsup: :sparkles:
:star: 192 | @iseliget | http://www.freecodecamp.com/iseliget
Susan
@SusanGrattan
Oct 19 2015 02:09
@qualitymanifest I don't know how to do that
DJ
@qualitymanifest
Oct 19 2015 02:09
@SusanGrattan i mean can you just copy and paste the URL
Gotcha.. Sorry @qualitymanifest
Chao
@iseliget
Oct 19 2015 02:10
@Legend28469 Interesting. This is what I found: http://jsfiddle.net/chris27/DQw5b/4/
DJ
@qualitymanifest
Oct 19 2015 02:11
@SusanGrattan can you copy and paste the code you wrote too?
just whatever line you wrote, i don't need all of it
Susan
@SusanGrattan
Oct 19 2015 02:12

// var ourName = "Free Code Camp";
// var myName = "Susan";

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
// You'll learn about functions soon.

if(typeof(myName) !== "undefined"){(function(v){return v;})(myName);}

Sorry, again.
DJ
@qualitymanifest
Oct 19 2015 02:13
oh okay so you haven't written anything
no worries
Johnathan Brown
@Legend28469
Oct 19 2015 02:13
@iseliget it looks complicated. I’m gonna try and figure it out
Susan
@SusanGrattan
Oct 19 2015 02:13
just "// var myName = "Susan";
DJ
@qualitymanifest
Oct 19 2015 02:13
so, in that code above they actually show you how to do it
ohhhh i see
Susan
@SusanGrattan
Oct 19 2015 02:14
I tried to do exactly that...
DJ
@qualitymanifest
Oct 19 2015 02:14
@SusanGrattan do you know what comments are?
Susan
@SusanGrattan
Oct 19 2015 02:14
Yes
DJ
@qualitymanifest
Oct 19 2015 02:14
just remove the comments. the code won't run if it's commented
Susan
@SusanGrattan
Oct 19 2015 02:15
Oh boy.. Thanks @qualitymanifest
CamperBot
@camperbot
Oct 19 2015 02:15
susangrattan sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: susangrattan already gave qualitymanifest points
Susan
@SusanGrattan
Oct 19 2015 02:15
I feel slightly stupid haha.
DJ
@qualitymanifest
Oct 19 2015 02:15
it happens
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 02:33
hi can anyone help me with the Waypoint: Set the ID of an Element i don't have a clue on how to give my form element the id cat-photo-app
KofiAkorli
@KofiAkorli
Oct 19 2015 02:34
@Miguel117 sure thing, what's the problem?
Susan
@SusanGrattan
Oct 19 2015 02:34
<form id="cat-photo-app">
KofiAkorli
@KofiAkorli
Oct 19 2015 02:35
well, there you have it
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 02:35
susangrattan i already place the code just like you before asking and it says its wrong
Susan
@SusanGrattan
Oct 19 2015 02:36
Can you paste your code?
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 02:36
<form id="cat-photo-app">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
Susan
@SusanGrattan
Oct 19 2015 02:37
It looks right to me...
Herman Fassett
@HermanFassett
Oct 19 2015 02:38
@Miguel117 the id is supposed to be cat-photo-form
not cat-photo-app
Miguel Angel Hernandez Angeles
@Miguel117
Oct 19 2015 02:40
@HermanFassett your right i didn't notice thank you i don't know why i missed that part it was in front of me
CamperBot
@camperbot
Oct 19 2015 02:40
miguel117 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 387 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Susan
@SusanGrattan
Oct 19 2015 02:40
@Miguel117 I've had many moments like that so far..
Herman Fassett
@HermanFassett
Oct 19 2015 02:41
Yeah it happens to me so frequently :P
Kevin Smith
@Hopothesis
Oct 19 2015 02:42
Give the text input in your form the class form-control.
Travis
@TravisHi
Oct 19 2015 02:45
yay I did it, I worked out how to give elements a gutter in foundation! :D
David Bouwkamp
@DavidBouw
Oct 19 2015 03:16
Hey all, does anyone know if FCC has any resources on w3c compliance - specifically sitemap semantics? I haven't had any success from crawling the site with google
Samantha Hankins
@IAmSamHankins
Oct 19 2015 03:30
hey all - Waypoint: Make Instances of Objects with a Constructor Function
i'm totally at a loss as to how to add a property to an individual instance
nevermind! i got it after staring for really long!
Matt Everson
@matteverson
Oct 19 2015 03:47
@BrainDrainBahrain No, FCC doesn't cover sitemaps
YI JIANG
@meet999
Oct 19 2015 04:32
HI,Anyone know how to write || ?
Reggie
@Reggie01
Oct 19 2015 04:32
@meet999 what are trying to do?
YI JIANG
@meet999
Oct 19 2015 04:33

if(slotOne !== slotTwo || slotTwo !== slotThree){

  return null;

}

I don't know how to write "|| "

}

||
||
this symbol
bruglesco
@bruglesco
Oct 19 2015 04:34
shift just below the backspace @meet999
Reggie
@Reggie01
Oct 19 2015 04:34
^
bruglesco
@bruglesco
Oct 19 2015 04:34
\ this but shifted
Matt Everson
@matteverson
Oct 19 2015 04:34
It's two pipes, not a single symbol
YI JIANG
@meet999
Oct 19 2015 04:34
thanks
CamperBot
@camperbot
Oct 19 2015 04:34
if you want to thank someone, put an @ before their name!
tseamus
@tseamus
Oct 19 2015 04:35
Hey folks, does anyone see where I've erred herein?

  $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');

    $($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');

    $($('.slot')[2].html('<img src = "' + images[slotThree-1] + '">');
The error that accompanies it is as follows : "Unexpected token ';'. Expected ')' to end a argument list."
Reggie
@Reggie01
Oct 19 2015 04:37
I would guess that the outer $( is not needed.
the token it's looking for is ')' because you started with $(
$('.slot')[0].html('<img src = "' + images[slotOne-1] + '">');
bruglesco
@bruglesco
Oct 19 2015 04:39
$('.slot')[0].html('<img src = "' + images[slotOne-1] + '">');
Reggie
@Reggie01
Oct 19 2015 04:39
what waypoint is it?
bruglesco
@bruglesco
Oct 19 2015 04:39
need to remove closing ) too
tseamus
@tseamus
Oct 19 2015 04:40
"Waypoint: Give your JavaScript Slot Machine some Stylish Images"
DJ
@qualitymanifest
Oct 19 2015 04:41
This message was deleted
or sorry hold on
$($('.slot')[2] you're missing a closing )
Reggie
@Reggie01
Oct 19 2015 04:44
^
Yeah, I just did the test. Should have done the test before giving advice.
tseamus
@tseamus
Oct 19 2015 04:45

Revised code is as follows:


$('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');

    $('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');

    $('.slot')[2].html('<img src = "' + images[slotThree-1] + '">');

Accompanying error message is: Unexpected token '('

So it should be two $?
DJ
@qualitymanifest
Oct 19 2015 04:45
@tseamus see what i said above. your earlier code works if you fix that.
tseamus
@tseamus
Oct 19 2015 04:46
I'm sorry, but what do you mean by a missing closing?
bruglesco
@bruglesco
Oct 19 2015 04:46
This message was deleted
tseamus
@tseamus
Oct 19 2015 04:47
Oh, I think I see it. Haha.
DJ
@qualitymanifest
Oct 19 2015 04:47
@tseamus you're missing a closing parenthesis there
)
tseamus
@tseamus
Oct 19 2015 04:47
So much trouble for such a small mistake.
bruglesco
@bruglesco
Oct 19 2015 04:47

  $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');

    $($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');

    $($('.slot')[2]        HERE        .html('<img src = "' + images[slotThree-1] + '">');
Reggie
@Reggie01
Oct 19 2015 04:47
Yeah, it should be 2 $($('.slot')[0])).html. Sorry @tseamus I should have looked at the waypoint first before commenting.
tseamus
@tseamus
Oct 19 2015 04:47
No worries, homie.
bruglesco
@bruglesco
Oct 19 2015 04:47
and so should I before agreeing with him
tseamus
@tseamus
Oct 19 2015 04:48
I've only been doing this for a while. Really finding that the devil is in the details.
bruglesco
@bruglesco
Oct 19 2015 04:48
but thats your original code
pooji02
@pooji02
Oct 19 2015 04:57
hey i need help im stuck with Waypoint: Target the same element with multiple jQuery Selectors.
YI JIANG
@meet999
Oct 19 2015 04:59
—— of ——
anyone know how to make the slash together?
DJ
@qualitymanifest
Oct 19 2015 04:59
@pooji02 post your code
YI JIANG
@meet999
Oct 19 2015 04:59
i dont want it broken
pooji02
@pooji02
Oct 19 2015 05:00

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

Task to be completed
Use the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.
Luis Felipe López G.
@luishendrix92
Oct 19 2015 05:39
wiki format
CamperBot
@camperbot
Oct 19 2015 05:39

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

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

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

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

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

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

alok gupta
@githubalok
Oct 19 2015 05:47
when i enter ctrl+enter it doesn,t work
even though my code is correct
Kouty
@koouty
Oct 19 2015 05:51

@SaintPeter
It's passing:

function convert(num) {

   var rechim = num.toString().split("");
   var l = rechim.length;
   console.log(rechim);
   if (rechim[-1] === 1) {rechim.splice(-1,1, "I")}
   else if (rechim[l-1] === '2') {rechim.splice(l-1,1, "II")}
   else if (rechim[l-1] === '3') {rechim.splice(l-1,1, "III")}
   else if (rechim[l-1] === '4') {rechim.splice(l-1,1, "IV")}
   else if (rechim[l-1] === '5') {rechim.splice(-l1,1, "V")}
   else if (rechim[l-1] === '6') {rechim.splice(l-1,1, "VI")}
   else if (rechim[l-1] === '7') {rechim.splice(l-1,1, "VII")}
   else if (rechim[l-1] === '8') {rechim.splice(l-1,1, "VIII")}
   else if (rechim[l-1] === '9') {rechim.splice(l-1,1, "IX")}
   else if (rechim[l-1] === '0') {rechim.splice(l-1,1,"")}

     if      (rechim[l-2] ==='1') {rechim.splice(l-2,1,"X")}
     else if (rechim[l-2] ==='2') {rechim.splice(l-2,1,"XX")}
     else if (rechim[l-2] ==='3') {rechim.splice(l-2,1,"XXX")}
     else if (rechim[l-2] ==='4') {rechim.splice(l-2,1,"Xl")}
     else if (rechim[l-2] ==='5') {rechim.splice(l-2,1,"L")}
     else if (rechim[l-2] ==='6') {rechim.splice(l-2,1,"LX")}
     else if (rechim[l-2] ==='7') {rechim.splice(l-2,1,"LXX")}
     else if (rechim[l-2] ==='8') {rechim.splice(l-2,1,"LXXX")}
     else if (rechim[l-2] ==='9') {rechim.splice(l-2,1,"XC")}
     else if (rechim[l2] ==='0') {rechim.splice(l-2,1,"")}


     if      (rechim[l-3] ==='1') {rechim.splice(l-3,1,"C")}
     else if (rechim[l-3] ==='2') {rechim.splice(l-3,1,"CC")}
     else if (rechim[l-3] ==='3') {rechim.splice(l-3,1,"CCC")}
     else if (rechim[l-3] ==='4') {rechim.splice(l-3,1,"CD")}
     else if (rechim[l-3] ==='5') {rechim.splice(l-3,1,"D")}
     else if (rechim[l-3] ==='6') {rechim.splice(l-31,"DC")}
     else if (rechim[l-3] ==='7') {rechim.splice(l-3,1,"DCC")}
     else if (rechim[l-3] ==='8') {rechim.splice(l-3,1,"DCCC")}
     else if (rechim[l-3] ==='9') {rechim.splice(l-3,1,"CM")}
     else if (rechim[l-3] ==='0') {rechim.splice(l-3,1,"")}
     console.log(rechim);
   return rechim.join("");
  }
convert(36);

Now the next step is to built an algorithm with a function
x * 1, 2, or 3 x is I or X or C or M,
yx, y, yx... when y is X, L, C , D or M. I hope to make it!

Abhisek Pattnaik
@abhisekp
Oct 19 2015 05:53
@navyvel It would be really nice if you would auto generate the romans using only the base roman numerals given.
Kouty
@koouty
Oct 19 2015 05:56
@abhisekp Perhap's it's too hard for me... but Why not?
Abhisek Pattnaik
@abhisekp
Oct 19 2015 05:57
@navyvel actually, that's the way you should do it. What if the old romans descend again and increase their bases upto 50,000?
Jose E. Pimentel
@jedpimentel
Oct 19 2015 05:59
@navyvel
Untitled.png
YI JIANG
@meet999
Oct 19 2015 06:06
QQ截图20151018230352.png
help
CamperBot
@camperbot
Oct 19 2015 06:06

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

YI JIANG
@meet999
Oct 19 2015 06:08
help guys
CamperBot
@camperbot
Oct 19 2015 06:08
no wiki entry for: guys
:pencil: click here to create one now!after creating your page type update to reload it here
tseamus
@tseamus
Oct 19 2015 06:14

Hey y'all, I'm doing one of the first Bonfires and this is what I have so far:


function reverseString(str) {
  return str;
}

reverseString("hello");

reverseString.split();

array = reverseString;

array = array.reverse();

array = array.join();

I have no idea what to do, and googling things is leading to more confusion than clarity. I know this may seem elementary, but can someone help me out?

bruglesco
@bruglesco
Oct 19 2015 06:15
everything will go inside the curly braces
This message was deleted
tseamus
@tseamus
Oct 19 2015 06:16
FreeCodeCamp started it off otherwise. What trickery,
bruglesco
@bruglesco
Oct 19 2015 06:17
function reverseString(str     <--- this is what gets passed to the function) {
  return str;  <-------this is what gets returned
}
reverseString("hello");
is actually running the function
Tabitha
@TLynnC
Oct 19 2015 06:18
how do you nest text input within a form element?
bruglesco
@bruglesco
Oct 19 2015 06:19
<input type="text"> ?
tseamus
@tseamus
Oct 19 2015 06:19
@bruglesco I don't really understand what that all means.
YI JIANG
@meet999
Oct 19 2015 06:19
I don't know what to do,I don't feel like I really learned anything
so once you make a function you still then have to call it to use it
vdivya51991
@vdivya51991
Oct 19 2015 06:21
Can someone help me with the code for how to make object properties private??
bruglesco
@bruglesco
Oct 19 2015 06:21
thats what FCC did @tseamus
tseamus
@tseamus
Oct 19 2015 06:21
Like so:

function reverseString(str) {
  return str;

  reverseString("hello");

  str = string.split();

array = str;

array = array.reverse();

array = array.join();

}
bruglesco
@bruglesco
Oct 19 2015 06:22
reverseString("hello"); take that back out
tseamus
@tseamus
Oct 19 2015 06:22
Like, delete it?
bruglesco
@bruglesco
Oct 19 2015 06:22
no
```
tseamus
@tseamus
Oct 19 2015 06:22
Ha. Sorry.
bruglesco
@bruglesco
Oct 19 2015 06:23
This message was deleted
```
This message was deleted
Kouty
@koouty
Oct 19 2015 06:24
@jedpimentel Yes, of course, It's a mistake, I pasted an old version in repl.it. Sorry. It's obviously malencountrous errors.
bruglesco
@bruglesco
Oct 19 2015 06:24
This message was deleted
function reverseString(str) {
var array = str;
array   <---- do things here
return array;
}
reverseString("hello");
@tseamus
see how everything is inside the curly braces
Yan Kozlovskiy
@YanKozlovskiy
Oct 19 2015 06:27
anyone want to pair up?
tseamus
@tseamus
Oct 19 2015 06:29
@bruglesco Yeah. Thank you for the help.
CamperBot
@camperbot
Oct 19 2015 06:29
tseamus sends brownie points to @bruglesco :sparkles: :thumbsup: :sparkles:
:star: 206 | @bruglesco | http://www.freecodecamp.com/bruglesco
Kouty
@koouty
Oct 19 2015 06:30
@abhisekp We need a list of replacing character I->X->C->M->X with an upper score_>C with an upper score aand M with an upper score,
V-> L->D-> etc. not a good idea?
Reggie
@Reggie01
Oct 19 2015 06:31
@vdivya51991 which problem are you working on?
bruglesco
@bruglesco
Oct 19 2015 06:34
@tseamus np
alinademeter
@alinademeter
Oct 19 2015 07:10
hello
can someone help me please
i am stuck with javascript 31
h4r1m4u
@h4r1m4u
Oct 19 2015 07:12
what do you have so far @alinademeter ?
Ankit Panwar
@coderNoob
Oct 19 2015 07:14
@abhisekp The data numbering worked but every time i click it, the page refreshes and all the string in the textfield is lost.
<input type="textfield" id="ans" value="">
    <br>
    <button value="1" data-number="1">1</button>
    <button value="2" data-number="2">2</button>
$('button').click(function(event){
  var s = $(this).data('number');
  $('#ans').val($('#ans').val()+s);
});
alinademeter
@alinademeter
Oct 19 2015 07:15
I can not make my function to generate an integer number
@h4r1m4u I don t know what exactly should I do so I can get an integer number
h4r1m4u
@h4r1m4u
Oct 19 2015 07:18
@alinademeter they basically give you the solution in the exercise description in the sidebar. you just need to update the myFunction function with it
alinademeter
@alinademeter
Oct 19 2015 07:19
@h4r1m4u yes
but still not working
h4r1m4u
@h4r1m4u
Oct 19 2015 07:19
post your code
Reggie
@Reggie01
Oct 19 2015 07:19
@coderNoob event.preventDefault()]should stop the page from automatically refreshing.
Ankit Panwar
@coderNoob
Oct 19 2015 07:20
@Reggie01 I can't understand why would the page refresh if I click the button.
h4r1m4u
@h4r1m4u
Oct 19 2015 07:20
@Reggie01 he's using jquery, the click event shouldn't refresh the page. @coderNoob can you post a link to your codepan?
alinademeter
@alinademeter
Oct 19 2015 07:21
Untitled1.png
Levyian
@levyian
Oct 19 2015 07:22
@alinademeter you have the Math.floor after the rturn state
@alinademeter anything after the return will not get called
h4r1m4u
@h4r1m4u
Oct 19 2015 07:22
@alinademeter you need to remove the default Math.random() expression. as @levyian says, anything after that wont' be returned
you need to replace it with the modified random number generation expression
Ankit Panwar
@coderNoob
Oct 19 2015 07:23
@alinademeter You need to make it return like this
return Math.floor(Math.random()*(max-min+1))+min;
alinademeter
@alinademeter
Oct 19 2015 07:24
thank you so munch!
CamperBot
@camperbot
Oct 19 2015 07:24
if you want to thank someone, put an @ before their name!
alinademeter
@alinademeter
Oct 19 2015 07:25
thank you @h4r1m4u @levyian @coderNoob
CamperBot
@camperbot
Oct 19 2015 07:25
alinademeter sends brownie points to @h4r1m4u and @levyian and @codernoob :sparkles: :thumbsup: :sparkles:
:star: 335 | @levyian | http://www.freecodecamp.com/levyian
:star: 215 | @codernoob | http://www.freecodecamp.com/codernoob
:star: 252 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 07:28
@coderNoob the buttons are refreshing the page because they're submitting the form they're in. you didn't define the button type and the default button type is submit. just add this to your buttons and you'll be fine: type="button"
@coderNoob so your buttons should look like this: <button type="button" value="1" data-number="1">1</button>
Ankit Panwar
@coderNoob
Oct 19 2015 07:30
@h4r1m4u Thanks a lot.
It should work if I just remove the form and call some function to solve the string by clicking the "=" button?
CamperBot
@camperbot
Oct 19 2015 07:30
codernoob sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 253 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 07:32
@coderNoob yeah, you don't need the calculator to be a form. in fact the buttons don't necessarily have to be of html element <button>. theoretically they could be anything, eg. divs
or you can use buttons, but without the form element. it's really up to you
Yan Kozlovskiy
@YanKozlovskiy
Oct 19 2015 07:43
anyone looking for a pair?
Laura Stephenson
@lauralstephenson
Oct 19 2015 07:50
I am a noob. I am trying to insert a CSS, changing from style to a CSS. I am trying to change the text to red. I know this is wrong;

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

I have tried leaving in the Style thing, and deleting it out entirely. I've been banging on this thing for a long time.
h4r1m4u
@h4r1m4u
Oct 19 2015 07:52
@lauralstephenson that actually looks correct. can you post your entire code, so that i can see what might be wrong?
Laura Stephenson
@lauralstephenson
Oct 19 2015 07:55

Waypoint: Use a CSS Class to Style an Element
Create a CSS class called red-text and apply it to your h2 element.

Classes are reusable styles that can be added to HTML elements.

Here's an example CSS class declaration:

<style>

  .blue-text {

    color: blue;

  }

</style>

You can see that we've created a CSS class called blue-text within the <style> tag.

You can apply a class to an HTML element like this: <h2 class="blue-text">CatPhotoApp</h2>.

Note that in your CSS style element, classes should start with a period. In your HTML elements' class declarations, classes shouldn't start with a period.

Instead of creating a new style element, try removing the h2 style declaration from your existing style element, then replace it with the class declaration for .red-text.

That's the directions.
h4r1m4u
@h4r1m4u
Oct 19 2015 07:56
what code do you have in the code pane?
Laura Stephenson
@lauralstephenson
Oct 19 2015 07:56

This makes black text: <h2 class="red-text">

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

h4r1m4u
@h4r1m4u
Oct 19 2015 07:56
did you define the .red-text class in your style declaration?
it's black because you didn't define that anything with the .red-class should be of red color
Laura Stephenson
@lauralstephenson
Oct 19 2015 07:57
So this goes in the Style brackets? Is that my style declaration?
h4r1m4u
@h4r1m4u
Oct 19 2015 07:58
yes. you need to create the red-text class in between the <style> tags. similar to what they did with the blue-text class
using the <style> tags is one way of declaring the CSS rules for your page. you'll learn other ways as you progress in the course
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:00
Thank you. Trying again.
CamperBot
@camperbot
Oct 19 2015 08:00
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 08:01
@lauralstephenson no problem. shout at me if you need further help
anthonygallina1
@anthonygallina1
Oct 19 2015 08:03
Could I get some help with a pen my divs dont stack right when screen size is reduced
h4r1m4u
@h4r1m4u
Oct 19 2015 08:04
@anthonygallina1 sure. link the pen?
anthonygallina1
@anthonygallina1
Oct 19 2015 08:04
let me log in over there and get it brb
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:04
Still not working. What am I replacing wrong?

<style>

<h2 class="blue-text">

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

h4r1m4u
@h4r1m4u
Oct 19 2015 08:04
@lauralstephenson you're putting an <h2> html tag inside your style declaration. that's not the way you declare css classes
you declare them like so:
.my-class {
 color: white;
}
you then assign the class to your HTML elements, so that they use its style, like so:
<h2 class="my-class">some text</h2>
h4r1m4u
@h4r1m4u
Oct 19 2015 08:07
@anthonygallina1 thanks. what's the issue you need help with?
CamperBot
@camperbot
Oct 19 2015 08:07
h4r1m4u sends brownie points to @anthonygallina1 :sparkles: :thumbsup: :sparkles:
:star: 339 | @anthonygallina1 | http://www.freecodecamp.com/anthonygallina1
anthonygallina1
@anthonygallina1
Oct 19 2015 08:09
@h4r1m4u when you reduce the size like in the window above my divs dont stack right
on the bottom
h4r1m4u
@h4r1m4u
Oct 19 2015 08:09
the portfolio divs?
anthonygallina1
@anthonygallina1
Oct 19 2015 08:10
yes portfolio section
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:10
so I put that IN the style brackets, like <style> <h2 class="my-class">some text</h2><style> ?
h4r1m4u
@h4r1m4u
Oct 19 2015 08:10
@anthonygallina1 ok. give me a second
anthonygallina1
@anthonygallina1
Oct 19 2015 08:11
ty
h4r1m4u
@h4r1m4u
Oct 19 2015 08:11
@lauralstephenson no, like so:
<style>
.my-class {
  color: white; 
}
</style>
then in your html code (outside the <style> tags) you assign the class to your elements: <h2 class="my-class">text</h2>
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:13
Ooooo. Thank you.
CamperBot
@camperbot
Oct 19 2015 08:13
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 08:14
@lauralstephenson you're welcome
@anthonygallina1 you have a minor issue in your code. you forgot to close one of the .row divs and then open another one. here's the fixed code segment:
      <div class="row">
        <div class="col-md-4">

                </div>
          <h2>Portfolio</h2>
          <h4><p>This is some of my work </p></h4>
          <i class="fa fa-linux fa-5x"></i>
        </div>
      </div><!-- .row --><!-- I added this -->
      <div class="row"><!-- I added this -->
        <div class="col-md-4 img">
          <h1>Web Site</h1>
@anthonygallina1 update that in your code and you'll be golden
anthonygallina1
@anthonygallina1
Oct 19 2015 08:16
ah didnt see that . @lauralstephenson thank you
CamperBot
@camperbot
Oct 19 2015 08:16
anthonygallina1 sends brownie points to @lauralstephenson :sparkles: :thumbsup: :sparkles:
:star: 16 | @lauralstephenson | http://www.freecodecamp.com/lauralstephenson
h4r1m4u
@h4r1m4u
Oct 19 2015 08:17
you're welcome
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:19
: Got it, anthony!
How do I give you brownie points, anthonygallina1?
and hr41m4u wow thanks!
CamperBot
@camperbot
Oct 19 2015 08:21
if you want to thank someone, put an @ before their name!
Sasa
@tanasic
Oct 19 2015 08:21
@lauralstephenson you "mention" someone and write thank or thanks
CamperBot
@camperbot
Oct 19 2015 08:21
tanasic sends brownie points to @lauralstephenson :sparkles: :thumbsup: :sparkles:
:star: 18 | @lauralstephenson | http://www.freecodecamp.com/lauralstephenson
Sasa
@tanasic
Oct 19 2015 08:21
see :D
h4r1m4u
@h4r1m4u
Oct 19 2015 08:21
yeah, you need to use @theirname
anthonygallina1
@anthonygallina1
Oct 19 2015 08:22
Smootha s silk Works perfect now @lauralstephenson
Laura Stephenson
@lauralstephenson
Oct 19 2015 08:22
thanks @anthonygallina1 and @h4r1m4u !
CamperBot
@camperbot
Oct 19 2015 08:22
lauralstephenson sends brownie points to @anthonygallina1 and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 340 | @anthonygallina1 | http://www.freecodecamp.com/anthonygallina1
:star: 254 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 08:22
i'm not laura @anthonygallina1 :D
anthonygallina1
@anthonygallina1
Oct 19 2015 08:25
@h4r1m4u thank you and sorry
CamperBot
@camperbot
Oct 19 2015 08:25
anthonygallina1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 255 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 08:25
@anthonygallina1 no problem :D
anthonygallina1
@anthonygallina1
Oct 19 2015 08:26
Boy did I read that wrong
Good job spotting that for me @h4r1m4u thank you
CamperBot
@camperbot
Oct 19 2015 08:26
anthonygallina1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: anthonygallina1 already gave h4r1m4u points
anthonygallina1
@anthonygallina1
Oct 19 2015 08:28
@h4r1m4u my portfolio project isnt a complete clone think it will pass?
h4r1m4u
@h4r1m4u
Oct 19 2015 08:28

@anthonygallina1 it's all good. consider putting in comments after your closing tags. i like to do this:

<div class="row">
 bunch of other code inside
</div><!-- .row -->

it really helps to understand which tags belong together once the page code gets more complex

anthonygallina1
@anthonygallina1
Oct 19 2015 08:28
I am going on the make it your own clause I hope.
h4r1m4u
@h4r1m4u
Oct 19 2015 08:30
@anthonygallina1 i'm not sure. i didn't check your code vs the code from the example.
anthonygallina1
@anthonygallina1
Oct 19 2015 08:30
comment it yes it will help especially after looking at code for a long time or coming back and looking at it a month later
h4r1m4u
@h4r1m4u
Oct 19 2015 08:30
exactly
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:38
Hi, I am a bit stumped on this one, cant figure why its not working?
$("#target1").parent().css("background-color", red);
my #left-well element should be red.... why is it not red?
h4r1m4u
@h4r1m4u
Oct 19 2015 08:39
do you have link to your pen?
@rmgraphicdesign
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:40
sorry im new at this where do I get that from?
this is the task

Waypoint: Target the Parent of an Element Using jQuery

Every HTML element has a parent element from which it inherits properties.

For example, your jQuery Playground h3 element has the parent element of <div class="container-fluid">, which itself has the parent body.

jQuery has a function called parent() that allows you to access the parent of whichever element you've selected.

Here's an example of how you would use the parent() function if you wanted to give the parent element of the left-well element a background color of blue: $("#left-well").parent().css("background-color", "blue")

Give the parent of the #target1 element a background-color of red.

h4r1m4u
@h4r1m4u
Oct 19 2015 08:40
oh i'm sorry. i thought you were working on a zipline. let me have a look at that waypoint
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:41
sorry... & thank you..
CamperBot
@camperbot
Oct 19 2015 08:41
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 08:41
@rmgraphicdesign easy fix. put red inside quotes: $("#target1").parent().css("background-color", "red");
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:41
ah @h4r1m4u thank you
CamperBot
@camperbot
Oct 19 2015 08:41
rmgraphicdesign sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 256 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 08:42
:clap:
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:43
wonder if a need to delete my browsing history and try again?
sorry @h4r1m4u just saw your answer... Thank you
CamperBot
@camperbot
Oct 19 2015 08:43
rmgraphicdesign sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: rmgraphicdesign already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Oct 19 2015 08:44
yeah, no need to delete browsing history. just update the code pane and run the code again
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:44
Yep that did it Thanks guys
CamperBot
@camperbot
Oct 19 2015 08:44
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 08:44
great!
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 08:44
right back to it...
anthonygallina1
@anthonygallina1
Oct 19 2015 08:53
@h4r1m4u added closed row to all rows it made more sense why it was breaking when I did that. And I am going to consider it a new tool when used with rows that you again.
thank you
CamperBot
@camperbot
Oct 19 2015 08:53
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 08:54
@anthonygallina1 my pleasure. i typically add the closing comment for other elements too e.g. long forms, section divs, columns, etc. it makes the code much more legible and easier to debug
anthonygallina1
@anthonygallina1
Oct 19 2015 08:56
ok I have a nother one if I could get back in line ashamed to say api and java script is my weakness.
Jason Yang
@zjasonyang
Oct 19 2015 08:59

can someone explain this plz? the for loop will print i: 0 only, but once i change the if condition to

!obj.hasOwnProperty(srcKeys[i]) || obj[srcKeys[i]] !== source[srcKeys[i]]

and the for loop will get i:0 & i:1

function where(collection, source) {
  // What's in a name?
  //console.log(Object.keys(source));
  var srcKeys = Object.keys(source);

  console.log(srcKeys);

  //console.log(collection.filter(jason));
  var result = collection.filter(function (obj) {  
    for(var i = 0; i < srcKeys.length; i++) {
      // check if obj in collection doesn't have the key
      // or if it does have the key,
      console.log(obj.hasOwnProperty(srcKeys[i]));
      console.log("i:"+i);
      if(obj.hasOwnProperty(srcKeys[i]) && obj[srcKeys[i]] == source[srcKeys[i]]){

        return true;
      }
      //return false;
    }
    return false;

  });
  //console.log(result.length);
  return result;
}
where([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });
agusgun
@agusgun
Oct 19 2015 08:59
help
CamperBot
@camperbot
Oct 19 2015 08:59

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

agusgun
@agusgun
Oct 19 2015 09:00
Waypoint: Add Borders Around your Elements
i already change the border width but that still didn't work
bonfire
CamperBot
@camperbot
Oct 19 2015 09:00
we're talking about bonfire :fire: Bonfire: Sum All Numbers in a Range
h4r1m4u
@h4r1m4u
Oct 19 2015 09:02
@zjasonyang could you explain in a bit more detail what the issue is or what is unclear to you?
@agusgun could you post your code/
?
agusgun
@agusgun
Oct 19 2015 09:03
.thick-green-border{
border-color:green;
border-width:10px;
border-style:solid;
}
Jason Yang
@zjasonyang
Oct 19 2015 09:04
@h4r1m4u sry for my english, the problem i met is the for loop seems not working as i thought.
h4r1m4u
@h4r1m4u
Oct 19 2015 09:05
@agusgun that looks correct to me. did you then apply the class to the <img> element?
agusgun
@agusgun
Oct 19 2015 09:05
@h4r1m4u from indonesia?
yes i already apply the class.
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
h4r1m4u
@h4r1m4u
Oct 19 2015 09:06
@agusgun no, i'm not from indo. could you post your entire code?
everything in the code pane
agusgun
@agusgun
Oct 19 2015 09:07

@h4r1m4u oh sorry hehe

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

<style>
.red-text {
color: red;
}
.thick-green-border{
border-color:green;
border-width:10px;
border-style:solid;
}
h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

anthonygallina1
@anthonygallina1
Oct 19 2015 09:07
border-color: green; does a space after the colon make a difference?
agusgun
h4r1m4u
@h4r1m4u
Oct 19 2015 09:09
@anthonygallina1 no, the space doesn't matter
Carsten Jaksch
@kris4de
Oct 19 2015 09:09
No, the space is for readability purposes.
h4r1m4u
@h4r1m4u
Oct 19 2015 09:09
@agusgun the code passes the waypoint for me
agusgun
@agusgun
Oct 19 2015 09:09
@anthonygallina1 yup i think the space doesn't matter
@h4r1m4u why am i didn't pass it -_-
h4r1m4u
@h4r1m4u
Oct 19 2015 09:10
i'm not sure. try reloading the window and running it again
do you get any error messages?
agusgun
@agusgun
Oct 19 2015 09:11
@h4r1m4u no error messages but it still didn't pass in "Give your image a border width of 10px." task
Levyian
@levyian
Oct 19 2015 09:11
@agusgun what browser are you using?
Carsten Jaksch
@kris4de
Oct 19 2015 09:12
Try short notation: border: 10px solid green;
Unlikely, but ...
Every attempt counts. :smile:
h4r1m4u
@h4r1m4u
Oct 19 2015 09:13
@agusgun that's strange. i'm not sure why it's not letting you pass. your code works for me :/
Sasa
@tanasic
Oct 19 2015 09:14
@agusgun @h4r1m4u @greasan guys.. looks like that lesson is bugged , last night I was trying to help out another person with the same problem
h4r1m4u
@h4r1m4u
Oct 19 2015 09:15
ah ok. that would make sense. though it doesn't explain why his code works for me and not for him :worried:
agusgun
@agusgun
Oct 19 2015 09:15
@levyian chrome
@greasan oke i will try
thanks everyone hehe
CamperBot
@camperbot
Oct 19 2015 09:16
if you want to thank someone, put an @ before their name!
Daniel Suchý
@Nodonisko
Oct 19 2015 09:16
@agusgun try this
border-color: green;
border-width: 10px;
border-style: solid;
Sasa
@tanasic
Oct 19 2015 09:16
@h4r1m4u well, code works if you test it in code editor.. but not in the web page
anthonygallina1
@anthonygallina1
Oct 19 2015 09:16
I dont think it should make a difference but what about with this under the width and border style instead of on top? border-color:green;
h4r1m4u
@h4r1m4u
Oct 19 2015 09:17
it works for me in the waypoint page. if i submit it, it passes
agusgun
@agusgun
Oct 19 2015 09:17
maybe the web browser problem
Carsten Jaksch
@kris4de
Oct 19 2015 09:17
Works for me, too.
Sasa
@tanasic
Oct 19 2015 09:17
@h4r1m4u for me too.. because I have already passed thath probably
h4r1m4u
@h4r1m4u
Oct 19 2015 09:18
ah, gotcha
Carsten Jaksch
@kris4de
Oct 19 2015 09:18
Which browser, @agusgun?
Oh you already wrote.
:smile:
Levyian
@levyian
Oct 19 2015 09:18
@agusgun Yeah also worked for me. Though I notice sometimes it would fail in Firefox
agusgun
@agusgun
Oct 19 2015 09:19
works for me in mozilla -_- lol
anthonygallina1
@anthonygallina1
Oct 19 2015 09:19
hmm
Levyian
@levyian
Oct 19 2015 09:19
@agusgun lol.
Sasa
@tanasic
Oct 19 2015 09:19
i am using Windows 10 / Edge browser and have no problems
Carsten Jaksch
@kris4de
Oct 19 2015 09:19
Great. File a bug on GitHub. Click on "Bug" and describe the problem.
Sasa
@tanasic
Oct 19 2015 09:20
@greasan it has been reported i see, 10 days ago
Carsten Jaksch
@kris4de
Oct 19 2015 09:20
Better. :smile:
Sasa
@tanasic
Oct 19 2015 09:21
FreeCodeCamp/FreeCodeCamp#3204
anthonygallina1
@anthonygallina1
Oct 19 2015 09:21
Could I get help on another pen? please
Sasa
@tanasic
Oct 19 2015 09:22
@agusgun hey, can you try instead of 10 px setting broder width to 11px and see if it wil lwork
h4r1m4u
@h4r1m4u
Oct 19 2015 09:25
@anthonygallina1 what you need?
Srinu Katari
@srinukatari
Oct 19 2015 09:26
hi
agusgun
@agusgun
Oct 19 2015 09:26
@tanasic already work with another browser maybe it will work :v:
Sasa
@tanasic
Oct 19 2015 09:26
@agusgun have you messed with the window zoom?
anthonygallina1
@anthonygallina1
Oct 19 2015 09:26
hi @srinukatari
Sasa
@tanasic
Oct 19 2015 09:26
@agusgun looks like that is the culprit.. if you zoomed in or out.. windows zoom on your browser must be set to 100%
anthonygallina1
@anthonygallina1
Oct 19 2015 09:26
been stuck on this mess for a while : (
h4r1m4u
@h4r1m4u
Oct 19 2015 09:26
what's the issue, specifically?
anthonygallina1
@anthonygallina1
Oct 19 2015 09:26
wont out put weather
Srinu Katari
@srinukatari
Oct 19 2015 09:26
i stuck at waypoint:making object properties private
anthonygallina1
@anthonygallina1
Oct 19 2015 09:27
tot he page
agusgun
@agusgun
Oct 19 2015 09:27
@tanasic lol that is the problem i zoom in it :v:
Sasa
@tanasic
Oct 19 2015 09:27
@agusgun :D there you go, make it 100% and it will pass the test :D
Srinu Katari
@srinukatari
Oct 19 2015 09:27
i am not able to understand the concept
agusgun
@agusgun
Oct 19 2015 09:28
@tanasic okay thanks tanasic
CamperBot
@camperbot
Oct 19 2015 09:28
agusgun sends brownie points to @tanasic :sparkles: :thumbsup: :sparkles:
:star: 113 | @tanasic | http://www.freecodecamp.com/tanasic
Sasa
@tanasic
Oct 19 2015 09:28
@agusgun no problem, glad i could help
agusgun
@agusgun
Oct 19 2015 09:28
@thanks @h4r1m4u @anthonygallina1 @greasan @levyian
CamperBot
@camperbot
Oct 19 2015 09:28
agusgun sends brownie points to @thanks and @h4r1m4u and @anthonygallina1 and @greasan and @levyian :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for thanks
:star: 249 | @greasan | http://www.freecodecamp.com/greasan
:star: 341 | @anthonygallina1 | http://www.freecodecamp.com/anthonygallina1
:star: 339 | @levyian | http://www.freecodecamp.com/levyian
:star: 257 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
anthonygallina1
@anthonygallina1
Oct 19 2015 09:29
thank you @agusgun
CamperBot
@camperbot
Oct 19 2015 09:29
anthonygallina1 sends brownie points to @agusgun :sparkles: :thumbsup: :sparkles:
:star: 25 | @agusgun | http://www.freecodecamp.com/agusgun
h4r1m4u
@h4r1m4u
Oct 19 2015 09:30
@anthonygallina1 you're making a request to the weather api without an api key. they changed it sometime last week and if your request doesn't have a valid api key, you will not get a valid response.
Akash Kandari
@AkashKandari
Oct 19 2015 09:30
can anyone paste solution to this exercise Waypoint: Make Object Properties Private
h4r1m4u
@h4r1m4u
Oct 19 2015 09:30
create an account on the website, get the api key, and add it to your request
Akash Kandari
@AkashKandari
Oct 19 2015 09:31
not able to fugure out how to make myBike.speed undefined
anthonygallina1
@anthonygallina1
Oct 19 2015 09:31
ok will do actually need to find it I have one some where.
h4r1m4u
@h4r1m4u
Oct 19 2015 09:32
@srinukatari what do you not understand about the concept? i can try to shed some light on it
Aditya Pradhana
@adtpdn
Oct 19 2015 09:32
can anyone help me for " Waypoint: Create a JavaScript Slot Machine "
Levyian
@levyian
Oct 19 2015 09:32
@anthonygallina1 also you're getting cross origin request block, you could try using $.getJSON instead
Aditya Pradhana
@adtpdn
Oct 19 2015 09:32
Math.floor(Math.random() * (3 - 1 + 1)) + 1;
Akash Kandari
@AkashKandari
Oct 19 2015 09:32
yes tell me
Aditya Pradhana
@adtpdn
Oct 19 2015 09:32
Screen Shot 2015-10-19 at 5.29.47 PM.png
h4r1m4u
@h4r1m4u
Oct 19 2015 09:32
@levyian it'll work with the get request, because he's using the json-p format. but he needs the api key
Akash Kandari
@AkashKandari
Oct 19 2015 09:34
slotOne= Math.floor(Math.random()*(3-1+1))+1;
slotTwo = Math.floor(Math.random()*(3-1+1))+1;
slotThree =Math.floor(Math.random()*(3-1+1))+1;
you are suppose to do this
Aditya Pradhana
@adtpdn
Oct 19 2015 09:34
ohh okay thanks @AkashKandari
CamperBot
@camperbot
Oct 19 2015 09:34
adtpdn sends brownie points to @akashkandari :sparkles: :thumbsup: :sparkles:
:star: 170 | @akashkandari | http://www.freecodecamp.com/akashkandari
Levyian
@levyian
Oct 19 2015 09:34
@h4r1m4u ah you're right, but only for the ip request. @anthonygallina1 you need to add it to the weather request as well
Akash Kandari
@AkashKandari
Oct 19 2015 09:41
can anyone help me with Object Oriented and Functional Programming lesson 3
unable to achieve goal myBike.speed should be undefined
anthonygallina1
@anthonygallina1
Oct 19 2015 09:42
@h4r1m4u keys in
Akash Kandari
@AkashKandari
Oct 19 2015 09:43
sorry
didn't get you
anthonygallina1
@anthonygallina1
Oct 19 2015 09:44
@h4r1m4u not sure I did it right but it is there now.
Levyian
@levyian
Oct 19 2015 09:45
@anthonygallina1 still missing "jsonp" from $.get() for your weather
anthonygallina1
@anthonygallina1
Oct 19 2015 09:46
@levyian thank you not sure how to do that but does the key look right
CamperBot
@camperbot
Oct 19 2015 09:46
anthonygallina1 sends brownie points to @levyian :sparkles: :thumbsup: :sparkles:
:star: 340 | @levyian | http://www.freecodecamp.com/levyian
anthonygallina1
@anthonygallina1
Oct 19 2015 09:48
been a long time since I looked at it was very frustrated @levyian
Levyian
@levyian
Oct 19 2015 09:48
@anthonygallina1 not sure you key is right
h4r1m4u
@h4r1m4u
Oct 19 2015 09:48
@anthonygallina1 there's a bunch of issues with the code
anthonygallina1
@anthonygallina1
Oct 19 2015 09:49
the syntax of how I put it in the key is correct though
h4r1m4u
@h4r1m4u
Oct 19 2015 09:49
no
it needs to be like this:
$.get("http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da?lat=" + loc[0] + "&lon=" + loc[1], function(weather)
Levyian
@levyian
Oct 19 2015 09:49
h4r1m4u
@h4r1m4u
Oct 19 2015 09:49
note 'appid' and the change of '/' to '&' after the api key
Levyian
@levyian
Oct 19 2015 09:50
yeah what @h4r1m4u said
h4r1m4u
@h4r1m4u
Oct 19 2015 09:50
another issue is: console.log(loc); this returns undefined
if you check console
so the api call doesn't contain correct lat and lon
anthonygallina1
@anthonygallina1
Oct 19 2015 09:52
yes a bunch of issues
h4r1m4u
@h4r1m4u
Oct 19 2015 09:53
actually, i take it back. you log it before you define the loc var. but in the api call it's correct
anthonygallina1
@anthonygallina1
Oct 19 2015 09:53
so I am not getting the lat and lon from http://ipinfo.io Or not ?
pong324
@pong324
Oct 19 2015 09:53
hi guys
so whats the best language to learn a code
h4r1m4u
@h4r1m4u
Oct 19 2015 09:53
that said, if you open the api request in your browser: http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da?lat=22.2833&lon=114.1500, you'll see that it complains the api key is not correct. so double check the api key
@anthonygallina1 here's the solution, just update the relevant code:
$.get("http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da&lat=" + loc[0] + "&lon=" + loc[1], function(weather) {
...
}
eldar786
@eldar786
Oct 19 2015 09:56

here is a solution for 9 step:<style> CSS selector{and}h2 {color: blue;}</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>

h4r1m4u
@h4r1m4u
Oct 19 2015 09:56
@pong324 best for what? it's like asking what are the best shoes to wear
or car to drive
eldar786
@eldar786
Oct 19 2015 09:57
maybe he thought the easiest way to learn
:)
Levyian
@levyian
Oct 19 2015 09:58
@pong324 depends on what you want to do with it, and even then...
anthonygallina1
@anthonygallina1
Oct 19 2015 09:59
yes I am geeting invalid too but I am in open weather and looking at the key
h4r1m4u
@h4r1m4u
Oct 19 2015 09:59
@anthonygallina1 check the fix above. it'll solve it
there were some minor mistakes in the format of the api url
anthonygallina1
@anthonygallina1
Oct 19 2015 10:00
@h4r1m4u got it in g edit right now thank you
CamperBot
@camperbot
Oct 19 2015 10:00
anthonygallina1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 258 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 10:00
does it work for you?
Akash Kandari
@AkashKandari
Oct 19 2015 10:01
Waypoint: Make Instances of Objects with a Constructor Function
i'm doing this var myCar= function() {
this.engines =2;
}
anthonygallina1
@anthonygallina1
Oct 19 2015 10:05
@h4r1m4u http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da seems to work but not getting the code in right on the pen throughing a error
Abhisek Pattnaik
@abhisekp
Oct 19 2015 10:08
@coderNoob button has default type="submit". Hence, when clicked, it submits the form and the pg. refreshes.
anthonygallina1
@anthonygallina1
Oct 19 2015 10:08

'

});
}, "jsonp"); '

h4r1m4u
@h4r1m4u
Oct 19 2015 10:08
@anthonygallina1 you messed up the api call and added function(weather) into it
here's the entire code:
$.get("http://ipinfo.io", function(response) {
  $("#ip").html("IP: " + response.ip);
  $("#address").html("Location: " + response.city + ", " + response.region);
  $("#details").html(JSON.stringify(response, null, 4));
  console.log(loc);
  var loc = response.loc.split(',');
  //client side weather
  $.get("http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da&lat=" + loc[0] + "&lon=" + loc[1] + "?lat=" + loc[0] + "&lon=" + loc[1], function(weather) {
    console.log(loc[0], loc[1]);
    $("#weather-temp").html(JSON.stringify(weather, null, 4));

  });
}, "jsonp");
anthonygallina1
@anthonygallina1
Oct 19 2015 10:10
@h4r1m4u thank you
CamperBot
@camperbot
Oct 19 2015 10:10
anthonygallina1 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: anthonygallina1 already gave h4r1m4u points
anthonygallina1
@anthonygallina1
Oct 19 2015 10:10
Where did I blow it at?
h4r1m4u
@h4r1m4u
Oct 19 2015 10:11
when i opened the pen, the api call looked like this:
 $.get("http://api.openweathermap.org/data/2.5/weather?appid=9fd3b157dfe5f58b6813a5f2f64259da&lat=" + loc[0] + "&lon=" + loc[1], function(weather)?lat=" + loc[0] + "&lon=" + loc[1], function(weather) {
notice the 'function(weather)' bit inside, missing quotes around lat, etc.
anthonygallina1
@anthonygallina1
Oct 19 2015 10:12
seeing it now
yes
h4r1m4u
@h4r1m4u
Oct 19 2015 10:13
;)
anthonygallina1
@anthonygallina1
Oct 19 2015 10:15
thank you that got me over the major hurdle I am pretty sure I can plug into that and finish the pen.
CamperBot
@camperbot
Oct 19 2015 10:15
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 10:15
you're welcome. do you use developer tools in your browser?
anthonygallina1
@anthonygallina1
Oct 19 2015 10:15
@h4r1m4u thank you @levyian thank you
CamperBot
@camperbot
Oct 19 2015 10:15
anthonygallina1 sends brownie points to @h4r1m4u and @levyian :sparkles: :thumbsup: :sparkles:
:warning: anthonygallina1 already gave levyian points
:warning: anthonygallina1 already gave h4r1m4u points
Aditya Pradhana
@adtpdn
Oct 19 2015 10:22
anyone can help " Waypoint: Make Object Properties Private "
This message was deleted
var Car = function() {
  this.gear = 1;
  function addStyle(styleMe){
    return 'The Current Gear Is: ' + styleMe;
  }
  this.getGear = function() {
    return addStyle(this.gear);
  };
};

var Bike = function() {
  // Only change code below this line.
  this.speed = 100;
  function addUnit(value) {
    return value + "KM/H";
  }

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

};
Screen Shot 2015-10-19 at 6.22.38 PM.png
h4r1m4u
@h4r1m4u
Oct 19 2015 10:25
var Bike = function() {
  // Only change code below this line.
  speed = 100;
  function addUnit(value) {
    return value + "KM/H";
  }

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

};
D/S
@dantesolis
Oct 19 2015 10:26
yes
I just did that
h4r1m4u
@h4r1m4u
Oct 19 2015 10:26
this.speed makes speed the property of the Bike object and defines it. not adding this.getSpeed prevents the method from being accessible from outside
@adtpdn
D/S
@dantesolis
Oct 19 2015 10:26
oops somebody just helped you @adtpdn nvm
Aditya Pradhana
@adtpdn
Oct 19 2015 10:26
huhuhu makasi bro @h4r1m4u
thanks @h4r1m4u
CamperBot
@camperbot
Oct 19 2015 10:27
adtpdn sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 259 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
D/S
@dantesolis
Oct 19 2015 10:27
:smile:
Aditya Pradhana
@adtpdn
Oct 19 2015 10:27
thanks @dantesolis
CamperBot
@camperbot
Oct 19 2015 10:27
adtpdn sends brownie points to @dantesolis :sparkles: :thumbsup: :sparkles:
:star: 173 | @dantesolis | http://www.freecodecamp.com/dantesolis
D/S
@dantesolis
Oct 19 2015 10:27
On a much related noted I’m stuck here. ..
h4r1m4u
@h4r1m4u
Oct 19 2015 10:28
do you understand why my code works and yours doesn't @adtpdn ?
D/S
@dantesolis
Oct 19 2015 10:28
Screen Shot 2015-10-19 at 12.27.54.png
Jose E. Pimentel
@jedpimentel
Oct 19 2015 10:28
@h4r1m4u you need to declare speed with var speed
D/S
@dantesolis
Oct 19 2015 10:28
np @adtpdn
h4r1m4u
@h4r1m4u
Oct 19 2015 10:29
@jedpimentel i know. i was helping @adtpdn ;)
D/S
@dantesolis
Oct 19 2015 10:29
can anyone help me please
don’t unerstand where my error is …. Also, how do you guys get to upload those very nice code snnipets ?
Jose E. Pimentel
@jedpimentel
Oct 19 2015 10:29
aaah, I really need to sleep more... I try to go to sleep but the the muse bites me
h4r1m4u
@h4r1m4u
Oct 19 2015 10:30
@dantesolis change var myArray = ... to array =
D/S
@dantesolis
Oct 19 2015 10:30
the muse? As in the group?
h4r1m4u
@h4r1m4u
Oct 19 2015 10:30
@jedpimentel :D i know the feeling
anthonygallina1
@anthonygallina1
Oct 19 2015 10:30
:)
D/S
@dantesolis
Oct 19 2015 10:30
well that was frigging dumb!.
thanks @h4r1m4u .. I need to put some food in my stomach
CamperBot
@camperbot
Oct 19 2015 10:31
dantesolis sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 260 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 10:31
yep. it's just that the test function tests the array var. not myArray :D
D/S
@dantesolis
Oct 19 2015 10:32
what can I say!? I like to name things. :smile:
anthonygallina1
@anthonygallina1
Oct 19 2015 10:32
I am so happy my band width cap goes off at 3 am I plan on being in here more in the am's I got soooo much help tonight!
D/S
@dantesolis
Oct 19 2015 10:33
peeps, I’ll be back in a min (first time using the gitter chat and I’m loving it) I need to stuff my face
happy coding
h4r1m4u
@h4r1m4u
Oct 19 2015 10:33
happy stuffing
D/S
@dantesolis
Oct 19 2015 10:33
thanks @h4r1m4u :thumbsup:
CamperBot
@camperbot
Oct 19 2015 10:33
dantesolis sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: dantesolis already gave h4r1m4u points
Yusef Habib
@yhabib
Oct 19 2015 10:38
hi guys! I’m working in the camperNews Zipline, and when calling the API with .getJSON if I pass the url without the ?callback=? works, but trying to use it as JSONP gives me nothing
$.getJSON("http://www.freecodecamp.com/news/hot?callback=?", function(data) {
    console.log("DATA: " + data);
  });
h4r1m4u
@h4r1m4u
Oct 19 2015 10:40
if you add ?callback=? in the .getJSON function, it's treated as JSONP
and if you dont' use JSONP, typically you won't get a response as it'll be treated as a cross-domain request
does that help @yhabib ?
Yusef Habib
@yhabib
Oct 19 2015 10:45
@h4r1m4u that’s the problem that only when I do not add the extension for JSONP I get the info in data
h4r1m4u
@h4r1m4u
Oct 19 2015 10:45
can you post the code you use when you add the JSONP extension?
Yusef Habib
@yhabib
Oct 19 2015 10:45
so the code above shows nothing throught the terminal, beause it never gets evaluated the inside
and i don’t know why
I just started with it, and when I debug it through the terminal, the callback funciton never gets evaluated
but the request is correctly done
Ankit Panwar
@coderNoob
Oct 19 2015 10:49
In the bootstrap grid system, is there a way I can skip a few columns and put my content in a desired column only, for example let's say I put my content in the 6 column from the right?
h4r1m4u
@h4r1m4u
Oct 19 2015 10:50
@yhabib the dev tools give this error:
Refused to execute script from 'http://www.freecodecamp.com/news/hot?callback=jQuery213028548573423177004_1445251646629&_=1445251646630' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
i'm assuming the FCC news api doesn't support jsonp. if you remove the callback parameter from the api call, you'll get the response correctly
@coderNoob yes, look at offsetting columns
Yusef Habib
@yhabib
Oct 19 2015 10:51
I was debugging with Firebug and it threw any error :(
thanks @h4r1m4u
CamperBot
@camperbot
Oct 19 2015 10:51
yhabib sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 261 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 10:52

@coderNoob e.g.

<div class="col-md-3 col-md-offset-6"></div>

this will create a 3 col centered on the page

@yhabib no problem
Ankit Panwar
@coderNoob
Oct 19 2015 10:52
@h4r1m4u Thanks again.
CamperBot
@camperbot
Oct 19 2015 10:52
codernoob sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 262 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Yusef Habib
@yhabib
Oct 19 2015 10:54
@h4r1m4u one thing that know I do not understad. So JSONP allows to make cross domain request, and with out it should give an error because we are trying to access data in another server
therefore why is working?
h4r1m4u
@h4r1m4u
Oct 19 2015 10:56
@yhabib hmm, valid question. i'm actually not sure. now that you bring it up, the browser should prevent the call from completing as it is cross-domain. perhaps somebody else can shed light on it?
Yusef Habib
@yhabib
Oct 19 2015 10:57
maybe someone can give some info thanks again
CamperBot
@camperbot
Oct 19 2015 10:58
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Oct 19 2015 11:00
if you use the parameter in the url, it'll work as it's treated as a normal site request. unless the server knows what to do with the parameter, it'll be simply ignored. try this: http://www.freecodecamp.com/news/hot?test=fasdfas. it'll still work. using the callback parameter will change the request to JSONP only when using the jQuery getJSON function @yhabib
Yusef Habib
@yhabib
Oct 19 2015 11:05
ach so! thanks @h4r1m4u didn’t know that
CamperBot
@camperbot
Oct 19 2015 11:05
yhabib sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: yhabib already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Oct 19 2015 11:08
@yhabib this explains it: http://www.webdevdoor.com/jquery/cross-domain-browser-json-ajax/. if you read the article you'll find out that:
a) the FCC server must be configured to accept cross-domain requests
b) modern browsers use CORS standard which handle the cross-domain requests (more on the CORS standard here: http://www.eriwen.com/javascript/how-to-cors/)
I'm assuming that since the FCC server is configured to accept the cross-domain requests, we dont' specifically need to use JSONP
Jasthi
@nandujasthi
Oct 19 2015 11:25

var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;

function myFunction(){
if (flip === 0) {

  return heads;

} else {

  return tails;

}
// Create an if-else statement here to return "heads" if flip is 0. Otherwise return "tails".

// Only change code below this line.

// Only change code above this line.
}

// We use this function to show you the value of your variable in your output box.
var result = myFunction();if(typeof(flip) !== "undefined" && typeof(flip) === "number" && typeof(result) !== "undefined" && typeof(result) === "string"){(function(y,z){return 'flip = ' + y.toString() + ', text = ' + z;})(flip, result);}

how to define heads here in this code
h4r1m4u
@h4r1m4u
Oct 19 2015 11:26
@nandujasthi you're returning variables called heads and tails. you need to return strings instead. you do this by wrapping them in quotes: "heads", "tails"
Jasthi
@nandujasthi
Oct 19 2015 11:27
@h4r1m4u tq....got it
thomas-duval
@thomas-duval
Oct 19 2015 11:48

Hey guys, I'm at the portfolio zipline and trying to make my navbar collapse when the resolution decrease but without success.
Can someone explain me what is wrong with my code ? I've looked into Bootstrap doc and YouTube tutorials but can't find the solution.

    <nav class="navbar navbar-default navbar-inverse navbar-static-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand">Thomas Duval</a>
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navHeaderCollapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>

            <div class="collapse navbar-collapse" id="navHeaderCollapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#home">Home</a></li>
                    <li><a href="#about">About</a></li>
                    <li><a href="#portfolio">Portfolio</a></li>
                    <li><a href="#contact">Contact</a></li>
                </ul>
            </div>
        </div>
    </nav>

Thanks

CamperBot
@camperbot
Oct 19 2015 11:48
if you want to thank someone, put an @ before their name!
Azamat Kukenov
@azamat89
Oct 19 2015 11:51
Hi "Waypoint: Make Object Properties Private" here I need help
Nikola Mitić
@JohneyCodeUp
Oct 19 2015 12:01
Hey good people this is my personal portfolio zipline, criticism needed please. http://vitezfit.com/vezbanje/johneycodeup/index.html :D :D
suhas
@suhas-partha
Oct 19 2015 12:05
Your p element should have the text "View more " (with a space after it).
<p>"view more <a href="http://www.freecatphotoapp.com">cat photos</a>"</p>
whats wrong in this???
Sasa
@tanasic
Oct 19 2015 12:10
<p>"view more
remove the: "
Aditya Pradhana
@adtpdn
Oct 19 2015 12:16
anyone can help me solving this waypoint ? " Bonfire: Reverse a String "
function reverseString(str) {
  return str;
}

reverseString("hello");
CamperBot
@camperbot
Oct 19 2015 12:16
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Aditya Pradhana
@adtpdn
Oct 19 2015 12:17
Screen Shot 2015-10-19 at 8.15.14 PM.png
Sasa
@tanasic
Oct 19 2015 12:19
@adtpdn hmm.. turn string into array, separate it, join it back turn to string :D
something like that
Azamat Kukenov
@azamat89
Oct 19 2015 12:23
Hi "Waypoint: Make Object Properties Private" here can anyone explain public and private
suhas
@suhas-partha
Oct 19 2015 12:24
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
now also not working!
Sasa
@tanasic
Oct 19 2015 12:25
you need 1 space before view more
suhas
@suhas-partha
Oct 19 2015 12:25
nope
Sasa
@tanasic
Oct 19 2015 12:25
please copy paste screenshot of your code and what is it asking you so i can check it out
suhas
@suhas-partha
Oct 19 2015 12:25
again no!
<p> View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
c this.
Sasa
@tanasic
Oct 19 2015 12:26
please read the instructions carefully and do exactly like it asks you to
suhas
@suhas-partha
Oct 19 2015 12:27
<p>"View more <a href="http://www.freecatphotoapp.com">cat photos</a>"</p>
Sasa
@tanasic
Oct 19 2015 12:27
try reseting the code, reading it again and doing from scratch :) helps always
suhas
@suhas-partha
Oct 19 2015 12:27
check this out
Your p element should have the text "View more " (with a space after it).
Sasa
@tanasic
Oct 19 2015 12:28
there you go, everything explained
suhas
@suhas-partha
Oct 19 2015 12:29
<p>"View more" <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Sasa
@tanasic
Oct 19 2015 12:29
loose the : "
suhas
@suhas-partha
Oct 19 2015 12:29
i really didn't getit
Sasa
@tanasic
Oct 19 2015 12:29
you dont need those
suhas
@suhas-partha
Oct 19 2015 12:30
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
still not working!!
Sasa
@tanasic
Oct 19 2015 12:30
thats it
as i said
give me screnshot here
cant help you like this
Azamat Kukenov
@azamat89
Oct 19 2015 12:39
Hi "Waypoint: Make Object Properties Private" here can anyone explain public and private access
@Takumar Hi "Waypoint: Make Object Properties Private" here can anyone explain public and private access
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:43
Hey, anyone here?
Can I get some help?
Kann jemand mir helfen?
hilfen oder helfen, mein Deutsch ist nicht gut
D/S
@dantesolis
Oct 19 2015 12:44
Hey what do you need help with?
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:44
oh hey
D/S
@dantesolis
Oct 19 2015 12:45
I don’t know if I will be able to help, but I’ll try
shoot your question
Azamat Kukenov
@azamat89
Oct 19 2015 12:45
@dantesolis Waypoint: Make Object Properties Private?
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:45
Thanks for being here, I'm on the bonfire called where art thou.
I need help with it.
CamperBot
@camperbot
Oct 19 2015 12:45
if you want to thank someone, put an @ before their name!
Azamat Kukenov
@azamat89
Oct 19 2015 12:45
Can you explain private and public access
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:46
function where(collection, source) {
  var coll = [];
  var arr = collection.length;
  var src_keys = Object.keys(source);
  var src = source;
  var result = [];
  var bool = false;
  var num = 0;
  while(arr--) {
    coll.push(collection[arr]);
    for(i=0;i<coll.length;i++) {
    if(coll[i][src_keys[i]] === src[src_keys[i]]) {
      result.push(coll);
    }
    }
    coll = [];
    if(arr<0) {
      break;
    }
  }
  // What's in a name?
  return result;
}

where([{ "a": 1 }, { "a": 1 }, { "a": 1, "b": 2 }], { "a": 1 })

//where([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
D/S
@dantesolis
Oct 19 2015 12:48
@azamat89 as I understood it methods and attributes which are publicly accesible are those who can be call outside of the object itself. Pretty much anywhere in your code and you reference them by adding a this private access are things pertaining to that particular object so to speak. Their scope is only within that object only
Does that help?
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:50
@azamat89 Code Academy does a good job at explaining that on a practical level. Check them out.
D/S
@dantesolis
Oct 19 2015 12:51
@gunrunners-paradise zut! you are a bit farther ahead than myself, but what is the question.
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 12:51
Hi I am not understanding this at all help please...

var min = 0;
var max = 9;
function myFunction() {
// Make myFunction return a random number between min and max values instead of a decimal
// Only change code below this line.

return Math.random();
Math.floor(Math.random() * (min - max + 1)) + min;
}

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return myFunction();})();

Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:52
@dantesolis I need help from someone who already done that bonfire
CamperBot
@camperbot
Oct 19 2015 12:52
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
sherman65
@sherman65
Oct 19 2015 12:52
Hey guys, I'm new to here and I'm really exciting with everything.
D/S
@dantesolis
Oct 19 2015 12:52
Sorry @gunrunners-paradise if I get there before someone helps you I’ll try to help
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 12:53
Waypoint: Generate Random Whole Numbers within a Range
Aditya Pradhana
@adtpdn
Oct 19 2015 12:53
@gunrunners-paradise im stuck too at bonfire bro
h4r1m4u
@h4r1m4u
Oct 19 2015 12:53
@rmgraphicdesign what you don't understand?
Aditya Pradhana
@adtpdn
Oct 19 2015 12:53
Bonfire: Reverse a String
CamperBot
@camperbot
Oct 19 2015 12:53

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 12:55
@adtpdn It's a good bonfire, I've been whacking at it for the last 2 days and I'm getting close to solving it.
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 12:55
@h4r1m4u what does this mean in layman's term please :) The random number generated by myFunction should be an integer, not a decimal.
Aditya Pradhana
@adtpdn
Oct 19 2015 12:56
please help me bro ahahaha im being nuts here @gunrunners-paradise " Bonfire: Reverse a String "
CamperBot
@camperbot
Oct 19 2015 12:56
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 12:57
how is it supposed to generate a whole number how does it know?
azaleas
@azaleas
Oct 19 2015 12:57

Hi fellow campers. I've just finished my Tic Tac Toe game, here's the pen:
http://codepen.io/azaleas/full/KdyQMe/

I didn't make the bonus user story where user can't win. It seems like it requires some minimax algorithm and I couldn't honestly figure it out. I'd be happy if anyone who has some knowledge on the matter can point me on right direction. I found some algorithms and codes online but most of them are either too academic or written in c, python or even php.

Aditya Pradhana
@adtpdn
Oct 19 2015 12:57
@rmgraphicdesign what's is your waypoint ?
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 12:58
@adtpdn Waypoint: Generate Random Whole Numbers within a Range
driving me nuts
h4r1m4u
@h4r1m4u
Oct 19 2015 12:58
@rmgraphicdesign the Math.random() function generates a random number between 0 and 1
hence you need to adjust the function, so that it returns an integer instead
Aditya Pradhana
@adtpdn
Oct 19 2015 12:59
var min = 0;
var max = 9;
function myFunction() {
  // Make myFunction return a random number between min and max values instead of a decimal
  // Only change code below this line.
  return Math.floor(Math.random()*(max-min+1))+min;
}

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return myFunction();})();
@rmgraphicdesign
return Math.floor(Math.random()*(max-min+1))+min;
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 13:00
I see I wrote the code wrong thank you @adtpdn
CamperBot
@camperbot
Oct 19 2015 13:00
rmgraphicdesign sends brownie points to @adtpdn :sparkles: :thumbsup: :sparkles:
:star: 182 | @adtpdn | http://www.freecodecamp.com/adtpdn
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 13:02
I just solved the bonfire that I asked about myself, lol.
@adtpdn what was the bonfire you're stuck in? I'll try to help.
Aditya Pradhana
@adtpdn
Oct 19 2015 13:02
Bonfire: Reverse a String
CamperBot
@camperbot
Oct 19 2015 13:02

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

Aditya Pradhana
@adtpdn
Oct 19 2015 13:02
@gunrunners-paradise
how to reverse this string
function reverseString(str) {
  return str;
}

reverseString('hello');
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 13:04
@adtpdn you split it into an array, with the split function, reverse with the function that's called reverse and use the join function. This one is pretty straightforward.
I'll go check if I'm correct
Aditya Pradhana
@adtpdn
Oct 19 2015 13:05
can u gimme example for code ? @gunrunners-paradise
Oleg Cherkasky
@gunrunners-paradise
Oct 19 2015 13:08
var string = "something";
string.split(""); // this turns it into an array
// there are 2 other functions that are written in a similar way, do some experimenting. It's more fun to do it yourself. Even if it is frustrating at first.
@adtpdn This bonfire is pretty easy, experiment a bit. They already give you all the functions you need.
If I give you any more advice I'd just be solving it for you.
Aditya Pradhana
@adtpdn
Oct 19 2015 13:13
ok i'll try :D
Phil Andy
@philandy
Oct 19 2015 13:21
is there a way to set status as afk?
Serhii Borovskyi
@serhiicss
Oct 19 2015 13:28
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
Could someone explain why there is a JQ function within a JQ function?
Azamat Kukenov
@azamat89
Oct 19 2015 13:32
@dantesolis thank you for your explanation. but where should I write my code to be accesible outside of object
CamperBot
@camperbot
Oct 19 2015 13:32
azamat89 sends brownie points to @dantesolis :sparkles: :thumbsup: :sparkles:
:star: 183 | @dantesolis | http://www.freecodecamp.com/dantesolis
Herman Fassett
@HermanFassett
Oct 19 2015 13:35
@serhiicss the inner JQ function first gets all objects of class slot but then selects one among them (of type HTMLDivElement), so then the outer function has to be used to convert back to object so .html can be called on it :) Something like that
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 13:49

Help guys I'm out of my depth: var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;
function myFunction(){
// Create an if-else statement here to return "heads" if flip is 0. Otherwise return "tails".

// Only change code below this line.

if (0 === "heads"){
return true;
} else {
return false;
}

// Only change code above this line.
}

// We use this function to show you the value of your variable in your output box.
var result = myFunction();if(typeof(flip) !== "undefined" && typeof(flip) === "number" && typeof(result) !== "undefined" && typeof(result) === "string"){(function(y,z){return 'flip = ' + y.toString() + ', text = ' + z;})(flip, result);}

CamperBot
@camperbot
Oct 19 2015 13:49
no wiki entry for: guys im out of my depth var flip mathfloormathrandom 1 - 0 1 0function myfunction create an if-else statement here to return heads if flip is 0 otherwise return tails only change code below this lineif 0 heads return true else return false only change code above this line we use this function to show you the value of your variable in your output boxvar result myfunctioniftypeofflip undefined typeofflip number typeofresult undefined typeofresult stringfunctionyzreturn flip ytostring text zflip result
:pencil: click here to create one now!after creating your page type update to reload it here
DTing
@dting
Oct 19 2015 13:50
@rmgraphicdesign they want you to return "heads" or "tails"
depending on the value of flip
0 === "heads" always evaluates to false
you want to compare the variable flip with 0
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 13:51
@dting thank you dont tell me anymore will try again
CamperBot
@camperbot
Oct 19 2015 13:51
rmgraphicdesign sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1428 | @dting | http://www.freecodecamp.com/dting
Aditya Pradhana
@adtpdn
Oct 19 2015 13:55
@gunrunners-paradise damn i got it ahahaha
function reverse(s) {
  return s.split('').reverse().join('');
}
thanks @gunrunners-paradise
CamperBot
@camperbot
Oct 19 2015 13:55
adtpdn sends brownie points to @gunrunners-paradise :sparkles: :thumbsup: :sparkles:
:star: 211 | @gunrunners-paradise | http://www.freecodecamp.com/gunrunners-paradise
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:03
Ok any more hints on this I'm not sure how to write it? Waypoint: Use Conditional Logic with If and Else Statements
dont want the full answer just another point in the right direction
DTing
@dting
Oct 19 2015 14:06
@rmgraphicdesign your if statement should do a comparison that checks if flip is equal to 0
if it is return the string "heads"
Hans van Riet
@hansinla
Oct 19 2015 14:06
@rmgraphicdesign An if statement tests if what’s between () is true. If so it executes what’s between the {}. Optionally you can use else to execute what’s between the following {} when the if statement is not true.
DTing
@dting
Oct 19 2015 14:06
if not return the string "tails"
if (conditional) {
// what happens if the conditional is true
} else {
// what happens if the conditional is false
}
Serhii Borovskyi
@serhiicss
Oct 19 2015 14:07
@HermanFassett So the inner function assigns an object to the element?
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:08
ok will try again @dting thanks again
CamperBot
@camperbot
Oct 19 2015 14:08
rmgraphicdesign sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: rmgraphicdesign already gave dting points
DTing
@dting
Oct 19 2015 14:16
@rmgraphicdesign good luck
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:22

i am getting this so wrong should I have something to do with flip in there?: if (0 === "heads"){
return true;
} else {false;}

if (1 ==="tails"){
return true;
}else false;}

don't give me the answer even if your dying too thanks
CamperBot
@camperbot
Oct 19 2015 14:22
if you want to thank someone, put an @ before their name!
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:24
am I even close?
Aleksandar B.
@aleksandar-b
Oct 19 2015 14:26
I am having trouble with npm publish, in 'How to NPM'. In the error part it says that i need to npm adduser. But once again it throws another mistake. Can someone take a look?
https://ide.c9.io/samosale/my_first_fcc_app
DTing
@dting
Oct 19 2015 14:29
@rmgraphicdesign if (0 === "heads"){ this will never evaluate to true
you want to compare flip to 0
not "heads"
and you want to return "heads" if flip is equal to 0
else you want to return "tails"
should be a total of 5 lines of code
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:30
ok try again thank you for your patience
CamperBot
@camperbot
Oct 19 2015 14:30
if you want to thank someone, put an @ before their name!
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:31
done it awesome @dting thank you
CamperBot
@camperbot
Oct 19 2015 14:31
rmgraphicdesign sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: rmgraphicdesign already gave dting points
Robert Montgomery
@rmgraphicdesign
Oct 19 2015 14:31
thought it had to be a false or true statement
got it now
Cody Bouscaren
@codybousc
Oct 19 2015 14:43

hey all, this seems slightly ridiculous but i can't seem to get the text to align center for the random quote machine zipline:
http://codepen.io/codybousc/pen/xwXMKv

any suggestions/explanations would be greatly appreciated!

Jason Wood
@catapixel
Oct 19 2015 14:46
@codybousc text-align: center; needs to be applied to your .innerbox style
Cody Bouscaren
@codybousc
Oct 19 2015 14:48
@catapixel GRRRRRRRRR!
thank you!
CamperBot
@camperbot
Oct 19 2015 14:48
if you want to thank someone, put an @ before their name!
Cody Bouscaren
@codybousc
Oct 19 2015 14:48
i was applying it to the quote class, but yes this makes sense
i suck bit time with css
Jason Wood
@catapixel
Oct 19 2015 14:49
no problem. We all do :wink:
James Roeder
@JGRoeder
Oct 19 2015 14:49
To expand, text-align: center; aligns inline children to a block parent. So putting it on a span which is not a block level element, won't have any effect.
for ref
Jason Wood
@catapixel
Oct 19 2015 14:50
^ good explanation of why what you were doing didn't work.
Cody Bouscaren
@codybousc
Oct 19 2015 14:50
duly noted @JGRoeder
thank you!
CamperBot
@camperbot
Oct 19 2015 14:50
if you want to thank someone, put an @ before their name!
mwillburn
@mwillburn
Oct 19 2015 14:51
find title case
CamperBot
@camperbot
Oct 19 2015 14:51

find title case

:zero: bonfire title case a sentence

Michael Bomholt
@bomholtm
Oct 19 2015 14:51
@codybousc just add the center element to the div instead of span
oh too late lol
Cody Bouscaren
@codybousc
Oct 19 2015 14:52
@JGRoeder any good CSS references? texts or tutorials?
James Roeder
@JGRoeder
Oct 19 2015 14:52
I think you're doing fine. CSS can be esoteric at best. When in doubt, just reference the MDN or the actual spec.
But there are others here who probably have good sources for you.
Michael Bomholt
@bomholtm
Oct 19 2015 14:53
http://learn.shayhowe.com/html-css/ is great for html and css
Cody Bouscaren
@codybousc
Oct 19 2015 14:54
@bomholt thank ya!
CamperBot
@camperbot
Oct 19 2015 14:54
codybousc sends brownie points to @bomholt :sparkles: :thumbsup: :sparkles:
:star: 380 | @bomholt | http://www.freecodecamp.com/bomholt
Cody Bouscaren
@codybousc
Oct 19 2015 14:54
i'll check it out!
Michael Bomholt
@bomholtm
Oct 19 2015 14:57
you also could check out the html and css stuff on codecademy. but personally i get the most from just doing stuff and looking everything i need up on MDN or other documentation resources
Cody Bouscaren
@codybousc
Oct 19 2015 14:59
i've read that it's easiest to land a junior dev position if you're really solid on html and css--since that's likely what you'll be doing to start with anyway. so in addition to learning JS/Angular, i really want to get down my html/css skills which are pretty darn weak at the moment
Aleksandar B.
@aleksandar-b
Oct 19 2015 15:16
@catapixel thanks for help man!
CamperBot
@camperbot
Oct 19 2015 15:16
samosale sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 473 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Oct 19 2015 15:18
@samosale Like I said I got 8-10 and 13-14 to work but the others failed miserably. Just skip them. Best I can remember is that it's the environment and if you do the exercises locally they will pass no problem.
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 15:25
Does anyone know why my game doesn't work in "pen" or "full" mode...but works only in debug mode?
Susan
@SusanGrattan
Oct 19 2015 15:39
Why is there no HTML5 lessons here?
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 15:41
Susan
@SusanGrattan
Oct 19 2015 15:42
Oooops. I finished those but it was different than the HTML5 I was learning on another site.. Sorry.
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 15:49
Try Codeacademy
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 15:52
can someone help me find error in this: <p>View more <a href="http://freecatphotoapp.com">cat photos</a></p>
it shows red mark on "Your a element should be nested within your new p element."
Reggie
@Reggie01
Oct 19 2015 15:54
@riteshshrv what's the name of the waypoint?
Susan
@SusanGrattan
Oct 19 2015 15:54
is there a space after "view more"? @riteshshrv
JP Pannell
@SaltedAdvertising
Oct 19 2015 15:55
I am having issue with adding the .smaller-image class to my image. Can someone lead me to the right direction? I add it in my style but it doesn't seem to work.
Susan
@SusanGrattan
Oct 19 2015 15:55
I think it needs to have the www
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 15:55
yes
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 15:56
@SaltedAdvertising is it correctly spelled in your HTML?
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 15:56
@Reggie01 Nest an Anchor Element within a Paragraph
JP Pannell
@SaltedAdvertising
Oct 19 2015 15:56
@TheHighPriestess this is what i added in. .smaller-image {
width: 100px;
}
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 15:56
@SusanGrattan tried www no good!
Susan
@SusanGrattan
Oct 19 2015 15:57
@riteshshrv this is what mine looks like <p>View more <a href="http://www.catphotapp.com">cat photos</a></p>
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 15:57
@SaltedAdvertising do you have this in your html on the proper element: class="smaller-image" ??
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 15:57
@SusanGrattan there's a space after View more
Susan
@SusanGrattan
Oct 19 2015 15:59
@riteshshrv I just pasted your code into my waypoint and it worked. So it might be an error somewhere else
Is there a way to post what all your code looks like?
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 16:00
@SusanGrattan I tried your code but its still stuck!
Reggie
@Reggie01
Oct 19 2015 16:00
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
You left the www out in yours @riteshshrv .
JP Pannell
@SaltedAdvertising
Oct 19 2015 16:01
@TheHighPriestess That hasnt been taught where I am at yet. Its excercise number 17.
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 16:02
@SusanGrattan @Reggie01 "Your p element should have the text 'View more ' (with a a space after it)." This is still in red!
@Reggie01 I corrected that mistake but its still not working.
Reggie
@Reggie01
Oct 19 2015 16:03
Did you try copy and pasting my code
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 16:03
@Reggie01 yep
@Reggie01 i'm going to try different browser!
Susan
@SusanGrattan
Oct 19 2015 16:03
try resetting it
and doing it again.
Reggie
@Reggie01
Oct 19 2015 16:04
Yeah, maybe the reset will work for you. I'm using chrome browser
Susan
@SusanGrattan
Oct 19 2015 16:04
Also, someone told me that sometimes when the browser is zoomed in or out it can create a bug..
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 16:07
@SaltedAdvertising once you create the class...you then have to add it to the html element
Valient47
@Valient47
Oct 19 2015 16:08
just inserted the link, how do you call it to <h2>
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 16:09
@SaltedAdvertising like this: <img src="https://bit.ly/fcc-relaxing-cat" class="smaller-image">
it's a two step process
JP Pannell
@SaltedAdvertising
Oct 19 2015 16:10
@TheHighPriestess you are amazing. Thank you so much!
CamperBot
@camperbot
Oct 19 2015 16:10
saltedadvertising sends brownie points to @thehighpriestess :sparkles: :thumbsup: :sparkles:
:star: 299 | @thehighpriestess | http://www.freecodecamp.com/thehighpriestess
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 16:10
in other words...you have to indicate which HTML element to apply that style to. You have to tell it...by including that in the HTML tag
otherwise the style just sits there in your css file....not doing anything
Azamat Kukenov
@azamat89
Oct 19 2015 16:14
Waypoint: Make Object Properties Private here I should myBike.getSpeed publicly accessible.
how can I do it?
Susan
@SusanGrattan
Oct 19 2015 16:16
So, HTML and CSS were a breeze for me.. But JavaScript is just not clicking in my brain. Anyone know of some good videos that explain it a little better/differently?
Reggie
@Reggie01
Oct 19 2015 16:17
@SusanGrattan just ask questions if you get stuck. I don't think it makes sense until you do a bunch of problems, imo.
@azamat89 you can use the "this" keyword to make myBike.getSpeed publicly accessible
Susan
@SusanGrattan
Oct 19 2015 16:19
Okay, Thanks @Reggie01
CamperBot
@camperbot
Oct 19 2015 16:19
susangrattan sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:star: 224 | @reggie01 | http://www.freecodecamp.com/reggie01
Elizabeth Hatleli
@TheHighPriestess
Oct 19 2015 16:22
@SusanGrattan Did you try Codeacademy?
Graham Whitley
@lotusgraham
Oct 19 2015 16:25
anyone want to pair up with me for a bit? I’m working on palindrome bonfire
Susan
@SusanGrattan
Oct 19 2015 16:27
No I haven't @TheHighPriestess I'll try them out. Thank you
CamperBot
@camperbot
Oct 19 2015 16:27
susangrattan sends brownie points to @thehighpriestess :sparkles: :thumbsup: :sparkles:
:star: 300 | @thehighpriestess | http://www.freecodecamp.com/thehighpriestess
Lasynsec
@Lasynsec
Oct 19 2015 16:27
This message was deleted
Hello world freecodecamp
CamperBot
@camperbot
Oct 19 2015 16:28

welcome to FreeCodeCamp @Lasynsec!

Lasynsec
@Lasynsec
Oct 19 2015 16:29
Has anybody passed the Bonfire:Steamroller challenge ?
Graham Whitley
@lotusgraham
Oct 19 2015 16:29
having some trouble with using regular expressions on palindromes bonfire
Lasynsec
@Lasynsec
Oct 19 2015 16:31
I need a little help on how to think through this
Here my little code
'''
CamperBot
@camperbot
Oct 19 2015 16:31
:bulb: to format code use backticks! ``` more info
Lasynsec
@Lasynsec
Oct 19 2015 16:33
function steamroller(arr) 
{
  //I'm a steamroller, baby
  var len = arr.length;
  var newArr = [];
  newArr = arr.reduce(function (flat, toFlatten) 
  {
    return flat.concat(Array.isArray(toFlatten) ? toFlatten : toFlatten);
  }, []);

  //console.log(newArr);
  return newArr;
}
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 16:38
@SusanGrattan @Reggie01 I could not resolve that issue. So i reported a bug #3805
Reggie
@Reggie01
Oct 19 2015 16:46
@riteshshrv ok, hopefully the issue for you. Did you try resetting the problem?
Jason
@Skiippa
Oct 19 2015 16:47
How does one format a second style into a element?
Reggie
@Reggie01
Oct 19 2015 16:48
@Skiippa Are you on a particular problem?
Jason
@Skiippa
Oct 19 2015 16:49
@Reggie01 Waypoint: Import a Google font
I want to insert the Lobster font into the <h2> element
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

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

  }
</style>

<h2 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
Reggie
@Reggie01
Oct 19 2015 16:51
@Skiippa ok, just add the h2 tag in between the style tags. So
h2 {

}
then set the font-family to Lobster like how the p tag style is formatted. So
Jason
@Skiippa
Oct 19 2015 16:54
Alright thanks
CamperBot
@camperbot
Oct 19 2015 16:54
if you want to thank someone, put an @ before their name!
Ritesh Shrivastav
@riteshshrv
Oct 19 2015 16:55
@Reggie01 Yes. I did reset, tried two different browsers but couldn't solve this issue!
Reggie
@Reggie01
Oct 19 2015 16:56
@riteshshrv ok, just making sure.
Azamat Kukenov
@azamat89
Oct 19 2015 16:57
@Reggie01 I do as you say but it doesnt work
Reggie
@Reggie01
Oct 19 2015 16:58
@azamat89 Ok, post your code so I can take a look.
Adnan
@Arbish
Oct 19 2015 16:59
@Reggie01 Almost there... font-family: Lobster
Azamat Kukenov
@azamat89
Oct 19 2015 17:00

@Reggie01 //Let's create an object with two functions. One attached as a property and one not.
var Car = function() {
this.gear = 1;
function addStyle(styleMe){
return 'The Current Gear Is: ' + styleMe;
}
this.getGear = function() {
return addStyle(this.gear);
};
};

var Bike = function() {
// Only change code below this line.
this.speed = 100;
function addUnit(value) {
return value + "KM/H";

}

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

this.myBike.getSpeed=100;

};

// Only change code above this line.
var myCar = new Car();
var myBike = new Bike();

if(myBike.hasOwnProperty('getSpeed')){(function() {return JSON.stringify(myBike.getSpeed());})();};

Reggie
@Reggie01
Oct 19 2015 17:01

@Arbish did you place that code in between h2 brakets

h2{
   property: value
}

font-family is your property, Lobster is your value.
Also, the h2 {} needs to be nested inside the <style></style> tags

Azamat Kukenov
@azamat89
Oct 19 2015 17:04
@Reggie01 ok I have done it thank you
CamperBot
@camperbot
Oct 19 2015 17:04
azamat89 sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:star: 226 | @reggie01 | http://www.freecodecamp.com/reggie01
Aleksandar B.
@aleksandar-b
Oct 19 2015 17:05
@catapixel in my local mashine I am not able to finish 11-12 exercise "Dist Tag" and "Dist Tag Removal".
Is this what I need to write
npm dist-tag add <pkg>@<version> [<tag>]
Reggie
@Reggie01
Oct 19 2015 17:05
@azamat89 ok, was just about to try explaining the problem. Glad you figured it out.
Jason
@Skiippa
Oct 19 2015 17:06
@Reggie01 Can you put multiple classes inside an element? or do you need to put that into a style element?
Adnan
@Arbish
Oct 19 2015 17:06
@Reggie01 exactly as you say
Jason
@Skiippa
Oct 19 2015 17:08
Like ```
  .thick-green-border {
    border-color:green;
    border-width:10px;
    border-style:solid;
  }
</style>

<h2 {
    class="red-text";
    class="thick-green-border";
    } >CatPhotoApp</h2>
do i need to nest .thick-green-border within the <h2> style?
Adnan
@Arbish
Oct 19 2015 17:09
h2 {
     font-family: Lobster;}
Reggie
@Reggie01
Oct 19 2015 17:10
@Skiippa Yes, you can set multiple classes inside one class attribute. for example
<h2 class="blue-text thick-border">Foo Bar</h2>
m-farooqui
@m-farooqui
Oct 19 2015 17:10
hi i am in module 23 and i am having a hard time turning a link into a dead link can someone please help
this is my code
<p>Click here for <a #="http://www.freecatphotoapp.com">cat photos</a>.</p>
KofiAkorli
@KofiAkorli
Oct 19 2015 17:12

@m-farooqui

<a href="#">cat photos</a>

this is how it should be

Jen
@sensei100
Oct 19 2015 17:12
I am stuck on the waypoint with if else statements. Can someone help please? I'm not even sure how to start the code. The example that they show on the bottom seems way more complicated than the directions!
Jason
@Skiippa
Oct 19 2015 17:12
@Reggie01 Ahh i see, it's simpler than you expect
KofiAkorli
@KofiAkorli
Oct 19 2015 17:12
sorry <a href="#"></a> @m-farooqui
Reggie
@Reggie01
Oct 19 2015 17:13
@Skiippa Ok, glad that helped
m-farooqui
@m-farooqui
Oct 19 2015 17:13
thank you @KofiAkorli
CamperBot
@camperbot
Oct 19 2015 17:13
m-farooqui sends brownie points to @kofiakorli :sparkles: :thumbsup: :sparkles:
:star: 195 | @kofiakorli | http://www.freecodecamp.com/kofiakorli
Reggie
@Reggie01
Oct 19 2015 17:14
@sensei100 are you on Waypoint: Use Conditional Logic with If and Else Statements?
Jen
@sensei100
Oct 19 2015 17:14
Yes, that is the one.
KofiAkorli
@KofiAkorli
Oct 19 2015 17:14
@m-farooqui you're welcome
Jen
@sensei100
Oct 19 2015 17:18
I was crushing along until I got to all the Javascript functions, now they are slowing my down. Is anyone able to help with Using Conditional Logic with If and Else Statements?
Hans van Riet
@hansinla
Oct 19 2015 17:18

@sensei100 See it this way:

if (conditional) {
// what happens if the conditional is true
} else {
// what happens if the conditional is false
}

Now in one case you need to return”tails” and in the other ”heads”

Reggie
@Reggie01
Oct 19 2015 17:18

@sensei100 you start with the conditional statement first, which will resolve to a boolean. boolean is true or false.

if(conditional) {
   // do something
} else {
  // do something
}

So the example they give a conditional 1 === 2 which will result in false

Create if and else statements to return the string "heads" if the flip variable is zero
So here the conditional is stated for you in the second half of the sentence
@sensei100 Can you figure out the conditional from that hint? If not I can keep explain more.
Jen
@sensei100
Oct 19 2015 17:24
@Reggie01 @hansinla Thanks for your help. I was able to figure it out!
CamperBot
@camperbot
Oct 19 2015 17:24
sensei100 sends brownie points to @reggie01 and @hansinla :sparkles: :thumbsup: :sparkles:
:star: 546 | @hansinla | http://www.freecodecamp.com/hansinla
:star: 227 | @reggie01 | http://www.freecodecamp.com/reggie01
Yan Kozlovskiy
@YanKozlovskiy
Oct 19 2015 17:38
How does this line of code work?
input = queue.shift()(input);
I'm having trouble understanding (input) after shift
Byron Lagrone
@byronic
Oct 19 2015 17:42
I might be able to help, @YanKozlovskiy
Reggie
@Reggie01
Oct 19 2015 17:42

must be a function at the front of the array

var sayHello = [function(greeting) { return greeting + " Foo"; }];
sayHello.shift()("Morning");

That's my guess.

Byron Lagrone
@byronic
Oct 19 2015 17:43
@YanKozlovskiy Where queue is an array, queue.shift() removes the first element from the array (queue) and returns it; if that element is a function, it then passes (input) to the function
h4r1m4u
@h4r1m4u
Oct 19 2015 17:43
what @byronic said
Byron Lagrone
@byronic
Oct 19 2015 17:44
@YanKozlovskiy @Reggie01 's example is a good one. You can get further reading on it with more examples in the first answer here: http://stackoverflow.com/questions/24846511/i-dont-understand-my-for-loop
Nikola Mitić
@JohneyCodeUp
Oct 19 2015 17:51

Hello good people, i have this:

          <div class="quote-wrapper">
            <img id="author-picture" src="img/rwe.png" alt="Picture of quoted man/woman" />
            <h3 id="author-name">Ralph Waldo Emerson</h3>
          </div>
<button id="get-quote" class="btn btn-warning" type="button" name="button">Get Quote</button>

I have #author-picture float left, but i do not want button to be wrapping around image, is there any way to not let button to be affected by previously img float? :worried:

Jean Surkouf
@jesuarva
Oct 19 2015 17:53
hello world!!
CamperBot
@camperbot
Oct 19 2015 17:53

welcome to FreeCodeCamp @jesuarva!

h4r1m4u
@h4r1m4u
Oct 19 2015 17:53
@JohneyCodeUp is that part of your code in codepen? if so, could you link it?
Jean Surkouf
@jesuarva
Oct 19 2015 17:54
I trying to understand what does the border-radius mean: 50%? That menas the 50% width?
*means
h4r1m4u
@h4r1m4u
Oct 19 2015 17:56
@jesuarva not really. it's just one of the ways you can set how much the corners should be rounded
you can also set it in pixels, ems, rems, etc.
Nikola Mitić
@JohneyCodeUp
Oct 19 2015 17:59
@h4r1m4u i'm coding locally :(
Jean Surkouf
@jesuarva
Oct 19 2015 18:00
@h4r1m4u thanks, but... don’t must it refers to some attribute on the element <img>…. ¿?¿ wich one?
CamperBot
@camperbot
Oct 19 2015 18:00
jesuarva sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 263 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Jean Surkouf
@jesuarva
Oct 19 2015 18:00
width? height?
both? ¿?¿?
h4r1m4u
@h4r1m4u
Oct 19 2015 18:01
@jesuarva "Denotes the size of the circle radius, or the semi-major and semi-minor axes of the ellipsis, using percentage values. Percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box. Negative values are invalid." from https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
@JohneyCodeUp :( tough to give you pointers without seeing the page
Byron Lagrone
@byronic
Oct 19 2015 18:02
thanks @Reggie01
CamperBot
@camperbot
Oct 19 2015 18:02
byronic sends brownie points to @reggie01 :sparkles: :thumbsup: :sparkles:
:star: 228 | @reggie01 | http://www.freecodecamp.com/reggie01
Jean Surkouf
@jesuarva
Oct 19 2015 18:03
@h4r1m4u big thanks!!!!
CamperBot
@camperbot
Oct 19 2015 18:03
jesuarva sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: jesuarva already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Oct 19 2015 18:03
@JohneyCodeUp if you make sure the quote-wrapper div is 100% wide, the button shouldn't wrap. it should be aligned underneath
@jesuarva you're welcome
Reggie
@Reggie01
Oct 19 2015 18:13
lol, thanks @byronic . You did all the hard work explaining the code.
CamperBot
@camperbot
Oct 19 2015 18:13
reggie01 sends brownie points to @byronic :sparkles: :thumbsup: :sparkles:
:star: 23 | @byronic | http://www.freecodecamp.com/byronic
Jason
@Skiippa
Oct 19 2015 18:21
Out of curiosity, why does my img flip with this code?
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
h4r1m4u
@h4r1m4u
Oct 19 2015 18:22
flip?
Jason
@Skiippa
Oct 19 2015 18:23
Yes it shows that it is upside down
h4r1m4u
@h4r1m4u
Oct 19 2015 18:23
that's just the way the image is: https://bit.ly/fcc-relaxing-cat
check the image outside of the page
it's "relaxing cat" afterall :D
Jason
@Skiippa
Oct 19 2015 18:24
... nvm then xD
h4r1m4u
@h4r1m4u
Oct 19 2015 18:24
:)
Guilherme Samora
@guipsamora
Oct 19 2015 18:25

can someone help me with Bonfire: Validate US Telephone Numbers. Thus far this is what I have:

function telephoneCheck(str) {

  var regex = /\d{3}-\d{3}-\d{4}|[1]\s\d{3}\s\d{3}\s\d{4}|^\d{10}$|1\s\d{3}\s\d{3}\s\d{4}|\s\(\d{3}\)\d{3}-\d{4}|1\(\d{3}\)\d{3}-\d{4}|1\s\(\d{3}\)\d{3}-\d{4}/g;

  var check = regex.test(str);

  return check;
}

telephoneCheck("555-555-5555");

And the tests that are not passing are:

telephoneCheck("1 (555) 555-5555") should return true.
telephoneCheck("(555)555-5555") should return true.
telephoneCheck("(555-555-5555") should return false.

Thanks!!

CamperBot
@camperbot
Oct 19 2015 18:25
if you want to thank someone, put an @ before their name!
Mateo Pool
@IAmMyself
Oct 19 2015 18:50
Can someone help me think through Bonfire: Sum All Odd Fibonacci Numbers?
CamperBot
@camperbot
Oct 19 2015 18:50
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Mateo Pool
@IAmMyself
Oct 19 2015 18:52
I can't figure out how to test if it is a Fibonacci number. EDIT: Nevermind
alfa0
@alfa0
Oct 19 2015 18:53
someone help me to figure out how to put radio buttons.
i am stuck: "Waypoint: Create a Set of Radio Buttons"
Thiago Ferreira
@ThiagoFerreir4
Oct 19 2015 18:54
Just showing around
If you need any help while coding
You just come here and ask
for HELP!
Azamat Kukenov
@azamat89
Oct 19 2015 18:55
@Reggie01 Waypoint: Make Instances of Objects with a Constructor Function here how can I make engine be a number?
Waypoint: Make Instances of Objects with a Constructor Function here how can I make engine be a number?
h4r1m4u
@h4r1m4u
Oct 19 2015 18:56
@azamat89 myCar.engines = 1;
Azamat Kukenov
@azamat89
Oct 19 2015 18:57
If I write just engines = 1; isnt it the same? @h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 18:57
no, it's not the same. your code sets variable engines to 1
my code sets the property engines of object myCar to 1
Azamat Kukenov
@azamat89
Oct 19 2015 18:58
@h4r1m4u ok thanks
CamperBot
@camperbot
Oct 19 2015 18:58
azamat89 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 264 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Blee
@bleesand
Oct 19 2015 18:59
Hi, I have a couple of questions. The "help" button usually lead to questions posted for the specific bonfire. Is this elimiated?
h4r1m4u
@h4r1m4u
Oct 19 2015 19:00
no problem. you refer to object properties using the dot notation (myCar.engines, myCar.color) or you can use square brackets (myCar["engines"], myCar["color"]) @azamat89
@bleesand it now just opens the chat window. from what i hear, in the very near future it should open a channel dedicated directly to the bonfire, waypoint, etc.
but for now it just opens the general chat channel
chx2311
@chx2311
Oct 19 2015 19:03
Hello
Byron Lagrone
@byronic
Oct 19 2015 19:03
@alfa0 You can do this easily via the <input> tag in HTML. To make it a radio button you must set the input's type to radio and give it a name shared by the related radio buttons. A good example might be <input type="radio" name="shared">
@alfa0 Additionally, you may wish to nest each radio button inside a <label> so that your text can stay grouped with its accompanying radio button.
Blee
@bleesand
Oct 19 2015 19:05
@h4r1m4u thank you. I hope that changes soon! Having a big question repository is not ideal.
CamperBot
@camperbot
Oct 19 2015 19:05
bleesand sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 265 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 19 2015 19:05
i believe you can ask for hints in the chat:
help bonfire
CamperBot
@camperbot
Oct 19 2015 19:05
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
alfa0
@alfa0
Oct 19 2015 19:05
@byronic could you provide me some example .
h4r1m4u
@h4r1m4u
Oct 19 2015 19:06
bonfire Reverse a String
CamperBot
@camperbot
Oct 19 2015 19:06

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

h4r1m4u
@h4r1m4u
Oct 19 2015 19:06
there you go @bleesand
Blee
@bleesand
Oct 19 2015 19:06
another question. longest string has a different format. Submitting code but nothing happens.
Byron Lagrone
@byronic
Oct 19 2015 19:07
@alfa0 To just add a radio button by itself, with no accompanying text or attributes: <input type="radio" name="shared">
h4r1m4u
@h4r1m4u
Oct 19 2015 19:07
@bleesand can you post your code?
Byron Lagrone
@byronic
Oct 19 2015 19:07
@alfa0 and since I just spotted the markdown options, here it is again in a neater format: '<input type="radio" name="shared">'
or not
d'oh

'''

<input type="radio" name="shared">
'''

CamperBot
@camperbot
Oct 19 2015 19:08
:bulb: to format code use backticks! ``` more info
Byron Lagrone
@byronic
Oct 19 2015 19:08
I am tres dumb. This time I'll get it:
<input type="radio" name="shared">
Hopefully that helped anyone who needed to 1) create a radio button or 2) learn to markdown code using the backtick (located above the left Tab on a standard keyboard)
I fell into category 2
hidekisrn
@hidekisrn
Oct 19 2015 19:11
Somebody help me please : Waypoint: Iterate over Arrays with map.
cant do the map method
h4r1m4u
@h4r1m4u
Oct 19 2015 19:11
post your code
Aditya Pradhana
@adtpdn
Oct 19 2015 19:12
This ? @hidekisrn
//Use map to add three to each value in the array
var array = [1,2,3,4,5];

array = array.map(function(val){
  return val + 3;
});
Francesco Eri
@francescoeri
Oct 19 2015 19:13

hi can i have a little help please ?
I'm here: " Add a div element with the class well inside each of your div elements with the class "col-xs-6" "

and this is my code, but something does not work:

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6 well">

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

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

hidekisrn
@hidekisrn
Oct 19 2015 19:13
@adtpdn ouch, forgot the ) at the final...thanks :)
CamperBot
@camperbot
Oct 19 2015 19:13
hidekisrn sends brownie points to @adtpdn :sparkles: :thumbsup: :sparkles:
:star: 185 | @adtpdn | http://www.freecodecamp.com/adtpdn
h4r1m4u
@h4r1m4u
Oct 19 2015 19:14
@francescoeri you added the well class to the col-xs-6
you need to add another div, with the class well, inside the col-xs-6 div instead
Francesco Eri
@francescoeri
Oct 19 2015 19:15
@h4r1m4u thankyou, i thoug u can add to the same div
Aditya Pradhana
@adtpdn
Oct 19 2015 19:16
@francescoeri put like this
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well">    </div> <!--- HERE THE WELL -->
    </div>
    <div class="col-xs-6">
      <div class="well">    </div>
    </div>
  </div>
</div>
h4r1m4u
@h4r1m4u
Oct 19 2015 19:16
@francescoeri you can, but it's not what the exercise is asking you to do
Francesco Eri
@francescoeri
Oct 19 2015 19:16
@adtpdn thankyou :D
h4r1m4u
@h4r1m4u
Oct 19 2015 19:17
@adtpdn give people hints, so that they figure it out themselves. don't give them solutions directly. it doesn't help their learning
Aditya Pradhana
@adtpdn
Oct 19 2015 19:17
@h4r1m4u hahaha sorry :D
okay next i'll hints
h4r1m4u
@h4r1m4u
Oct 19 2015 19:18
:+1:
Aditya Pradhana
@adtpdn
Oct 19 2015 19:18
i just comment on html ahahah @h4r1m4u :smile: sorry that's bad teaching :'
Francesco Eri
@francescoeri
Oct 19 2015 19:20
@adtpdn @h4r1m4u thanks you both :D
CamperBot
@camperbot
Oct 19 2015 19:20
francescoeri sends brownie points to @adtpdn and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 266 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
:star: 186 | @adtpdn | http://www.freecodecamp.com/adtpdn
h4r1m4u
@h4r1m4u
Oct 19 2015 19:20
@francescoeri you're welcome
Agustín Malnero
@agustinmalnero
Oct 19 2015 19:25
Hello,
Aditya Pradhana
@adtpdn
Oct 19 2015 19:26
Hello @agustinmalnero
:D
Azamat Kukenov
@azamat89
Oct 19 2015 19:28
var array = [1,2,3,4,5];
newArray = array.map(function(array){
return array+3;
})
(function() {return array;})();
where do I do mistake?
Waypoint: Iterate over Arrays with map
Yan Kozlovskiy
@YanKozlovskiy
Oct 19 2015 19:29
var puzzlers = [
  function(a) { return 8 * a - 10; },
  function(a) { return (a - 3) * (a - 3) * (a - 3); },
  function(a) { return a * a + 4; },
  function(a) { return a % 5; }
];

console.log(puzzlers[puzzlers[1](3)](puzzlers[3](9)));
How is that 22 and not 4?
h4r1m4u
@h4r1m4u
Oct 19 2015 19:30
@azamat89 in saving the result of the map function into a variable called newArray. if you check the test function at the bottom, can you see what variable name it expects? (function() {return array;})();
Aditya Pradhana
@adtpdn
Oct 19 2015 19:32
@azamat89
(function() {return array;})();
Azamat Kukenov
@azamat89
Oct 19 2015 19:36
@h4r1m4u @adtpdn your answers are not correct
alfa0
@alfa0
Oct 19 2015 19:36
<labal><input type="radio" name="indoor-outdoor">indoor
</labal>
<labal>
<input type="radio" name="indoor-outdoor">outdoor
</labal>
why this is not working?
rbunz
@rbunz08
Oct 19 2015 19:37
can someone please help me?? I am getting really frustrated lol I am just trying to change the size of my font and its not working and I cant figure out why??? http://codepen.io/rbunz08/pen/OyzLNp?editors=010 I am just trying to change the Integrating edutech to a different font
Azamat Kukenov
@azamat89
Oct 19 2015 19:37
@alfa0 maybe it should be label
rbunz
@rbunz08
Oct 19 2015 19:37
It should be in the Css #header
alfa0
@alfa0
Oct 19 2015 19:38
ohhh!! shit
h4r1m4u
@h4r1m4u
Oct 19 2015 19:39
@azamat89 i didn't give you answer. i pointed you in the right direction though
please read what i wrote again
alfa0
@alfa0
Oct 19 2015 19:39
@azamat89 thnks but now i am feeling embarrassing!!
CamperBot
@camperbot
Oct 19 2015 19:39
alfa0 sends brownie points to @azamat89 :sparkles: :thumbsup: :sparkles: