These are chat archives for FreeCodeCamp/Help

30th
Oct 2015
tepeyak
@tepeyak
Oct 30 2015 00:00
that's comforting :)
Tameera Corporal
@TameeraCorporal
Oct 30 2015 00:16
for some reason when I this the run test button nothing is happening-is anyone else having this problem?
Aleksander Gębicki
@Takumar
Oct 30 2015 00:18
@TameeraCorporal where are you now? I mean in which waypoint, bonfire.
Manish Giri
@Manish-Giri
Oct 30 2015 00:34
W'sup people
back to freecodecamp after a while, so much has changed
Steven Parker
@Philosophist
Oct 30 2015 00:35
button {
  border-style: solid;
  border: 2px solid black;
}
The above css should be giving my contact buttons (created with html <button>) a black border, right? Why isn't this working?
http://codepen.io/Philosophist/pen/xwZGar
I suspect it's codepen being glitchy, but that's natural for a learner in my position to falsely assume.
David Wilbanks
@dwilbank68
Oct 30 2015 00:36
contact ain't a button
it's an anchor tag
Steven Parker
@Philosophist
Oct 30 2015 00:37
@dwilbank68 I'm talking about the ones on the bottom, that link to linkedin and twitter, etc
Dibyea
@Dibyea
Oct 30 2015 00:38
having a problem nesting all HTML elements in container-fluid. please can someone help me.
David Wilbanks
@dwilbank68
Oct 30 2015 00:39
<div class="container-fluid">
  all the rest of your stuff nicely nested in here
</div>
Steven Parker
@Philosophist
Oct 30 2015 00:40
  <div id="contact" class="container-fluid section">
    <h1 class="text-center">Contact Info</h1>
    <div class='row'>
      <div class='col-md-3'>
        <button class='btn btn-block' href='https://twitter.com/youngidealist' target='_blank'>Twitter</button>
      </div>
      <div class='col-md-3'>
        <button class='btn btn-block' href='https://www.linkedin.com/pub/steven-parker/14/134/53b' target='_blank'>LinkedIn</button>
      </div>
      <div class='col-md-3'>
        <button class='btn btn-block' href='https://github.com/Philosophist' target='_blank'>GitHub</button>
      </div>
      <div class='col-md-3'>
        <button class='btn btn-block' href='http://www.freecodecamp.com/philosophist' target='_blank'>Free Code Camp</button>
      </div>
    </div>
David Wilbanks
@dwilbank68
Oct 30 2015 00:41
@Philosophist targeting .btn works... not sure why the other method doesn't
oh I know
cuz bootstrap's classes are overriding whatever you wrote
so you have to target more specifically... like .btn
Dibyea
@Dibyea
Oct 30 2015 00:43
@dwilbank68 Thx a million.
CamperBot
@camperbot
Oct 30 2015 00:43
dibyea sends brownie points to @dwilbank68 :sparkles: :thumbsup: :sparkles:
:star: 13 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68
David Wilbanks
@dwilbank68
Oct 30 2015 00:43
yay
dantepicasso
@dantepicasso
Oct 30 2015 00:44
how do you post the code like that?
Steven Parker
@Philosophist
Oct 30 2015 00:44
@dwilbank68 Oh. Thanks. That makes a lot more sense. Bootstrap's classes override everything unless you target them. Got it.
CamperBot
@camperbot
Oct 30 2015 00:44
philosophist sends brownie points to @dwilbank68 :sparkles: :thumbsup: :sparkles:
Aleksander Gębicki
@Takumar
Oct 30 2015 00:44
@dantepicasso wiki format
CamperBot
@camperbot
Oct 30 2015 00:44
:star: 14 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68
Aleksander Gębicki
@Takumar
Oct 30 2015 00:44
wiki format
CamperBot
@camperbot
Oct 30 2015 00:44

: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

dantepicasso
@dantepicasso
Oct 30 2015 00:44
cool, thanks
CamperBot
@camperbot
Oct 30 2015 00:44
if you want to thank someone, put an @ before their name!
dantepicasso
@dantepicasso
Oct 30 2015 00:45
@Takumar Thanks
CamperBot
@camperbot
Oct 30 2015 00:45
dantepicasso sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 593 | @takumar | http://www.freecodecamp.com/takumar
Steven Parker
@Philosophist
Oct 30 2015 00:57
Can anyone check if my codepen buttons for twitter, github, etc. at the bottom of the page are working?
http://codepen.io/Philosophist/pen/xwZGar
David Wilbanks
@dwilbank68
Oct 30 2015 00:58
buttons can't have hrefs
only anchor tags (they ain't working)
an anchor tag can be styled like a btn though, and no one will know the difference
Garrett Schultz
@garettschultz
Oct 30 2015 01:00
what does iterate mean?
David Wilbanks
@dwilbank68
Oct 30 2015 01:00
step through a series one by one
Garrett Schultz
@garettschultz
Oct 30 2015 01:02
thank you @dwilbank68
CamperBot
@camperbot
Oct 30 2015 01:02
gratschultz2013 sends brownie points to @dwilbank68 :sparkles: :thumbsup: :sparkles:
:star: 15 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68
David Wilbanks
@dwilbank68
Oct 30 2015 01:02
yay
Garrett Schultz
@garettschultz
Oct 30 2015 01:02
@Philosophist your buttons work but I hope you plan to restyle them.
Steven Parker
@Philosophist
Oct 30 2015 01:03
@dwilbank68 That's funny, the forkable example given uses href
http://codepen.io/FreeCodeCamp/pen/mJNqQj/
Garrett Schultz
@garettschultz
Oct 30 2015 01:03
@Philosophist im sorry the buttons are not working, they arent clickable
I click them and nothing happens
David Wilbanks
@dwilbank68
Oct 30 2015 01:04
forkable example needs to be fixed
Steven Parker
@Philosophist
Oct 30 2015 01:07
@dwilbank68 Ok. Hmm...
@gratschultz2013 Could you be more specific on what to restyle? font-color doesn't seem to be working.
@gratschultz2013 @dwilbank68 Thanks for checking
CamperBot
@camperbot
Oct 30 2015 01:08
philosophist sends brownie points to @gratschultz2013 and @dwilbank68 :sparkles: :thumbsup: :sparkles:
:warning: philosophist already gave dwilbank68 points
:star: 199 | @gratschultz2013 | http://www.freecodecamp.com/gratschultz2013
Joshua Gammage
@MrMagma
Oct 30 2015 01:22
Hello, I'm having a bit of trouble with the local weather zipline. I'm getting weather data that is vastly off, the city it says I'm in is nowhere near where I live and the temperatures are off by about 30 degrees F. I'm using ipinfo.io to fetch the location since I can't use the geolocation API on codepen, and openweathermap API to fetch my weather. I've checked the responses from both APIs and ipinfo is giving accurate data while openweather API is messing up. Any help would be appreciated
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:23
@JavascriptFTW do you have a link to your pen?
Joshua Gammage
@MrMagma
Oct 30 2015 01:24
@MattYamamoto Here
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:27
@JavascriptFTW it's working for me. So are you saying the response from ipinfo has one set of coordinates, but openweather map either doesn't map the same location to those coords or open weather map doesn't even return data with the correct coords?
Cory Johnson
@CygnusSW
Oct 30 2015 01:28
@JavascriptFTW Working for me as well, all your location is there. You live in pflugerville?
Joshua Gammage
@MrMagma
Oct 30 2015 01:28
@MattYamamoto I put the coordinates from the ipinfo response into Google maps and it showed exactly where I was, but openweathermap seems to be returning data for Peabody Minnesota. I don't even live in Minnesota
David Wilbanks
@dwilbank68
Oct 30 2015 01:30
lat and long are switched
(just a guess) ahaha
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:30
@JavascriptFTW what are the lat, lon coordinates you have?
Cory Johnson
@CygnusSW
Oct 30 2015 01:32
@dwilbank68 I don't think they are switched. It's pulling my location fine
Jeremy Roe
@jeremyroe
Oct 30 2015 01:43
Anyone have a minute to look over my portfolio zipline and spot any issues I should address? Still need to move off default bootstrap colors and add some background graphics
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:46
@jeremyroe your contact nav link doesn't work.
Jeremy Roe
@jeremyroe
Oct 30 2015 01:46
Thanks @MattYamamoto
CamperBot
@camperbot
Oct 30 2015 01:46
jeremyroe sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 394 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Jeremy Roe
@jeremyroe
Oct 30 2015 01:47
Should work now - Had reworked that div a bit and missed it
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:50
@jeremyroe yes, that's working for me now too. Your portfolio images overlap at certain (small) screen widths, not sure if that's something you care about.
Jeremy Roe
@jeremyroe
Oct 30 2015 01:51
@MattYamamoto Thanks again - I’ll give that a look also
CamperBot
@camperbot
Oct 30 2015 01:51
jeremyroe sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave mattyamamoto points
Jeremy Roe
@jeremyroe
Oct 30 2015 01:51
Can I ask which browser your testing with to get that result?
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:52
I'm using firefox on windows
Jeremy Roe
@jeremyroe
Oct 30 2015 01:52
Cool thanks - trying to replicate it
CamperBot
@camperbot
Oct 30 2015 01:52
if you want to thank someone, put an @ before their name!
Jeremy Roe
@jeremyroe
Oct 30 2015 01:53
oh yup - I see it - Chrome doesn’t have this issue
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:54
@jeremyroe one more thing... I also loose your contact buttons at small screen widths too!
oh, I loose them at the top as well in that same situation
Nick Trull
@nicktrull
Oct 30 2015 01:58
can anyone explain the logic behind: lastName[lastName.length - 1]; returning the last value stored and not the second to last value? i'm just trying to dial in why '-1' calls to the last value. i've went through several waypoints now not totally clear on why something worked and now its catching up to me so i'm starting over trying to understand every aspect this time.
Matt Yamamoto
@MattYamamoto
Oct 30 2015 01:58
@nicktrull arrays start with index zero. while length counts actual indicies.
so an array with 5 items has indicies 0 through 4, and it's lenght is 5.
Jeremy Roe
@jeremyroe
Oct 30 2015 02:01
@MattYamamoto It should compress to the hamburger button and reappear with that button press - I’m not quite happy with that behavior though so I may dig it in favor of just compressing the menu bar
Nick Trull
@nicktrull
Oct 30 2015 02:01
@MattYamamoto so the negative 1 calls array value 4 from something with a length of 5
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:02
@jeremyroe I don't see a hamburger button in either place
Jeremy Roe
@jeremyroe
Oct 30 2015 02:03
hmm ok
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:03
@nicktrull oh, it's not a negative one call, it's subtracting one from the length. ex var x = [0, 1, 2, 3, 4] has a lenght of 5 x.length returns 5, so x.length - 1 returns 4.
Jeremy Roe
@jeremyroe
Oct 30 2015 02:04
@MattYamamoto should retain the menu now as it gets smaller - ditched hamburger
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:04
@jeremyroe haha, feel like I'm the bearer of bad news
Jeremy Roe
@jeremyroe
Oct 30 2015 02:04
@MattYamamoto no worries - that’s what I’m looking for
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:05
@jeremyroe just reloaded... still don't see the contact buttons in either spot (am checking on FF and Chrome now)
Jeremy Roe
@jeremyroe
Oct 30 2015 02:06
@MattYamamoto Ok thanks for the update - Firing up my windows VM - I’m on Mac
CamperBot
@camperbot
Oct 30 2015 02:06
jeremyroe sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave mattyamamoto points
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:06
@jeremyroe I only gave your html a quick glance, but I feel like you're missing some class="row" divs in there.... but not sure. and not sure if that's going to fix anything.
Jeremy Roe
@jeremyroe
Oct 30 2015 02:07
@MattYamamoto When you’re referring to contact buttons do you mean the twitter - github etc onces or contact in the top bar?
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:08
@jeremyroe yeah... and also at the bottom of your page in your contact area.
Jeremy Roe
@jeremyroe
Oct 30 2015 02:08
@MattYamamoto Ah - I was thinking contact in top right - I see the issue now - Digging into it
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:09
ah...sorry, I should have been more clear
Jeremy Roe
@jeremyroe
Oct 30 2015 02:11
@MattYamamoto should be fixed - had a stray hidden-xs-down from something I’d tried earlier stuck in the button-group class - thanks for catching that
CamperBot
@camperbot
Oct 30 2015 02:11
jeremyroe sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave mattyamamoto points
Basheerabdul
@basheerabdul
Oct 30 2015 02:11
Hello
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:12
@jeremyroe much better. Looks good now.
Hi @basheerabdul
Jeremy Roe
@jeremyroe
Oct 30 2015 02:13
@MattYamamoto Awesome - Thanks for the help - Going to work on the portfolio images and dress it up then submit - Appreciate the help
CamperBot
@camperbot
Oct 30 2015 02:13
jeremyroe sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave mattyamamoto points
Nick Trull
@nicktrull
Oct 30 2015 02:13
@MattYamamoto i got it now. thanks!
CamperBot
@camperbot
Oct 30 2015 02:13
nicktrull sends brownie points to @mattyamamoto :sparkles: :thumbsup: :sparkles:
:star: 399 | @mattyamamoto | http://www.freecodecamp.com/mattyamamoto
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:13
@jeremyroe no problem
@nicktrull it's always weird to think that computers start counting from zero since us humans tend to start with 1
Jeremy Roe
@jeremyroe
Oct 30 2015 02:37
@MattYamamoto still some tweaks to do but in case you were curious it appears bootstraps resonsive image has a bug in firefox that requires CSS of img { width: 100%; } be added
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:38
@jeremyroe not sure what you had before, but if I just added the responsive image class to your figures it worked fine... at least I think it did. But good to know that could be an issue.
Jeremy Roe
@jeremyroe
Oct 30 2015 02:42
@MattYamamoto Indeed that works and doesn’t require the CSS workaround
Matt Yamamoto
@MattYamamoto
Oct 30 2015 02:44
also good to know.
Justin Hernandez
@JustinHernandez510
Oct 30 2015 02:49
This message was deleted
Lindsay
@linzgroves
Oct 30 2015 02:52
Hey all! Does anyone feel like answering a WordPress question? I'm wondering about something regarding queries...
Rex Schrader
@SaintPeter
Oct 30 2015 02:54
@linzgroves I might be able to answer
Lindsay
@linzgroves
Oct 30 2015 02:55
Awesome! Do you happen to know how to go about writing a loop for a custom post type and a specific category? I've got an idea but not quite sure if it's correct
Justin Hernandez
@JustinHernandez510
Oct 30 2015 02:57
I cant seem to get my Image class for width correct can you guys help me please
Matan Kushner
@matchai
Oct 30 2015 03:02
Hey @JustinHernandez510. Can you give us a snippet of code you've been working with?
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:03

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

Rex Schrader
@SaintPeter
Oct 30 2015 03:03
@linzgroves I'm afraid I don't know.
Lindsay
@linzgroves
Oct 30 2015 03:03
@SaintPeter I think I've got it figured out now! Some help from the main chat :) thanks for being willing to help!
CamperBot
@camperbot
Oct 30 2015 03:03
linzgroves sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1269 | @saintpeter | http://www.freecodecamp.com/saintpeter
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:03
<img src="https://bit.ly/fcc-relaxing-cat">
Rex Schrader
@SaintPeter
Oct 30 2015 03:03
@linzgroves Sure thing!
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:03
this is the image im trying to put a width in
Rex Schrader
@SaintPeter
Oct 30 2015 03:04
@JustinHernandez510 Right - you need to do that by adding a class, yes?
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:04
This message was deleted
Rex Schrader
@SaintPeter
Oct 30 2015 03:04
@JustinHernandez510 Yes, but you need to add the class to the img element.
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:05
<style> .smaller-image {width:100px;} </style>
It would be like that right? @SaintPeter
Rex Schrader
@SaintPeter
Oct 30 2015 03:05
@JustinHernandez510 Yes, now you need to apply that class to the img element by adding a class attribute
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:05
How do you do that?
@SaintPeter
Rex Schrader
@SaintPeter
Oct 30 2015 03:06
@JustinHernandez510
<someTag class="someClass">
Justin Hernandez
@JustinHernandez510
Oct 30 2015 03:13
This message was deleted
sorry I still dont understamd
@SaintPeter
Rex Schrader
@SaintPeter
Oct 30 2015 03:15
@JustinHernandez510 You have a tag, img, you need to add a class attribute, smaller-image to it
@JustinHernandez510 It's in the form:
<tagname class="classname">
Michael Hurwicz
@mhurwicz
Oct 30 2015 03:19
I'm doing the github waypoint. On the "Forks and Clones" one, I went through all the steps, but when I do "git-it verify" I get ""No evidence of push." instead of "Bingo! Detected a push." I actually changed something and pushed to see if that would help, but it didn't. Anyone have any ideas what's happening?
Dibyea
@Dibyea
Oct 30 2015 03:26
Does anyone know how to create a bootstrap button with the text"Like".
Matt Leonard
@matty22
Oct 30 2015 03:26
anyone know if there are any FCC creative assets around here somewhere like logos/icons/etc. that are of decent enough quality to put in my portfolio page as an icon?
Rex Schrader
@SaintPeter
Oct 30 2015 03:26
@Dibyea <button class="btn btn-primary">Like</button>
@matty22 Yes, there is a whole Repo - let me get you the URL
Luis
@Kikoman12
Oct 30 2015 03:27
bonfire Check for Palindromes
CamperBot
@camperbot
Oct 30 2015 03:27

:fire:Bonfire: Check for Palindromes :link:

function palindrome(str) {
  // Good luck!
  return true;
}



palindrome("eye");

Return true if the given string is a palindrome. Otherwise, return false.

more info:  bf details | bf links | hint

Matt Leonard
@matty22
Oct 30 2015 03:27
Excellent, thanks @SaintPeter
CamperBot
@camperbot
Oct 30 2015 03:27
matty22 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1271 | @saintpeter | http://www.freecodecamp.com/saintpeter
Luis
@Kikoman12
Oct 30 2015 03:27
hint
CamperBot
@camperbot
Oct 30 2015 03:27
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Dibyea
@Dibyea
Oct 30 2015 03:28
@SaintPeter thx a million.
CamperBot
@camperbot
Oct 30 2015 03:28
dibyea sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1272 | @saintpeter | http://www.freecodecamp.com/saintpeter
Matt Yamamoto
@MattYamamoto
Oct 30 2015 03:29
Does anybody know of a good/decent wireframing resource that is free?
visageless
@visageless
Oct 30 2015 03:30
Hello. I just started on the code camp and I am struck with the "Waypoint: Style the HTML Body Element"
Can someone please help me with this problem
I am not sure what I am doing wrong
Rex Schrader
@SaintPeter
Oct 30 2015 03:31
@MattYamamoto Pencil is a free wireframe app
@MattYamamoto It's very simplistic, but easy to use
Matt Yamamoto
@MattYamamoto
Oct 30 2015 03:32
@SaintPeter iOS? or is it a webapp?
Luis
@Kikoman12
Oct 30 2015 03:32
@MattYamamoto Mockingbird is free. I think it's a web app.
Rex Schrader
@SaintPeter
Oct 30 2015 03:33
@MattYamamoto Windows, but maybe for other platforms?
Matt Yamamoto
@MattYamamoto
Oct 30 2015 03:33
sweet, thanks @SaintPeter
CamperBot
@camperbot
Oct 30 2015 03:33
mattyamamoto sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1273 | @saintpeter | http://www.freecodecamp.com/saintpeter
Matt Yamamoto
@MattYamamoto
Oct 30 2015 03:33
and thanks @Kikoman12 I'll check that out as well
CamperBot
@camperbot
Oct 30 2015 03:33
mattyamamoto sends brownie points to @kikoman12 :sparkles: :thumbsup: :sparkles:
:star: 183 | @kikoman12 | http://www.freecodecamp.com/kikoman12
Rex Schrader
@SaintPeter
Oct 30 2015 03:34
@Kikoman12 That looks pretty sweet for web-based.
Luis
@Kikoman12
Oct 30 2015 03:37
Hey guys, I need help with Bonfire: Check for Palindromes. So far my palindromes return true, but the strings that are not palindromes don't return false. Here's what I have so far:
function palindrome(str) {
  // Change to lower case
 var replaceStr=str.replace(/[A-Z]/ig, "").toLowerCase();
  // Reverse
 var checkPalindrome=replaceStr.split("").reverse().join("");
  //compare
  if(replaceStr===checkPalindrome){
      return true;}
    else {
      return false;}
}


palindrome("eye");
CamperBot
@camperbot
Oct 30 2015 03:37
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
visageless
@visageless
Oct 30 2015 03:38
@MattYamamoto Balsamiq is free during the trial period. They do a windows and web app. https://balsamiq.com/
h4r1m4u
@h4r1m4u
Oct 30 2015 03:38
@MattYamamoto i used to use Balsamiq. they had a free version, but i just checked and they only offer a 30-day trial: https://balsamiq.com/
snap
Luis
@Kikoman12
Oct 30 2015 03:38
@MattYamamoto Axure also has a 30 day trial. Much better than Balsamiq imo.
Rex Schrader
@SaintPeter
Oct 30 2015 03:40
@Kikoman12 Well, at least part of your problem is that you're removing all the leters with your regex. Try it out at http://regex101.com and see if you can't improve it.
Luis
@Kikoman12
Oct 30 2015 03:41
@SaintPeter Thanks, I'll give it a shot!
CamperBot
@camperbot
Oct 30 2015 03:41
kikoman12 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1275 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Oct 30 2015 03:42
@Kikoman12 I believe if you fix your regex your other code looks correct and complete.
Benjamin Schachter
@benschac
Oct 30 2015 03:47
hello
Rex Schrader
@SaintPeter
Oct 30 2015 03:48
Greetings, how may I assist you?
Luis
@Kikoman12
Oct 30 2015 03:49
@SaintPeter I honestly don't know how to fix my regex. Could you explain to me what is wrong with it?
Rex Schrader
@SaintPeter
Oct 30 2015 03:50
@Kikoman12 Sure - the issue is that you need to remove all non-alpha-numeric characters. Right now, as written, you're removing all LETTERS.
@Kikoman12 You need a way to match everything that is NOT letters or numbers.
@Kikoman12 There are things called "Character Classes" in regex that may be helpful, especially inverse character classes.
@Kikoman12 Think that'll get you rollin?
Luis
@Kikoman12
Oct 30 2015 03:52
@SaintPeter Yeah I think so. Thanks again.
CamperBot
@camperbot
Oct 30 2015 03:52
kikoman12 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: kikoman12 already gave saintpeter points
Jacob Andra
@jacob4
Oct 30 2015 03:52
how do I progress through the pearly gates
I mean, from one challenge to the next?
I don't see any way of clicking "next" when I'm on a challenge
Can you save me, St. Peter, from the sin of being stuck on a challenge?
Luis
@Kikoman12
Oct 30 2015 03:54
@jacob4 Press Ctrl + Enter?
Jahiruddin Saiyed
@jahirsaiyed
Oct 30 2015 04:01
hi guys i got stuck in the style formate as i am new please help me out
Rex Schrader
@SaintPeter
Oct 30 2015 04:02
@jacob4 Well, if you click the big green button it should run the tests.
@jacob4 If all the tests pass (green checkmark), you'll be prompted to move on to the next challenge.
@jahirsaiyed Sure
@jahirsaiyed Not sure I understand where you're stuck though
Luis
@Kikoman12
Oct 30 2015 04:07
@SaintPeter So, if I'm understanding what you've told me, I need something that is the opposite of /[[:alnum:]]/. Right? I can't find what that is. I used /[^a-z]/ and it got me most of the way there (missed one green checkmark).
Rex Schrader
@SaintPeter
Oct 30 2015 04:07
@Kikoman12 /[^a-z]/ is almost it exactly. You need numbers in there too.
Jahiruddin Saiyed
@jahirsaiyed
Oct 30 2015 04:08
i passed all the green marks just couldnt change the element h2 as blue
Luis
@Kikoman12
Oct 30 2015 04:08
@SaintPeter Can you tell me what the answer is? I cannot seem to figure which one it is.
Jahiruddin Saiyed
@jahirsaiyed
Oct 30 2015 04:09
<style>

  h2 {color: red;}

</style>
Rex Schrader
@SaintPeter
Oct 30 2015 04:09
@Kikoman12 Nope, sorry, not in the answer givin' business. I know the answer, but that doesn't help you.
@Kikoman12 You've got all the elements, I think, you just need to wrangle them together.
Jahiruddin Saiyed
@jahirsaiyed
Oct 30 2015 04:09

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

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

Luis
@Kikoman12
Oct 30 2015 04:10
@SaintPeter That's ok. I'll keep trying.
@SaintPeter Finally got it. Thanks for all of the hints!
CamperBot
@camperbot
Oct 30 2015 04:12
kikoman12 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: kikoman12 already gave saintpeter points
Rex Schrader
@SaintPeter
Oct 30 2015 04:12
@Kikoman12 Awesome!
@jahirsaiyed ok
@jahirsaiyed You need to move your HTML out of your style tags
@jahirsaiyed The style is defined betweent he <style> tags and then the HTML comes later.
@jahirsaiyed so:
<style>
  h2 {
     color: blue;
}
</style>
Justin Hernandez
@JustinHernandez510
Oct 30 2015 04:22
how do we change the href to atribute to a #
like how would that look like
<p>Click here for <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>
Rex Schrader
@SaintPeter
Oct 30 2015 04:22
@JustinHernandez510 You see how the href is = to a URL?
@JustinHernandez510 You can change that URL to a #
Justin Hernandez
@JustinHernandez510
Oct 30 2015 04:22
ye
yea
Ohh okay than you! @SaintPeter
thank*
CamperBot
@camperbot
Oct 30 2015 04:23
if you want to thank someone, put an @ before their name!
SaintPeter @SaintPeter bows
Michael Cline
@mcline86
Oct 30 2015 04:25
This Waypoint: Get JSON with jquery getJSON Method is confusing, I have changed the message to the raw json stringify and even used the json object to display a cat image and it still fails the last item
I'm not really sure what it wants me to put in the message box.
Rex Schrader
@SaintPeter
Oct 30 2015 04:26
@mcline86 Let me take a look
@mcline86 You can cut and paste the provided code exactly.
Michael Cline
@mcline86
Oct 30 2015 04:29
okay, so it went through. however mine was nearly identical save for difference in white space. it even worked in the preview. weird
h4r1m4u
@h4r1m4u
Oct 30 2015 04:31
@mcline86 yeah, these JSON waypoints are buggy. yesterday i helped someone pass theirs - they had everything correct, except they used single quotes to wrap the jQuery selector and the API URL. which is completely fine and works, but the tester for the waypoint doesn't seem to like it. it wanted double quotes
Alberto Scicali
@Ciccio99
Oct 30 2015 04:32
@jahirsaiyed You can also just do <h2 style="color: blue;"> MEOWMEOW</h2>
Michael Cline
@mcline86
Oct 30 2015 04:40
That explains it I tend to use single quotes, thank you @h4r1m4u
CamperBot
@camperbot
Oct 30 2015 04:40
mcline86 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 420 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 04:41
@mcline86 my pleasure! i too tend to use single quotes
Sanjit bhardwaj
@sanjit11
Oct 30 2015 05:27

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

orange-text {

color: orange;

}
.pink-text {
color: pink !important ;
}
.blue-text {
color: blue;
}
</style>

<h1 id="orange-text" class="pink-text blue-text" style="color: white">Hello World!</h1>

what is wrong in this code
Hans van Riet
@hansinla
Oct 30 2015 05:32
@sanjit11 if you want to style an id you need to prefix with #
m-akmal
@m-akmal
Oct 30 2015 05:34
@sanjit11 make orange-text a class by .orange-class
oh sorry ".orange-text"
Ian Barker
@IanBarkerDev
Oct 30 2015 05:34
Got a weird problem.
Have a website that works fine. But if I put in an unused empty array it refuses to load and just does so repeatedly until I close it.
l0pthCrack
@l0pthCrack
Oct 30 2015 05:36
Capture.PNG
help me
CamperBot
@camperbot
Oct 30 2015 05:36

:point_right: adding environment variables [wiki]

In Windows

Via GUI

  1. Download Varpanel.
  2. Open Varpanel.
  3. In PATH variable, add the relevant path (for example).

:pencil: read more about adding environment variables on the FCC Wiki

Ian Barker
@IanBarkerDev
Oct 30 2015 05:37
Capital V.
@l0pthCrack
Michael Cline
@mcline86
Oct 30 2015 05:38
@l0pthCrack Your p element should only contain "View more "
Note the space between the e and the last "
Jeremy Roe
@jeremyroe
Oct 30 2015 05:57
Anyone have a minute to review my Quote generator zipline? http://codepen.io/jeremyroe/full/jbKMKR/
Alfredo Melendez
@freddydbz
Oct 30 2015 06:04
Be sure to delete all trailing comment tags, i.e. -->.
can anybody explain
h4r1m4u
@h4r1m4u
Oct 30 2015 06:06
@jeremyroe i love that it's a chuck norris jokes generator. couple of suggestions:
1) i'd prefer if the jokes were displayed under the header, instead of in a pop-up. i find pop-ups annoying and you have to click the ok button to be able to go and generate another joke
2) there's an encoding issue with some of the jokes: "Chuck Norris kills anyone that asks: &quot;Do you want fries with that?&quot;. Because by now everyone should know that Chuck doesn't want fries with anything. Ever."
3) the header buttons blend into the background in firefox. they're fine in chrome
4) the tweet button is supposed to let you tweet the quote/joke that you're currently viewing. not a random joke
Jeremy Roe
@jeremyroe
Oct 30 2015 06:07
Cool - Thanks @h4r1m4u - Solid advice - I’ll get to work on those changes
CamperBot
@camperbot
Oct 30 2015 06:07
jeremyroe sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 421 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 06:07
@freddydbz
<!-- this is some HTML comment -->   see the thing to the left? that's a trailing comment tag. you're supposed to remember to delete these
@jeremyroe my pleasure
Alfredo Melendez
@freddydbz
Oct 30 2015 06:09
thank you
CamperBot
@camperbot
Oct 30 2015 06:09
if you want to thank someone, put an @ before their name!
Alfredo Melendez
@freddydbz
Oct 30 2015 06:10
@h4r1m4u Thanks
CamperBot
@camperbot
Oct 30 2015 06:10
freddydbz sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 422 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 06:11
no problemo
Jeremy Roe
@jeremyroe
Oct 30 2015 06:29
http://codepen.io/jeremyroe/full/jbKMKR/ anyone have any thoughts on how I can make my “Go” button work a 2nd time? It works perfectly the first time but doesn’t seem to want to update the content after
actually appears just my div isnt updating . . .
Jeremy Roe
@jeremyroe
Oct 30 2015 06:35
Ok I think I got it @h4r1m4u feel like peeking again?
h4r1m4u
@h4r1m4u
Oct 30 2015 07:09
@jeremyroe sorry, i was out for lunch. much better now!
Jeremy Roe
@jeremyroe
Oct 30 2015 07:11
Cool - @h4r1m4u Thanks for giving it a second look and all the help tonight - 2am here so I’m gonna crash - Have a good one
CamperBot
@camperbot
Oct 30 2015 07:11
jeremyroe sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 423 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 07:11
my pleasure. nice work! sleep well
Pavel Lazarev
@crazystik
Oct 30 2015 07:12
guys, how to make a dead link?
h4r1m4u
@h4r1m4u
Oct 30 2015 07:16
<a class="i-am-dead"></a>
just kidding :D
<a href="http://someurl.com">link text</a> you need to replace the url (the href attribute value) with #
@crazystik
Ankit Panwar
@coderNoob
Oct 30 2015 07:40
I made a for loop. It went into infinite loop. I closed the tab. Now the Bonfire is not loading. The page has to be loaded again every time and it won't let me edit anything or do anything at all.
Ankit Panwar
@coderNoob
Oct 30 2015 07:59
Nevermind. It's resolved now.
h4r1m4u
@h4r1m4u
Oct 30 2015 08:16
@coderNoob how did you fix it?
Ankit Panwar
@coderNoob
Oct 30 2015 08:23
@h4r1m4u I opened the page and didn't let it load completely by clicking the "X" stop sign and changed the code before it became uneditable.
h4r1m4u
@h4r1m4u
Oct 30 2015 08:23
@coderNoob thanks, good to know! i've seen a number of people run into the same problem, so it's good to know what helps
CamperBot
@camperbot
Oct 30 2015 08:23
h4r1m4u sends brownie points to @codernoob :sparkles: :thumbsup: :sparkles:
:star: 231 | @codernoob | http://www.freecodecamp.com/codernoob
Ankit Panwar
@coderNoob
Oct 30 2015 08:24
@h4r1m4u The problem now is that the sum in my fibo series is not correct despite the fact that the fibo series is correct.
function sumFibs(num) {
  var fib = [];
  fib[0]=0;
  fib[1]=1;
  var sum =0;
  for(var i=2; i<=num; i++){
    fib[i]=fib[i-2]+fib[i-1];
  }
  for(var j=0; j<=num; j++){
    if((fib[j]%2)!==0){
      sum += fib[j];
    }
  }
  return sum;
}
sumFibs(1000);
It's correct for smaller number in the argument but not for large numbers like 1000 or beyond.
h4r1m4u
@h4r1m4u
Oct 30 2015 08:27
@coderNoob holy moly, that's complicated. that said, shouldn't this j<=num; be j <= fib.length - 1? you're iterating over the entire fib array that you've generated in the forloop above, right?
Ankit Panwar
@coderNoob
Oct 30 2015 08:28
@h4r1m4u Yes that's the idea. Need to iterate over the entire array that is.
h4r1m4u
@h4r1m4u
Oct 30 2015 08:29
so why use num there?
Ankit Panwar
@coderNoob
Oct 30 2015 08:29
@h4r1m4u My bad.
@h4r1m4u Produced same result with for(var j=0; j<=fib.length-1; j++).
h4r1m4u
@h4r1m4u
Oct 30 2015 08:30
hmm
Asegid Debebe
@asegid
Oct 30 2015 08:31
@coderNoob why are you adding only odd numbers in the Fib Series?
Ankit Panwar
@coderNoob
Oct 30 2015 08:32
@asegid It's the objective of the Bonfire.
h4r1m4u
@h4r1m4u
Oct 30 2015 08:33
@coderNoob wait, the way you generate the fib sequence seems wrong for(var i=2; i<=num; i++). add console.log(fib) after this first for loop and have a look at what the generated fib array looks like
there are WAY more elements in it then there should be
you need to revise the logic behind the fib sequence generation
Ankit Panwar
@coderNoob
Oct 30 2015 08:58
@h4r1m4u This is weird dude ! Why does it have so many items in it. It's definitely showing the correct series but not the correct sum of odd numbers.
This is the different code that I tried
function sumFibs(num) {
  var a = 0, b = 1;
  var sum = 0, temp;
  for(var i=2; i<=num; i++){
    temp = a+b;
    a = b;
    b = temp;
    if((temp%2)!==0){
      sum += temp;
    }
  }
  return sum;
}
sumFibs(5);
Laura Stephenson
@lauralstephenson
Oct 30 2015 09:24
Waypoint 74 give your slot machine some images. It says I : You should have used the slot Two value at least once.
You should have used the slotThree value at least once. Here's my code:
slotOne = $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">'); Math.floor(Math.random() (3 - 1 + 1)) + 1;
slotTwo = $($('.slot')[1]).html('<img src = "' + images[slotOne-1] + '">'); Math.floor(Math.random()
(3 - 1 + 1)) + 1;
slotThree = $($('.slot')[2]).html('<img src = "' + images[slotOne-1] + '">');Math.floor(Math.random() * (3 - 1 + 1)) + 1;
$('.logger').html('');
$('.logger').html('Not A Win');```
h4r1m4u
@h4r1m4u
Oct 30 2015 09:37
@coderNoob because in the for loop you increase var i by 1 on every pass and add up the last two elements of the fib array. so if your num is 1000, you'll be adding the last two array elements 1,000 times - which you don't need to
@lauralstephenson check the part of the code where you generate the img src url: .html('<img src = "' + images[slotOne-1] + '">'). does it make sense to use the same image (images[slotOne - 1]) for all three slot machine slots? wouldn't the player always win that way?
Fenn
@esorkiddle
Oct 30 2015 09:52
Hi everyone, could someone help me with the JavaScript slot machine? I am on the second to last challenge "bring your javascript slot machine to life", my code is generating numbers so I don't understand why I'm not passing the waypoint. Here's my code:
function myFunction() {
$($(".slot")[0]).html(slotOne);
$($(".slot")opencontainers/runc#16).html(slotTwo);
$($(".slot")[2]).html(slotThree);
}
AYE EVANS
@ignorantusguru
Oct 30 2015 09:54
Hello
Laura Stephenson
@lauralstephenson
Oct 30 2015 09:54
Thanks @h4r1m4u !
CamperBot
@camperbot
Oct 30 2015 09:54
lauralstephenson sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 425 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 09:56
@esorkiddle could you post your entire code or link to your waypoint?
@ignorantusguru hi
AYE EVANS
@ignorantusguru
Oct 30 2015 09:58

Can anyone help with the add border around element task it won't let me pass and I think I completed the task correctly, this is the code ...
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
</style>

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

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

h4r1m4u
@h4r1m4u
Oct 30 2015 09:59
@esorkiddle i know which waypoint you're talking about, but i need to see your code. the bit you posted above looks ok, but i need to see the rest of it
Fenn
@esorkiddle
Oct 30 2015 09:59

<script>
function runSlots(){
var slotOne;
var slotTwo;
var slotThree;

var images = ["http://i.imgur.com/9H17QFk.png", "http://i.imgur.com/9RmpXTy.png", "http://i.imgur.com/VJnmtt5.png"];

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;

$(".logger").html("");
$(".logger").html("Not A Win")

// Only change code below this line.

function myFunction() {
$($(".slot")[0]).html(slotOne);
$($(".slot")opencontainers/runc#16).html(slotTwo);
$($(".slot")[2]).html(slotThree);
}

// Only change code above this line.

if (slotOne === slotTwo && slotTwo === slotThree) {
return slotOne;
}

if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){
$(".logger").html(slotOne);
$(".logger").append(" " + slotTwo);
$(".logger").append(" " + slotThree);
}

return [slotOne, slotTwo, slotThree];
}

$(document).ready(function(){
$(".go").click(function(){
runSlots();
});
});
</script>

<div>
<div class = "container inset">
<div class = "header inset">
<img src="https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz" alt="learn to code javascript at Free Code Camp logo" class="img-responsive nav-logo">
<h2>FCC Slot Machine</h2>
</div>
<div class = "slots inset">
<div class = "slot inset">

</div>
<div class = "slot inset">

</div>
<div class = "slot inset">

</div>
</div>
<br/>
<div class = "outset">
<button class = "go inset">
Go
</button>
</div>
<br/>
<div class = "foot inset">
<span class = "logger"></span>
</div>
</div>
</div>

<style>
.container {
background-color: #4a2b0f;
height: 400px;
width: 260px;
margin: 50px auto;
border-radius: 4px;
}
.header {
border: 2px solid #fff;
border-radius: 4px;
height: 55px;
margin: 14px auto;
background-color: #457f86
}
.header h2 {
height: 30px;
margin: auto;
}
.header h2 {
font-size: 14px;
margin: 0 0;
padding: 0;
color: #fff;
text-align: center;
}
.slots{
display: flex;
background-color: #457f86;
border-radius: 6px;
border: 2px solid #fff;
}
.slot{
flex: 1 0 auto;
background: white;
height: 75px;
margin: 8px;
border: 2px solid #215f1e;
border-radius: 4px;
text-align: center;
padding-top: 25px;
}
.go {
width: 100%;
color: #fff;
background-color: #457f86;
border: 2px solid #fff;
border-radius: 2px;
box-sizing: none;
outline: none!important;
}
.foot {
height: 150px;
background-color: 457f86;
border: 2px solid #fff;
}

.logger {
color: white;
margin: 10px;
}

.outset {
-webkit-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
}

.inset {
-webkit-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
}
</style>

h4r1m4u
@h4r1m4u
Oct 30 2015 10:00
@ignorantusguru <div class="class1 class2"></div> here i'm applying 2 different classes to a <div> tag. compare the syntax with your <img> class application
AYE EVANS
@ignorantusguru
Oct 30 2015 10:01
@h4r1m4u Please look up my code if I made mistake I do I have to bring the entire code ?
h4r1m4u
@h4r1m4u
Oct 30 2015 10:02

@esorkiddle

function myFunction() {
$($(".slot")[0]).html(slotOne);
$($(".slot")opencontainers/runc#16).html(slotTwo);
$($(".slot")[2]).html(slotThree);
}

a) you don't need to wrap the 3 lines in a function. they're already part of the runSlots() function
b) opencontainers/runc#16) what is this bit?

@ignorantusguru yes, you have a mistake in your code. no need to post everything, i can see where the issue is. please check my answer above for a hint that will help you solve it
AYE EVANS
@ignorantusguru
Oct 30 2015 10:03
Thanks @h4r1m4u I'm gonna try that out
CamperBot
@camperbot
Oct 30 2015 10:03
ignorantusguru sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 426 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Fenn
@esorkiddle
Oct 30 2015 10:03
@h4r1m4u that bit was just opencontainers/runc#16 i don't know why it changed it when i pasted it.
[ 1 ]
h4r1m4u
@h4r1m4u
Oct 30 2015 10:04
@esorkiddle gotcha. strange. so yeah, just my a) above applies then
Fenn
@esorkiddle
Oct 30 2015 10:04
@h4r1m4u that worked. thanks!
CamperBot
@camperbot
Oct 30 2015 10:04
esorkiddle sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 427 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 10:04
@esorkiddle you bet
gts00k
@gts00k
Oct 30 2015 10:17
In JavaScript, there is a special case where strict comparison of the same variable returns false! Try to find out what must be done to get such result!
var x = something;
x === x // returns false!
does anyone know this ?
marzelin
@marzelin
Oct 30 2015 10:20
@gts00k null i think
Yusef Habib
@yhabib
Oct 30 2015 10:21
@gts00k @marzelin I think is NaN
marzelin
@marzelin
Oct 30 2015 10:23
@yhabib yup, console says its NaN
gts00k
@gts00k
Oct 30 2015 10:23
yep
but it doesnt pass the test on codewars :P
This message was deleted
marzelin
@marzelin
Oct 30 2015 10:28
it turns out that NaN is a number, that's why it returns false
gts00k
@gts00k
Oct 30 2015 10:28
lol
marzelin
@marzelin
Oct 30 2015 10:29
@gts00k i'd just code return NaN
gts00k
@gts00k
Oct 30 2015 10:29
I thought I had to do the comparison :P
anyway thx a lot
CamperBot
@camperbot
Oct 30 2015 10:30
if you want to thank someone, put an @ before their name!
gts00k
@gts00k
Oct 30 2015 10:30
thanks @marzelin
CamperBot
@camperbot
Oct 30 2015 10:30
gts00k sends brownie points to @marzelin :sparkles: :thumbsup: :sparkles:
:star: 417 | @marzelin | http://www.freecodecamp.com/marzelin
gts00k
@gts00k
Oct 30 2015 10:30
looks like you know your stuff
marzelin
@marzelin
Oct 30 2015 10:32
I'm on 6 kyu, so I'm JS hacker ;)
gts00k
@gts00k
Oct 30 2015 10:45
I'm 7
still have a lot to learn
do you work professionally with JS ?
Epskip
@VivekBezawada
Oct 30 2015 11:10
I need help with bonfire:chunky monkey problem
CamperBot
@camperbot
Oct 30 2015 11:10
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Cody Bouscaren
@codybousc
Oct 30 2015 11:10
does anyone have any solid resources for troubleshooting angular apps?
Epskip
@VivekBezawada
Oct 30 2015 11:11
bonfire Chunky Moneky
CamperBot
@camperbot
Oct 30 2015 11:11
Sorry, can't find a bonfire called chunky moneky. [ Check the map? ]
gts00k
@gts00k
Oct 30 2015 11:11
lol moneky
bonfire Chunky Monkey
CamperBot
@camperbot
Oct 30 2015 11:11

:fire:Bonfire: Chunky Monkey :link:

function chunk(arr, size) {
  // Break it up.
  return arr;
}

chunk(['a', 'b', 'c', 'd'], 2);

Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a multidimensional array.

more info:  bf details | bf links | hint

Epskip
@VivekBezawada
Oct 30 2015 11:12
Yeah.. that question
hint
CamperBot
@camperbot
Oct 30 2015 11:12
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Kobayagi
@kobayagi
Oct 30 2015 11:14
i need some help with "Check the Length Property of a String Variable" can't make it work :-(
Pavan
@pavanp73
Oct 30 2015 11:19
@kobayagi share the screenshot
Blauelf
@Blauelf
Oct 30 2015 11:22
@kobayagi You will find a line that does the same as you should do above the area you are meant to change. Copy that line, in an intelligent way (replacing the variable names with the ones you are supposed to use).
Federico Dente
@fez994
Oct 30 2015 11:22
http://img903.imageshack.us/img903/13/ij3RYr.png anyone help? i don't understand and i think the mistake is here 1 == 2 what " 1==2" means? The probability? i tryed 50 == 50 same problem
Federico Dente
@fez994
Oct 30 2015 11:30

var heads;
var tails;

if (0 === 1) {
return heads;
} else {
return tails;
}
}

// Only change code above this line.

why is not working?
Blauelf
@Blauelf
Oct 30 2015 11:31
@fez994 0===1 always evaluates to false. You probably should use something like flip===1.
And heads and tails should be strings, not variables.
Federico Dente
@fez994
Oct 30 2015 11:32
if (flip === 1) {
return heads;
} else {
return tails;
}
}
It said that heads is not defined
Blauelf
@Blauelf
Oct 30 2015 11:34
These should be strings.
h4r1m4u
@h4r1m4u
Oct 30 2015 11:34
heads is a variable. "heads" is a string. heads != "heads" @fez994
Blauelf
@Blauelf
Oct 30 2015 11:35
That's a beginner's mistake they put there, as it is reasonable this will happen to many people, and they should be warned.
Gabriel Pinheiro
@GxPinheiro
Oct 30 2015 11:35
Im having an issue to understand this one: Waypoint: Make Object Properties Private
Federico Dente
@fez994
Oct 30 2015 11:36
@Blauelf @h4r1m4u if (flip === 1) {
return heads != "heads";
} else {
return tails != "tails";
}
}
still the same problem
Blauelf
@Blauelf
Oct 30 2015 11:36
@fez994 Just return "heads", same for tails.
Federico Dente
@fez994
Oct 30 2015 11:36
Those javascript lessons are quite bad in my opinion, i'm not learning anything and everything is confunsing
@Blauelf Thanks
CamperBot
@camperbot
Oct 30 2015 11:37
fez994 sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 425 | @blauelf | http://www.freecodecamp.com/blauelf
h4r1m4u
@h4r1m4u
Oct 30 2015 11:37
they're not really lessons, imo. they're just exercises that present you with a certain structure, but you need to research and read up on the material presented to actually learn.
Federico Dente
@fez994
Oct 30 2015 11:38
I don't think is a good way to learn
marzelin
@marzelin
Oct 30 2015 11:41
it's suitable for some people, but not for all.
Blauelf
@Blauelf
Oct 30 2015 11:42
When I learnt programming, I read my compiler's manual (Turbo Pascal 6.0 had a very sturdy one, great reference). Learning from pre-built lessons is probably as useless as formal school education with standardised curriculum. Will work for some, but not for others.
Federico Dente
@fez994
Oct 30 2015 11:45
Basically : "We have alot of exercize" "change the numer "1" to "2" and press enter" "SEE? Easy!".. "what? You wanna understand why? Google it kid"
Such a learn metod
h4r1m4u
@h4r1m4u
Oct 30 2015 11:45
you do realize that FCC is completely free and put together by a bunch of people who get nothing in return for the hundreds of hours they put in, right?
Federico Dente
@fez994
Oct 30 2015 11:47
I'm not saying "bla bla this suck" i just sayed there is this lack of sense right after css, and the quality of exercize kinda went down
i'm sure happy and thankful to the creator of the website
Blauelf
@Blauelf
Oct 30 2015 11:47
@fez994 There are time estimates. I found them extremely high, but if you don't know it already and have to follow the links to do some research, they might be accurate.
h4r1m4u
@h4r1m4u
Oct 30 2015 11:52
it's a different approach to education, one which i personally prefer. instead of being held by a hand, you're given a rough framework and it's up to you to self-study and digest the material by doing. personally, i learnt everything simply by doing - i started hacking away on projects and when i had no idea what to do, i'd search the web. it requires more of you, but rewards you with much larger material retention than simply listening to a lecture. but as blauelf said, it's not for everyone. if it's not working out for you and you need a more structured course where the material is presented to you in detail, there are plenty of other options, from treehouse to udemy, etc.
marzelin
@marzelin
Oct 30 2015 11:52
@fez994
the life of a web developer is all about learning these days. Technologies changes rapidly. You need to be able to keep up with it. You need to be able to find proper resources, learn from them, and then use your knowledge to solve the problem you're dealing with.
To become a developer you need to be resourceful.
Federico Dente
@fez994
Oct 30 2015 11:53
@h4r1m4u I understand your point, but "being held by a hand" makes you waste 0 time and learn in 3 minutes, instead of googling things for 30 minutes
@marzelin i know what you mean and thanks for the words
CamperBot
@camperbot
Oct 30 2015 11:53
fez994 sends brownie points to @marzelin :sparkles: :thumbsup: :sparkles:
:star: 418 | @marzelin | http://www.freecodecamp.com/marzelin
h4r1m4u
@h4r1m4u
Oct 30 2015 11:54
@fez994 different strokes for different folks. as i said, if FCC is not working out for you, there are plenty of other options
i can see how it can be tough for someone who is completely new to development
Blauelf
@Blauelf
Oct 30 2015 11:55
I don't learn well from videos, so researching by myself and having a chat with helping people is a good way. Just that the chat is also a great tool for procrastination...
Jayash Raj Mudbhari
@jayashraj
Oct 30 2015 11:55
hey can some one help me with the Waypoint: Make Object Properties Private?
Federico Dente
@fez994
Oct 30 2015 11:57
@Blauelf no difference for me text/audio same thing
btw right after " Math.floor(Math.random() * (3 - 1 + 1)) + 1;" what are "3" and "1" and "1"
its explained there
3 is the max value and one is the min
Kobayagi
@kobayagi
Oct 30 2015 12:10
is there a way to get solution for the task #131 (Waypoint: Check the Length Property of a String Variable), i've did as you said and can't make it work
like example or something
is there a way to get solution for the task ? I know it should be lastNameLength = lastName.lenght; but i can't make it work
Markus Kiili
@Masd925
Oct 30 2015 12:12
length, not lenght.
Jason Wood
@catapixel
Oct 30 2015 12:12
@kobayagi I just sent it to you privately
Kobayagi
@kobayagi
Oct 30 2015 12:12
:-) thanks
CamperBot
@camperbot
Oct 30 2015 12:12
if you want to thank someone, put an @ before their name!
Jason Wood
@catapixel
Oct 30 2015 12:13
@kobayagi you spelled length wrong when you typed lastName.lenght
Kobayagi
@kobayagi
Oct 30 2015 12:13
i just wrote lenght and couldnt notice that for 1h, sry people
Ankit Panwar
@coderNoob
Oct 30 2015 12:14
If I return true for every prime number, the function seems to work fine but if I put these numbers in an array, it's all wrong. What is going wrong?
function sumPrimes(num) {
  var primeNumbers = [], sum = 0;
  if (num < 2) return primeNumbers.push(num);
  for (var i = 2; i <= Math.floor(Math.sqrt(num)); i++){
    if (num % i === 0){
      //return false;
    }
    else{
      primeNumbers.push(i);
    }
  }  
  return primeNumbers;
Jason Wood
@catapixel
Oct 30 2015 12:14
@kobayagi no problem. typos are the cause of a lot of problems.
Blauelf
@Blauelf
Oct 30 2015 12:16
@coderNoob You are pushing all numbers that num is not a multiple of. That's not the same as prime numbers :P
Jason Wood
@catapixel
Oct 30 2015 12:17
@coderNoob Primes for "10" would be 2, 3, 5, 7
Ankit Panwar
@coderNoob
Oct 30 2015 12:20
@Blauelf How do I go about it then?
Blauelf
@Blauelf
Oct 30 2015 12:21
@coderNoob You'll have to check if your current prime number candidate is divisable by any of the numbers inside the primeNumbers array. If it is, continue, else push it.
And you might not want to stop at that square root used for doing a single test if num is prime.
sam horacek
@samlama111
Oct 30 2015 12:23
can somone help me with Sorted Union?
marzelin
@marzelin
Oct 30 2015 12:25
@samlama111 i think you're wasting your time asking such general questions. Just tell what's the problem you're struggling with. Or even better paste your code.
sam horacek
@samlama111
Oct 30 2015 12:27
@marzelin thats the problem, ive tried several options, but i just dont know what to do
marzelin
@marzelin
Oct 30 2015 12:28
@samlama111 so you want a plan how to solve this challenge?
Blauelf
@Blauelf
Oct 30 2015 12:28
@samlama111 Nobody wants to force you into some direction, so it would be nice if you could tell us about your approach. Preferably with the code (with a line of ``` before and one after the code)
Ankit Panwar
@coderNoob
Oct 30 2015 12:28
@Blauelf I had to look at the hint. I don't understand this line for (j = i << 1; j <= num; j += i). How is shifting the bit to the left helpful here? What is it doing exactly?
Joel
@jsmittyfitness
Oct 30 2015 12:29
hey Im on this challenge: Waypoint: Size your Images
I know I need to put .smaller-image{width: 100px} in the style area but I cant figure out what is missing
Blauelf
@Blauelf
Oct 30 2015 12:30
@coderNoob Shifting one to the left means multiplying by two. Just I do not have the context for that line :P
sam horacek
@samlama111
Oct 30 2015 12:30
@marzelin probably, i dont really know how, i dont understand reduce method(same with filter) and i cant think of any other solution
Blauelf
@Blauelf
Oct 30 2015 12:31
@samlama111 You can do that with for-loops, if you really want to.
sam horacek
@samlama111
Oct 30 2015 12:32
@Blauelf dont know how, i dont understand multi-dimensional loops
Blauelf
@Blauelf
Oct 30 2015 12:32
Multi-dimensional? It's a loop inside a loop.
sam horacek
@samlama111
Oct 30 2015 12:33
i know
Blauelf
@Blauelf
Oct 30 2015 12:33
There's nothing special about a loop body, all the magic is happening before and after it.
sam horacek
@samlama111
Oct 30 2015 12:34
@Blauelf what?
Anthony
@Guzko
Oct 30 2015 12:35
When using in-line style to change a color of h1, waht do I put in the <style>. I know that I put style=¨color:white;¨ in the h1 but don´t know what to put to make it work.
<h1 style=¨color:white¨ id="orange-text" class="pink-text blue-text">Hello World!</h1>
Kele18
@Kele18
Oct 30 2015 12:37
can somone tells me how to Nest your text input element within a form element.
Blauelf
@Blauelf
Oct 30 2015 12:38
@samlama111 If you put all the function's arguments into one array, you might want to loop over that, and inside the loop body you only care about the current element. That could involve another loop, but you don't care about the outer loop and other elements.
sam horacek
@samlama111
Oct 30 2015 12:40
@Blauelf so i concat the arrays and loop over them, but i dont know how to tell to js to slice all the values, that are there twice
Blauelf
@Blauelf
Oct 30 2015 12:41
So you have a for loop that loops over the arguments object (which is array-like, so you'll have a arguments.length and find first parameter as arguments[0]). In that loop, you only deal with one element of that array-like object.
Yes, concatenating is also possible.
Would get rid of the outer loop.
Jason Wood
@catapixel
Oct 30 2015 12:42
@Guzko you would remove if you are doing inline styles then you do it was you wrote. If you are using a style block at the top then you would create a class if you didn't want to reference every h1.
<style>
  h1 {
       color: white;
}
</style>
sam horacek
@samlama111
Oct 30 2015 12:42
@Blauelf and how does arguments object work? i didnt really get it from the mozilla page
Blauelf
@Blauelf
Oct 30 2015 12:42
@samlama111 For that, I would suggest using arr.indexOf(item). If it returns -1, then item is not yet in arr, so you can put it there.
sam horacek
@samlama111
Oct 30 2015 12:43
@Blauelf yeah, but if i do it with indexOf how do i remove only the second values and keep the first ones?
Blauelf
@Blauelf
Oct 30 2015 12:43
@samlama111 Basically, you can iterate arguments like an array with a for-loop. You cannot easily use array functions on it, since it does not inherit these (no Array in prototype chain)
Anthony
@Guzko
Oct 30 2015 12:44
alright htanks @catapixel
thanks @catapixel
CamperBot
@camperbot
Oct 30 2015 12:45
guzko sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 546 | @catapixel | http://www.freecodecamp.com/catapixel
Blauelf
@Blauelf
Oct 30 2015 12:45
@samlama111 Have one array holding the concatenated arrays' content. Loop over that. Have a second array, initially an empty array, and whenever an element is not yet in that one, push it. Else, ignore it and continue with the next.
sam horacek
@samlama111
Oct 30 2015 12:45
@Blauelf and why do i need to use arguments than?
Anthony
@Guzko
Oct 30 2015 12:46
Why didn´t this work
  h1 { color:white; }
</style>
<h1 style=¨color:white¨
Blauelf
@Blauelf
Oct 30 2015 12:46
arguments gives you access to an arbitrary number of function arguments. Your function will be called with two to four parameters in the test cases, but in theory, it could also be 1 or 1000.
sam horacek
@samlama111
Oct 30 2015 12:47
@Blauelf alright, im gonna somehow try to do it
Jason Wood
@catapixel
Oct 30 2015 12:50
@Guzko I can't see the rest of your code but the two styles you have there are redundant but they both should work. They are properly written.
Emmanuel Annan
@Mrannan93
Oct 30 2015 12:50
Can someone help me with
Anthony
@Guzko
Oct 30 2015 12:51
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
  h1 {color:white;}
</style>
<h1 style=¨color:white¨ id="orange-text" class="pink-text blue-text">Hello World!</h1>
marzelin
@marzelin
Oct 30 2015 12:52
@samlama111
  1. Write a function that takes two arrays, and returns an array with unique values of the two provided arrays
    1.1 Filter the second array on condition that every of its items is different than the items from the first array, and store it in a variable
    1.2 Concatenate the first array with the new array from 1.1 and return it
  2. Store an array provided in the first argument to the function in a variable uniqArr
  3. Loop through the rest of provided arguments:
    3.1 for each array call the function from point 1. with two arguments: uniqArr and the current array, and store the result back in uniqArr variable.
  4. return the uniqArr.
Jason Wood
@catapixel
Oct 30 2015 12:53
@Guzko your class "pink-text blue-text" comes after your style=¨color:white¨ I would guess that your text is coming through as blue. Is that correct?
online your h1 html line that is
Anthony
@Guzko
Oct 30 2015 12:56
no orange
Blauelf
@Blauelf
Oct 30 2015 12:57
@marzelin Thank you, your text led me to a solution of this bonfire I had not thought of. More elegant than my push(), and perfectly working with reduce() :)
CamperBot
@camperbot
Oct 30 2015 12:57
blauelf sends brownie points to @marzelin :sparkles: :thumbsup: :sparkles:
:star: 420 | @marzelin | http://www.freecodecamp.com/marzelin
Jason Wood
@catapixel
Oct 30 2015 12:58
@Guzko yes. That makes sense. I overlooked the ID. ID takes precedence over the class.
Anthony
@Guzko
Oct 30 2015 12:58
so is my style correct? with the h1
@catapixel
Jason Wood
@catapixel
Oct 30 2015 12:59
@Guzko If you want to apply that style then add !important h1 {color:white !important;}
or you could move the inline style after the id and class calls on the inline h1 <h1 id="orange-text" class="pink-text blue-text" style=¨color:white¨ > I believe that will also work
Blauelf
@Blauelf
Oct 30 2015 13:02
Inline style overrides id style overrides class style overrides element style
Anthony
@Guzko
Oct 30 2015 13:02
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
  h1 {color:white;}
</style>
<h1 id="orange-text" class="pink-text blue-text" style=¨color:white¨>Hello World!</h1>
didnt work
Blauelf
@Blauelf
Oct 30 2015 13:03
Your " look strange at the style attribute.
Anthony
@Guzko
Oct 30 2015 13:04
damn this chrome book. Im doing this at school and that is what they look like on the chrome book. I´ll see if I can do anything about it.
Alright I just copy and pasted the correct " and it worked. Thanks for the help @catapixel @Blauelf
CamperBot
@camperbot
Oct 30 2015 13:05
guzko sends brownie points to @catapixel and @blauelf :sparkles: :thumbsup: :sparkles:
:warning: guzko already gave catapixel points
:star: 427 | @blauelf | http://www.freecodecamp.com/blauelf
Anthony
@Guzko
Oct 30 2015 13:05
it worked
Jason Wood
@catapixel
Oct 30 2015 13:07
Nice catch @Blauelf I just got back and saw that as well. Looks like accent marks instead of double quotes
Anthony
@Guzko
Oct 30 2015 13:08
Yeah on the key board they look like quoteation marks but turn out different when I typpe them
Blauelf
@Blauelf
Oct 30 2015 13:08
No idea what they look like, they are too small, maybe single pixels. First, I believed in a rendering glitch...
Oh, these things can be used to build our umlauts like äöü (these are probably one codepoint, not combined)
@Guzko These are probably "dead keys" that don't output a character when you press them once?
Anthony
@Guzko
Oct 30 2015 13:11
@catapixel so when I put !important in the style of an element do I have to put anything in the h1 its self?
Jason Wood
@catapixel
Oct 30 2015 13:12
@Guzko no
Blauelf
@Blauelf
Oct 30 2015 13:12
!important overrides even in-line style. Not sure what happens if inline has !important, too. Probably in-line wins.
Anthony
@Guzko
Oct 30 2015 13:13
Okay so shouldnt this work
  .pink-text {
    color: pink; !important;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text blue-text" style="color: white">Hello World!</h1>
Jason Wood
@catapixel
Oct 30 2015 13:13
@Guzko You have an "extra" semi-colon in there after pink. remove that
Anthony
@Guzko
Oct 30 2015 13:14
thanks
CamperBot
@camperbot
Oct 30 2015 13:14
if you want to thank someone, put an @ before their name!
Anthony
@Guzko
Oct 30 2015 13:15
I've only done 60 of these lessons just started about a week ago. Coding is a ton of fun.
Its fun to learn and interesting how it all works
Nick Gonnella
@ngonnella
Oct 30 2015 13:16
Can anyone figure out why I can't get a green tick for "Give your image a border width of 10px" once I run tests even though the image does have a 10pixel green border??
.thick-green-border {
    border-width: 10px;
    border-color: green;
    border-style: solid;

  }
</style>

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

<img class="thick-green-border smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Anthony
@Guzko
Oct 30 2015 13:18
you need to flip thick-green-border and smaller image
so put smaller-image before thick-green-border
Nick Gonnella
@ngonnella
Oct 30 2015 13:19
nope. still the same
Anthony
@Guzko
Oct 30 2015 13:20
hmm. I have to go my classs just ended but Im heading to another class might be able to help in 10min
Nick Gonnella
@ngonnella
Oct 30 2015 13:21
thanks @Guzko
CamperBot
@camperbot
Oct 30 2015 13:21
ngonnella sends brownie points to @guzko :sparkles: :thumbsup: :sparkles:
:star: 62 | @guzko | http://www.freecodecamp.com/guzko
Chetan
@JackLamborghini
Oct 30 2015 13:28
what's wrong with the code?

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

// Only change code below this line.

var newArray = oldArray;

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

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

// Only change code above this line.

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

Blauelf
@Blauelf
Oct 30 2015 13:32
You work on a variable array, while newArray is being checked.
Coira Ellison
@Coira
Oct 30 2015 13:33
@ngonnella your code should work, but there seems to be an open issue with the waypoint passing the test FreeCodeCamp/FreeCodeCamp#3204
Nick Gonnella
@ngonnella
Oct 30 2015 13:33
yes thanks @Coira I adjusted my browser window size on Chrome and it’s passed now.
CamperBot
@camperbot
Oct 30 2015 13:33
ngonnella sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 288 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Oct 30 2015 13:34
@ngonnella ah great!
Edvin Castillo
@3dv1n
Oct 30 2015 13:50
hi friends. I have a problem with a exercice. that is "Waypoint: Link to External Pages with Anchor Elements"
the point is, it says me
"You need an a element that links to http://freecatphotoapp.com"
but i do not have any clue where put it, and it not told me
Blauelf
@Blauelf
Oct 30 2015 13:53
Have you tried putting it anywhere?
Edvin Castillo
@3dv1n
Oct 30 2015 13:54
yes, and it says too:
"Your a element should have the anchor text of "cat photos"."
Nick Gonnella
@ngonnella
Oct 30 2015 13:54
show us your code
Blauelf
@Blauelf
Oct 30 2015 13:54
I mean, under the style element, of course.
Edvin Castillo
@3dv1n
Oct 30 2015 13:55
yes, i tried
Kartikeya99
@Kartikeya99
Oct 30 2015 13:55
Try putting some text within the anchor tags like '<a href="xyz.com">xyz.com</a>'
Edvin Castillo
@3dv1n
Oct 30 2015 13:56

my code is:

<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>
<a href"http://freecatphotoapp.com">cat photos</a>

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

Kartikeya99
@Kartikeya99
Oct 30 2015 13:57
after the href there should be a = sign
Edvin Castillo
@3dv1n
Oct 30 2015 13:58
f** thats rigth
@Kartikeya99 thanks friend
CamperBot
@camperbot
Oct 30 2015 13:58
3dv1n sends brownie points to @kartikeya99 :sparkles: :thumbsup: :sparkles:
:star: 11 | @kartikeya99 | http://www.freecodecamp.com/kartikeya99
Kartikeya99
@Kartikeya99
Oct 30 2015 13:59
thank you
CamperBot
@camperbot
Oct 30 2015 13:59
if you want to thank someone, put an @ before their name!
Edvin Castillo
@3dv1n
Oct 30 2015 13:59
and thanks @Blauelf too
Ender Mendiluce
@Volkenas
Oct 30 2015 13:59
I'm having some issues wih Waypoint - Make Object Properties Private. I'm just lost at what to do for some reason, can't comprehend those instructions.
Edvin Castillo
@3dv1n
Oct 30 2015 13:59
@Blauelf thanks too
CamperBot
@camperbot
Oct 30 2015 13:59
3dv1n sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 429 | @blauelf | http://www.freecodecamp.com/blauelf
Blauelf
@Blauelf
Oct 30 2015 14:01
@Volkenas If it is declared with var, it's function-scope. If it is attached to an object (like this), it is usually public.
Ender Mendiluce
@Volkenas
Oct 30 2015 14:03
So should I create another object called myBike inside the Bike object according to the instructions or am I reading then wrong?
Blauelf
@Blauelf
Oct 30 2015 14:05
Bike is a function. You can define function-scope variables there, they will be private. If you want to make something public, attach it to this (for example, one might have this.beep=function(){return "BEEEP";};).
Ender Mendiluce
@Volkenas
Oct 30 2015 14:07
I see. I find it hard to diferentiate functions from objects since they use a similar syntax to be declared.
Blauelf
@Blauelf
Oct 30 2015 14:07
All functions are objects, but not all objects are functions.
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:15
@Volkenas Everything in JS is an Object i.e. they're inherited from Object.
Blauelf
@Blauelf
Oct 30 2015 14:16
@abhisekp undefined might be an exception :D
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:17
@Blauelf also add null to it. :D
Blauelf
@Blauelf
Oct 30 2015 14:18
However, NaN is an object.
NaN instanceof Object evaluates to false. So it is an object without Object in its prototype chain?
Ender Mendiluce
@Volkenas
Oct 30 2015 14:25
Ugh, I'm still having a hard time fulfilling the objectives of the challenge, I'm sorry. Should I make another object called myBike with the public/private functions/methods inside? Or should I rename the object "Bike" to "myBike" then keep following the instructions?
Blauelf
@Blauelf
Oct 30 2015 14:26
You have function Bike, and the only changes you should make are within that. They all have something to do with this. One time you have to add it, another time you have to replace it.
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:26
@Blauelf Seems like NaN is indeed an Object
Ender Mendiluce
@Volkenas
Oct 30 2015 14:28
I feel embarrased that it took me that long to figure it out. Thanks @Blauelf , I need to take a shower.
CamperBot
@camperbot
Oct 30 2015 14:28
volkenas sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 430 | @blauelf | http://www.freecodecamp.com/blauelf
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:28
@Blauelf
Ender Mendiluce
@Volkenas
Oct 30 2015 14:29
I just don't get wht FCC kept saying myBike when the object was called Bike. :worried:
Blauelf
@Blauelf
Oct 30 2015 14:29
@abhisekp So I probably got the instanceof wrong.
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:33
Blauelf
@Blauelf
Oct 30 2015 14:34
@abhisekp Thanks for showing me Object.getPrototypeOf(). I always assumed that one could simply type NaN instanceof Object
CamperBot
@camperbot
Oct 30 2015 14:34
blauelf sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 766 | @abhisekp | http://www.freecodecamp.com/abhisekp
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:36

@Blauelf in the editor you can type the following to get a real NaN.

this.a = +function(){}();

or anything which evaluates to NaN

Blauelf
@Blauelf
Oct 30 2015 14:37
This is equivalent to Number(undefined) :D
Abhisek Pattnaik
@abhisekp
Oct 30 2015 14:39
@Blauelf oh! yes. :P
Cody Bouscaren
@codybousc
Oct 30 2015 14:41
hey all, i need a bit of bootstrap help here. could anyone tell me how i can get the 'top-level-cover' and the 'bottom-level-cover' to be flesh with the top/bottom?
http://codepen.io/codybousc/pen/pjKrJQ?editors=110
Herman Fassett
@HermanFassett
Oct 30 2015 14:41
flesh? flush?
Cody Bouscaren
@codybousc
Oct 30 2015 14:42
@HermanFassett sorry, yes
flush
and maybe flesh color?
just kidding
Herman Fassett
@HermanFassett
Oct 30 2015 14:43
I'm still not quite sure what you're asking... get that text on the bottom of its parent?
Cody Bouscaren
@codybousc
Oct 30 2015 14:43
@HermanFassett not the text . i'd like the top bar with the text 'twitter' to be flush with the top of it's container
and the bottom bar with no text to be flush with the bottom
and without margins
Matan Kushner
@matchai
Oct 30 2015 14:44
To start, you can remove the padding on col-lg-5
That'll make the sides flush with the div.
Fiddle with Chrome Developer Tools to look at what elements are filling what parts of the DOM.
You will see that the top is being pushed down due to a "margin-top" in the h3.
Cody Bouscaren
@codybousc
Oct 30 2015 14:46
@matchai awesome. that got them flush
Matan Kushner
@matchai
Oct 30 2015 14:47
Great to hear :)
Cody Bouscaren
@codybousc
Oct 30 2015 14:47
@matchai I played around with it in chrome dev and removed the margins on the h3, but it didn't have much of an effect
Matan Kushner
@matchai
Oct 30 2015 14:48
That's because of another margin property being present. Explicitly defining it as '0' fixes it on my end.
As for the bottom section, you might have a better time using a "position" property that isn't the default one.
Try fiddling with the position types and see if you can manage to get it flush without me giving it away :P
Cody Bouscaren
@codybousc
Oct 30 2015 14:52
@matchai position: absolute; bottom: 0; dit it!
not sure if that's what you had in mind
Matan Kushner
@matchai
Oct 30 2015 14:52
That's exactly what I did too! Good job :)
Herman Fassett
@HermanFassett
Oct 30 2015 14:52
Stare at that rubber duck
Cody Bouscaren
@codybousc
Oct 30 2015 14:53
@matchai by the way, do you have any good bootstrap resources?
tutorials and such
Herman Fassett
@HermanFassett
Oct 30 2015 14:53
:baby_chick:
Bootstrap site has all you need really in most cases
Matan Kushner
@matchai
Oct 30 2015 14:53
I've only used the main Bootstrap documentation ^
vere perrot
@perrot
Oct 30 2015 14:53
Hi my friend, Mongolab.com site was gone. Has any other alternative free solution? Thanks. :worried:
Matan Kushner
@matchai
Oct 30 2015 14:53
The rest is just tweaking it for your own needs, like you're doing :)
Cody Bouscaren
@codybousc
Oct 30 2015 14:54
I use the documentation as well, but get stuck with things like 'pushing a div to the bottom of it's container' etc
Matan Kushner
@matchai
Oct 30 2015 14:54
I can access it: https://mongolab.com/
Cody Bouscaren
@codybousc
Oct 30 2015 14:54
@matchai anyway, thank you!
CamperBot
@camperbot
Oct 30 2015 14:54
codybousc sends brownie points to @matchai :sparkles: :thumbsup: :sparkles:
:star: 88 | @matchai | http://www.freecodecamp.com/matchai
Cody Bouscaren
@codybousc
Oct 30 2015 14:55
@HermanFassett and you!
Matan Kushner
@matchai
Oct 30 2015 14:55
Once you get more comfortable with CSS, small tweaks to the Bootstrap system will come naturally :)
vere perrot
@perrot
Oct 30 2015 14:57
Thank @matchai . I used ping command to ping https://mongolab.com/. The output is Request time out. Maybe my location can not access this site. :worried:
CamperBot
@camperbot
Oct 30 2015 14:57
perrot sends brownie points to @matchai :sparkles: :thumbsup: :sparkles:
:star: 89 | @matchai | http://www.freecodecamp.com/matchai
Matan Kushner
@matchai
Oct 30 2015 14:57
That seems strange O.o
Jacob Andra
@jacob4
Oct 30 2015 15:01
I'm on a CSS challenge (pretty familiar with CSS but am going through it all anyway). It won't accept my border. I'm instructed to create a class with border that is ten pixels solid green, and to break it out with each attribute on its own line. I created the class and applied it to the image, yet it won't accept it. Can someone help? It's the cat app challenge, I believe #24.
Diego Ingaramo
@diegoingaramo
Oct 30 2015 15:02
Maybe ping is disabled on the server where the mongolab site resides
Matan Kushner
@matchai
Oct 30 2015 15:02
Hey @jacob4. If you think your CSS should be correct, try resetting the code on the page with the "reset" button.
Otherwise, could you post your code here for us to take a look? :)
Jacob Andra
@jacob4
Oct 30 2015 15:04

.thick-green-border {

border-width: 10px;
border-style: solid;
border-color: green;

}

Coira Ellison
@Coira
Oct 30 2015 15:04
@jacob4 check your browser zoom is at 100%. there's an open issue with that waypoint, if it's the one i'm think of
Jacob Andra
@jacob4
Oct 30 2015 15:06
That's in the <style> </style> section. Then, in the <p> element, I have <p> class="smaller-image" "thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
My browser zoom is at 100%; problem persists.
Herman Fassett
@HermanFassett
Oct 30 2015 15:06
That doesn't look right
your p tag closes before class
Wait isn't there an image
Coira Ellison
@Coira
Oct 30 2015 15:06
oh, no need to separate classes by quotes
Herman Fassett
@HermanFassett
Oct 30 2015 15:06
I'm confused
Diego Ingaramo
@diegoingaramo
Oct 30 2015 15:06
@perrot I could access to https://mongolab.com/ but in one of my VM I get this error RR_SSL_VERSION_OR_CIPHER_MISMATCH. I guess is something related to my browser and ssh certificates
Coira Ellison
@Coira
Oct 30 2015 15:07
class="smaller-image thick-green-border"
Herman Fassett
@HermanFassett
Oct 30 2015 15:07
Yeah all classes separated by spaces
Jacob Andra
@jacob4
Oct 30 2015 15:07
I messed up typing it here. Here is the complete 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;
}

.smaller-image {
width: 100px;
}

.thick-green-border {

border-width: 10px;
border-style: solid;
border-color: green;

}

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

Matan Kushner
@matchai
Oct 30 2015 15:08
Yep. The problem is in the way you assign multiple classes.
They must both be in the same quotation marks: class="smaller-image thick-green-border" with just a space separating them.
Ender Mendiluce
@Volkenas
Oct 30 2015 15:09

Shouldn't this be enough to complete the "Waypoint: Iterate over arrays with map." Challenge?

var newArray = oldArray;

newArray.map(function(val){

         return val + 3;

         });
Jacob Andra
@jacob4
Oct 30 2015 15:09
When I remove the " between classes, the problem persists.
Ender Mendiluce
@Volkenas
Oct 30 2015 15:09
Woops, sorry about the formatting.
Jacob Andra
@jacob4
Oct 30 2015 15:10
Figured it out, thanks!
CamperBot
@camperbot
Oct 30 2015 15:10
if you want to thank someone, put an @ before their name!
Matan Kushner
@matchai
Oct 30 2015 15:11
wiki Waypoint Iterate over arrays with map.
CamperBot
@camperbot
Oct 30 2015 15:11

:point_right: waypoint iterate over arrays with map [wiki]

Using map is the best way to iterate through an array or object. Map uses a function to pretty much do whatever you want it to do. It will pass each value to the callback function.

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

:pencil: read more about waypoint iterate over arrays with map on the FCC Wiki

Jacob Andra
@jacob4
Oct 30 2015 15:11
@Volkenas @matchai @Coira @HermanFassett Thanks for your help!
CamperBot
@camperbot
Oct 30 2015 15:11
jacob4 sends brownie points to @volkenas and @matchai and @coira and @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 93 | @matchai | http://www.freecodecamp.com/matchai
:star: 289 | @coira | http://www.freecodecamp.com/coira
:star: 176 | @volkenas | http://www.freecodecamp.com/volkenas
:star: 490 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
rhsiao12
@rhsiao12
Oct 30 2015 15:11
any ideas on why this is not working for waypoint 82 about bootstrap buttons?
<div class="row">
<div class="col-xs-4 btn btn-primary">Like</div>
<div class="col-xs-4 btn btn-info">Info</div>
<div class="col-xs-4 btn btn-danger">Delete</div>
</div>
Coira Ellison
@Coira
Oct 30 2015 15:11
@jacob4 :)
Matan Kushner
@matchai
Oct 30 2015 15:12
@Volkenas that sounds like it should do it...
Is it asking you to add 3 to every value?
Ender Mendiluce
@Volkenas
Oct 30 2015 15:12
Yup.
Matan Kushner
@matchai
Oct 30 2015 15:12
oh wait
Ender Mendiluce
@Volkenas
Oct 30 2015 15:12
Use the map function to add 3 to every value in the variable array.
Matan Kushner
@matchai
Oct 30 2015 15:13
you must assign the newly processed output to a variable
so output = newArray.map(function...
Ender Mendiluce
@Volkenas
Oct 30 2015 15:13
Ahh, of course.
Thanks @matchai
CamperBot
@camperbot
Oct 30 2015 15:14
volkenas sends brownie points to @matchai :sparkles: :thumbsup: :sparkles:
:star: 94 | @matchai | http://www.freecodecamp.com/matchai
Matan Kushner
@matchai
Oct 30 2015 15:14
Happy to help :)
gjoko1
@gjoko1
Oct 30 2015 15:17
Hi, can someone help me with my quote generator. When the button is clicked it does get the quote, but does not get the author, take a look here -> http://codepen.io/gjokom/full/EVLoYa/
renren89
@renren89
Oct 30 2015 15:20
const reducer = (number) => {
  let filtered = number.replace(/\s/g, '');
  let spaced = filtered.replace(/(.{4})/g, '$1 ');

  return spaced;
}

console.log(reducer(1999999))
can anyone tell me why replace wouldn't work in this case?
AYE EVANS
@ignorantusguru
Oct 30 2015 15:22

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

2

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

h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.smaller-image {
width: 100px;

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

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

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

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

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

Okey figured it out
Jason Wood
@catapixel
Oct 30 2015 15:25

@gjoko1 It's because after you do your quote replacement the author div no longer exists. You have it embedded inside of your quote div. You need to move it outside of your quote div to get the behavior you want. Change this:

      <div class="border col-md-8 col-md-offset-2">
        <div class="quote" id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
          <br> Cras imperdiet.
          <br>
          <div id="author" class="author">Gjoko Markoski</div>
        </div>
      </div>

to this...

      <div class="border col-md-8 col-md-offset-2">
        <div class="quote" id="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
          <br> Cras imperdiet.
          <br>
        </div>
        <div id="author" class="author">Gjoko Markoski</div>
      </div>
Cody Bouscaren
@codybousc
Oct 30 2015 15:30
has anyone tried making api calls with angular? if so, any good tutorials out there? i found a few outdated ones online, but nothing super helpful yet
renren89
@renren89
Oct 30 2015 15:32
does str.replace only work if the variable are strings?
Andrei Husanu
@husanu
Oct 30 2015 15:32
"replace" is a method for String class, so yes
Cody Bouscaren
@codybousc
Oct 30 2015 15:33
@husanu yeah, maybe documentation is the way to go at this point
i was looking for more of a broad level overview, but that'll do
vere perrot
@perrot
Oct 30 2015 15:33
Thanks @diegoingaramo . I am working in my voting app. Want to use the mangolab service in heroku site. But to use this service you have to provide a credit card information. After I fill these information, it show me a message "Gateway Rejected: fraud". I don't know why. :worried:
CamperBot
@camperbot
Oct 30 2015 15:33
perrot sends brownie points to @diegoingaramo :sparkles: :thumbsup: :sparkles:
:star: 55 | @diegoingaramo | http://www.freecodecamp.com/diegoingaramo
Andrei Husanu
@husanu
Oct 30 2015 15:34
the $http service in angular is like jQuery.ajax
ChanaBanana
@ChanaFerrari
Oct 30 2015 15:35

Hi people I need help. I know you are all far. I guess someone can help me
Waypoint: Use an ID Attribute to Style an Element
Problem:Your form element should have the background-color of green.

My Code: .id

cat-photo-element{

background-color:green;

}
</style>

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

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

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

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

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

renren89
@renren89
Oct 30 2015 15:36
@husanu thanks, is there an alternative for integers? Or just .toString() method
CamperBot
@camperbot
Oct 30 2015 15:36
renren89 sends brownie points to @husanu :sparkles: :thumbsup: :sparkles:
:star: 8 | @husanu | http://www.freecodecamp.com/husanu
Andrei Husanu
@husanu
Oct 30 2015 15:37
@ChanaFerrari #cat-photo-form ?
Matan Kushner
@matchai
Oct 30 2015 15:38
you can use parseInt() to parse a value as an integer.
Cody Bouscaren
@codybousc
Oct 30 2015 15:38
@husanu i'm not too sure what that means
Andrei Husanu
@husanu
Oct 30 2015 15:39
@renren89 depends on what you want to do. All javascript objects have a predefined method .toString().
ChanaBanana
@ChanaFerrari
Oct 30 2015 15:39
@husanu omggg thank u so much im sorry thats was a dumb mistake :( sorry and thank you again
CamperBot
@camperbot
Oct 30 2015 15:39
chanaferrari sends brownie points to @husanu :sparkles: :thumbsup: :sparkles:
:star: 9 | @husanu | http://www.freecodecamp.com/husanu
Andrei Husanu
@husanu
Oct 30 2015 15:42
@ChanaFerrari something like this:
#cat-photo-form {
    background-color: green;
  }
damn
gjoko1
@gjoko1
Oct 30 2015 15:42
@catapixel Thank you so much! Works great now
CamperBot
@camperbot
Oct 30 2015 15:42
gjoko1 sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 551 | @catapixel | http://www.freecodecamp.com/catapixel
Andrei Husanu
@husanu
Oct 30 2015 15:42
This message was deleted
Lena
@Vivelena
Oct 30 2015 15:45
This message was deleted
This message was deleted
Steven Parker
@Philosophist
Oct 30 2015 15:48
I have a simple question which I either missed or was not clarified in the lessons. How do I connect the commands in HTML with the functions in javascript? I'm on the random quote generator zipline and I'll need javascript to generate a random number, pick the associated quote, and to return that string as the HTML, (or jQuery?) calls it to insert a paragraph or headline of the quote.
Nic Galluzzo
@ngalluzzo
Oct 30 2015 15:52
@Philosophist you use Javascript / jQuery to write the random quote into your HTML
surbhee
@surbhee
Oct 30 2015 15:52
Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace .. ehat does this error means :(
hi fellows
Chahan Shah
@Chahanshah
Oct 30 2015 15:57

@Philosophist I am not sure how detailed of an answer you are looking for, but you can use jQuery to modify parts of your html code. For example if you want to add a paragraph to an element which has a class named one

$(".one").html("<p>Some Text</p>");

or various other jQuery methods

not sure is that is what you are looking for

tinako97
@tinako97
Oct 30 2015 16:00
I'm confused about the Make It Modular problem in node.js. Can anyone help me understand what parts of the code should be where?
Katie Sutherland
@ktsutherland4
Oct 30 2015 16:03
Hey yall, Definitely need help on this one:
Nest each of your radio buttons inside its own div with the class col-xs-6. <div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
Steven Parker
@Philosophist
Oct 30 2015 16:04
@ngalluzzo Thanks.
CamperBot
@camperbot
Oct 30 2015 16:04
philosophist sends brownie points to @ngalluzzo :sparkles: :thumbsup: :sparkles:
:star: 106 | @ngalluzzo | http://www.freecodecamp.com/ngalluzzo
Jason Wood
@catapixel
Oct 30 2015 16:04
@tinako97 I can't remember the problem description. Can you paste it and I can help
tinako97
@tinako97
Oct 30 2015 16:04

MAKE IT MODULAR
Exercise 6 of 13

This problem is the same as the previous but introduces the concept of modules. You will need to create two files to solve this.

Create a program that prints a list of files in a given directory, filtered by the extension of the files. The first argument is the directory name and the second argument is the extension filter. Print the list of files (one file per line) to the console. You must use asynchronous I/O.

You must write a module file to do most of the work. The module must export a single function that takes three arguments: the directory name, the filename extension string and a callback function, in that order. The filename extension argument must be the same as what was passed to your program. Don't turn it into a RegExp or prefix with "." or do anything except pass it to your module where you can do what you need to make your filter work.

The callback function must be called using the idiomatic node(err, data) convention. This convention stipulates that unless there's an error, the first argument passed to the callback will be null, and the second will be your data. In this exercise, the data will be your filtered list of files, as an Array. If you receive an error, e.g. from your call to fs.readdir(), the callback must be called with the error, and only the error, as the first argument.

You must not print directly to the console from your module file, only from your original program.

In the case of an error bubbling up to your original program file, simply check for it and print an informative message to the console.

These four things are the contract that your module must follow.

  • Export a single function that takes exactly the arguments described.
  • Call the callback exactly once with an error or some data as described.
  • Don't change anything else, like global variables or stdout.
  • Handle all the errors that may occur and pass them to the callback.

The benefit of having a contract is that your module can be used by anyone who expects this contract. So your module could be used by anyone else who does learnyounode, or the verifier, and just work.


HINTS

Create a new module by creating a new file that just contains your directory reading and filtering function. To define a single function export, you assign your function to the module.exports object, overwriting what is already there:

module.exports = function (args) { /* ... */ }

Or you can use a named function and assign the name.

To use your new module in your original program file, use the require() call in the same way that you require('fs') to load the fs module. The only difference is that for local modules must be prefixed with './'. So, if your file is named mymodule.js then:

var mymodule = require('./mymodule.js')

The '.js' is optional here and you will often see it omitted.

You now have the module.exports object in your module assigned to the mymodule variable. Since you are exporting a single function, mymodule is a function you can call!

Also keep in mind that it is idiomatic to check for errors and do early-returns within callback functions:

function bar (callback) {
  foo(function (err, data) {
    if (err)
      return callback(err) // early return

    // ... no error, continue doing cool things with `data`

    // all went well, call callback with `null` for the error argument

    callback(null, data)
  })
}
I have this:
This message was deleted
module.exports = function (dir, ext, callback?){
    var fs = require('fs');      // include file library
    fs.readdir (dir, function(err, data){
        if (err) {console.log('File error');}
        else{
            return data.
                filter(function(a){return a.length > ext.length && a.slice(a.indexOf('.')+1)==ext}).
                join('\n');
        }
    })
}
and this:
var mymodule = require('./program6a.js');
console.log(mymodule(process.argv[2], process.argv[3], callback?));
Steven Parker
@Philosophist
Oct 30 2015 16:08
@Chahanshah Thanks. I think I see now. That particular method is really good to know. Is it fair to say that the lessons meant to teach us to do the same with the appendTo method? It does the same thing, right? Also, would those methods also recognize any javascript variable name if I plaxe it in the second half?
CamperBot
@camperbot
Oct 30 2015 16:08
philosophist sends brownie points to @chahanshah :sparkles: :thumbsup: :sparkles:
:star: 289 | @chahanshah | http://www.freecodecamp.com/chahanshah
Jason Wood
@catapixel
Oct 30 2015 16:08
@tinako97 you have to call your mymodule function, passing it the correct parameters, and console.log within it using its results
tinako97
@tinako97
Oct 30 2015 16:09
@catapixel OK, I think I understand that. But the console.log is inside the callback function which I pass?
Chahan Shah
@Chahanshah
Oct 30 2015 16:10
@Philosophist Yes you can place a javascript variable there. You can use .append, or .text also. .html gives more control to you. The waypoint lessons provide a very basic understanding and get you used to syntax
Jason Wood
@catapixel
Oct 30 2015 16:10
@tinako97 It should not be. The module.exports = function .... should just be gathering the data. The program should be doing the console.log
The callback is your filtered list
tinako97
@tinako97
Oct 30 2015 16:11
@catapixel Then what's in that callback I'm passing?
Jason Wood
@catapixel
Oct 30 2015 16:11
@tinako97 It's calling back with the filtered list and then the program is taking action on it
Chahan Shah
@Chahanshah
Oct 30 2015 16:12
@Philosophist You will have to search online for documentation when doing ziplines and that is where you will learn most. If you want more lessons that hold your hand and get familiar with it, you can check out codecademy.com for tutorials
tinako97
@tinako97
Oct 30 2015 16:12
@catapixel Well, there are two callback functions, right? The one from readdir, and then the one I'm told is the 3rd param to my module?
Jason Wood
@catapixel
Oct 30 2015 16:13
@tinako97 Here's my modular-program.js since you're almost there. All the rest happens in modular-module.js
var filterFn = require('./modular-module.js')
var dir = process.argv[2]
var filterStr = process.argv[3]

filterFn(dir, filterStr, function (err, list) {
    if (err)
        return console.error('There was an error:', err)

    list.forEach(function (file) {
        console.log(file)
    })
})
tinako97
@tinako97
Oct 30 2015 16:16
@catapixel So your console.log is inside the callback function which you pass to your module? I just have mine inside out?
Jason Wood
@catapixel
Oct 30 2015 16:16
yep
tinako97
@tinako97
Oct 30 2015 16:17
@catapixel Great, I will give that a try. Thanks!
CamperBot
@camperbot
Oct 30 2015 16:17
tinako97 sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 552 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Oct 30 2015 16:18
@tinako97 Here's my modular-module.js without the actual work being done so you have a template...
var fs = require('fs')
var path = require('path') \\ Doesn't appear you're using this so you can leave it out

module.exports = function (dir, filterStr, callback) {

    fs.readdir(dir, function (err, list) {
         \\ Your code to get the list to call back with goes here as well as your error handling
    })
}
Katie Sutherland
@ktsutherland4
Oct 30 2015 16:20
Hey yall, Definitely need help on this one:
Nest each of your radio buttons inside its own div with the class col-xs-6.
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
Himad Mouhtar
@hmouhtar
Oct 30 2015 16:25
Hi, I need some help
Give your form element the id of cat-photo-form. / I just put id="cat-photo-app" in my form element, but i can't continue
Vyacheslav
@Fitzjerald
Oct 30 2015 16:30
@ktsutherland4 just create div elements with classes r called "col-xs-6" and between "div" tags with this class put ur radio button. Notice, u will have 2 radio buttons. It looks like:
@ktsutherland4 <div class="col-xs-6"> <label><input type="radio" name="bla-bla">text</label></div>
Steven Parker
@Philosophist
Oct 30 2015 16:33

@Chahanshah Might be a thought. Umm with all due appreciation, I think that phrase "hold your hand" is a bit misplaced in this context. You are not the first to use it in that sense on this site, so I'm not really thinking that it's unexpected or out of place, nor even inappropriate.

If the strategy is to have us search for the details required to fulfill a task, what benefit do we gain by doing that specific action? As opposed to say, having a very detailed resource list with examples of each method or function's use, just as was done for the javascript lessons? Is learning how to search the intention? If so, it would seem that a little advice on what to look for would also help. I've spent hours/days searching for information on what could help me with the first zipline, and what I learned from it is that there are too many resources which tech how to make a specific end result rather than helping to explain the fundamental aspects of what's going on (like a reference should).

The phrase, "hold your hand" sounds as if you would think the lesson would be too easy if it gave us a schematic resource of what can be done. Is that what you mean? Not trying to put words in your mouth nor even rebuke you for the suggestion, but I feel as though this sentiment deserves some challenging of it's own. Also, as I said, you're not the only person who's used it here, so I'm kind of making an open statement to everyone here. Is this a rationally optimal teaching strategy?

ChanaBanana
@ChanaFerrari
Oct 30 2015 16:35

my problem: Your h1 element should be blue.
My code:

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

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

:( :(
Derek
@Lyonar
Oct 30 2015 16:36
// Only change code below this line.
$($(".slot")[0]).html(slotOne);
$($(".slot")[1]).html(slotTwo);
$($(".slot")[2]).html(slotThree);

// Only change code above this line.
Vyacheslav
@Fitzjerald
Oct 30 2015 16:37
@hmouhtar what's name of ur waypoint? I need to watch code. Or send here.
Derek
@Lyonar
Oct 30 2015 16:37
Why is the syntax like the above instead of just $(".slot")[0].html(slotOne);
ChanaBanana
@ChanaFerrari
Oct 30 2015 16:37
:(
Vyacheslav
@Fitzjerald
Oct 30 2015 16:38
@ChanaFerrari try to use just color:blue; without background
Cody Bouscaren
@codybousc
Oct 30 2015 16:39
any ideas what i'm doing wrong here?
<script>
 $(document).ready(function() {

   $("#getMessage").on("click", function(){
    // Only change code below this line.

    $.getSJON("/json/cats.json?callback=", function( json) {
      $(".message").html(JSON.stringify(json))
    }); 

    // Only change code above this line.
   });

 });
</script>

<div class="container-fluid">
 <div class = "row text-center">
   <h2>Cat Photo Finder</h2>
 </div>
 <div class = "row text-center">
   <div class = "col-xs-12 well message">
     The message will go here
   </div>
 </div>
 <div class = "row text-center">
   <div class = "col-xs-12">
     <button id = "getMessage" class = "btn btn-primary">
       Get Message
     </button>
   </div>
 </div>
</div>
ChanaBanana
@ChanaFerrari
Oct 30 2015 16:39

@Fitzjerald .blue-text {
color: blue;
}

I did like that still not working :(

Cody Bouscaren
@codybousc
Oct 30 2015 16:40
i fail the 'You should be making use of the getJSON method given in the description to load data from the json file' test
ChanaBanana
@ChanaFerrari
Oct 30 2015 16:43
:worried:
Derek
@Lyonar
Oct 30 2015 16:43
@ChanaFerrari Your code reffering to .blue-text above doesn't have a closed bracket "}"
Vyacheslav
@Fitzjerald
Oct 30 2015 16:43
@Lyonar can't understand ur question.
ChanaBanana
@ChanaFerrari
Oct 30 2015 16:44
@Lyonar thank you so much and @Fitzjerald I GOT IT :sparkles: :)
CamperBot
@camperbot
Oct 30 2015 16:44
chanaferrari sends brownie points to @lyonar and @fitzjerald :sparkles: :thumbsup: :sparkles:
:star: 189 | @fitzjerald | http://www.freecodecamp.com/fitzjerald
:star: 175 | @lyonar | http://www.freecodecamp.com/lyonar
Vyacheslav
@Fitzjerald
Oct 30 2015 16:45
@ChanaFerrari and use only "color"
Derek
@Lyonar
Oct 30 2015 16:45
@Fitzjerald my question is reffering to the slot machine section. I just don't understand why the jQuery part requires $($.... instead of just $(
Thomas Manchester
@Eruditious
Oct 30 2015 16:50
what line?
@lyon
Michael Lefkowitz
@lfkwtz
Oct 30 2015 16:53
Getting stuck on my Simon zipline. I'm going to want to start building out an array, that when cycled through, elicits a 'click' on my simon buttons. To test this, I'm trying to make a button that clicks another button.
but my jquery code doesn't seem to be doing anything
Derek
@Lyonar
Oct 30 2015 16:53
Waypoint: Bring your JavaScript Slot Machine to Life @Eruditious ... just wondering why the jQuery syntax seems to be a query within a query
Michael Lefkowitz
@lfkwtz
Oct 30 2015 16:54
$("#start").click(function(){
  $("#green").click();
})
anyone have any ideas?
Erbold Namid
@erboldna
Oct 30 2015 16:55
Hi all. Me help.
Give your body element the color property of green.
Your h1 element should inherit the color green from your body element.
Example is inherit H1 from body?
h4r1m4u
@h4r1m4u
Oct 30 2015 16:56
@leftynaut don't do it that way. as you cycle through the array, you can add a CSS class or style to the button that will make it look like it was clicked for the user, even though it technically wasn't.
Michael Lefkowitz
@lfkwtz
Oct 30 2015 16:57
@h4r1m4u that's a good idea. but how can I add sound if it's not being clicked? would that just be part of the loop?
h4r1m4u
@h4r1m4u
Oct 30 2015 16:59
@leftynaut yes. you can write a custom function, say playButton(), that gets called as you cycle through the array. this function would both add the CSS class to the button (to make it visually 'clicked') and play the sound associated with the button
Michael Lefkowitz
@lfkwtz
Oct 30 2015 17:00
good ideas. thanks @h4r1m4u, i'll give it a shot.
CamperBot
@camperbot
Oct 30 2015 17:00
leftynaut sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 429 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 17:00
i'm not 100% sure, but i don't think you can use the jQuery .click() function without an actual mouse click happening. it might be a 'cul de sac' and a waste of time to go in that direction
Rex Schrader
@SaintPeter
Oct 30 2015 17:00
@leftynaut You can also technically "click" a button with JS, but that might make your code more confusing since you'd have to handle both computer and player clicks with the same funciton. I'd suggest encapsulating the animation and sound effects for clicking a button into a single function and then calling it from both the player click and the computer "click"
@h4r1m4u Yup, you can.
h4r1m4u
@h4r1m4u
Oct 30 2015 17:00
i stand corrected. thanks @SaintPeter
CamperBot
@camperbot
Oct 30 2015 17:00
h4r1m4u sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1278 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Oct 30 2015 17:01
@h4r1m4u @leftynaut If you wanted to use .click(), you would need to have a flag of some sort to say if it was the computer playing or the human.
Michael Lefkowitz
@lfkwtz
Oct 30 2015 17:02
@SaintPeter so do you also recommend the single function to utilize CSS and not actual clicks?
Rex Schrader
@SaintPeter
Oct 30 2015 17:02
@leftynaut You mean using "addClass" vs using CSS pseudoelements?
@leftynaut You need to have a click handler either way.
@leftynaut I would suggest that your animation be handled by CSS with the transition directive
@leftynaut The only tricky bit is the timing.
Vyacheslav
@Fitzjerald
Oct 30 2015 17:03
@Lyonar when we use just $(".smthg") we select of all the slots. But when we use $($(".smth")[1]).html(blabla) we access each individual slot
Michael Lefkowitz
@lfkwtz
Oct 30 2015 17:04
@SaintPeter got it. but my click handler will only be listening for clicks. not producing them to replicate the animations.
@SaintPeter right?
Derek
@Lyonar
Oct 30 2015 17:06
@Fitzjerald Ok, but weren't we selecting an individual slot based on the [0] or [1] and/or also the specific slotOne or slotTwo?
Rex Schrader
@SaintPeter
Oct 30 2015 17:07
@leftynaut The idea is this: Your click handler is supposed to handle what happens when a human clicks the button. That handler will trigger an animation and sound, as well as keep track of what button was pressed and launch some sort of comparison. I'd suggest that you not use .click() to trigger it for the computer because it will make the logic too complex. Instead, the stuff that does the animation/sound should be made into its own function, like "playButton" or something. Then that function can be called from your click handler (when a human clicks) and from your computer player, when IT "clicks" - in actuality, the computer is not clicking anything, just triggering the sound/animations.
h4r1m4u
@h4r1m4u
Oct 30 2015 17:08
@leftynaut yeah, what @SaintPeter says is exactly how i did it in my simon and what i was suggesting above
Michael Lefkowitz
@lfkwtz
Oct 30 2015 17:09
@SaintPeter got it. thank you for the clarification and tips.
CamperBot
@camperbot
Oct 30 2015 17:09
leftynaut sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1279 | @saintpeter | http://www.freecodecamp.com/saintpeter
Michael Lefkowitz
@lfkwtz
Oct 30 2015 17:09
@h4r1m4u great :)
tinako97
@tinako97
Oct 30 2015 17:17

I am intrigued by this console code in the node.js tutorial answer but can't find more about this shorthand. Does it only work with events?

response.on('data', console.log)
response.on('error', console.error)

Whereas I had written:

resp.on('data', function(data) {      // on-data listener
        console.log(data);
});
Rex Schrader
@SaintPeter
Oct 30 2015 17:18
@tinako97 It depends on what is being passed when the response callback is called
@tinako97 In general, you're passing a callback to the on function which will be executed when the event (data or error) occurs.
@tinako97 Since both log and error take an unlimited number of arguments, they'll just output anything that gets passed to them to the console.
tinako97
@tinako97
Oct 30 2015 17:20
@SaintPeter I think this is the first time I've seen implicit passing of arguments.
Rex Schrader
@SaintPeter
Oct 30 2015 17:21
@tinako97 Have you not used callbacks for API or timing work?
tinako97
@tinako97
Oct 30 2015 17:21
@SaintPeter I've used callbacks. Don't we always pass arguments explicitly?
Rex Schrader
@SaintPeter
Oct 30 2015 17:22
@tinako97 Not necessarily. If you're not using a closure, you can do something like this:
function someCallback(param1, param2) {
   // Do something
}

arr.filter(someCallback);  // Calls the callback
@tinako97 We generally do in-line anonymous function declarations, but if you have a really complex callback, or you want to re-use a callback in multiple places, you can just as easily define it elsewhere.
@tinako97 And, of course, you can use an existing built in function for a callback
@tinako97 For example, falsy bouncer can be solved like this:
return arr.filter(Boolean);
tinako97
@tinako97
Oct 30 2015 17:26
@SaintPeter In your first example above, you're filtering based on "do something", but you're not passing anything either explicitly or implictly, are you?
Rex Schrader
@SaintPeter
Oct 30 2015 17:27
@tinako97 The filter method has a pre-defined set of parameters that it passes. I believe they are item, index, array - but you only need to use what you need.
tinako97
@tinako97
Oct 30 2015 17:27
When console.log was called, how did the function know what data to print?
Rex Schrader
@SaintPeter
Oct 30 2015 17:28
Have you done the bonfire "seek and destory"?
@tinako97 If so, you should be familiar with the arguments object?
tinako97
@tinako97
Oct 30 2015 17:28
@SaintPeter Yes.
Rex Schrader
@SaintPeter
Oct 30 2015 17:29
@tinako97 console.log uses the arguments object, as does console.error
@tinako97 Because they both accept an unlimited number of arguments
@tinako97 Under parameters, callback
h4r1m4u
@h4r1m4u
Oct 30 2015 17:30

@Lyonar here's how i understand it:

$(".slot") // this returns a JQUERY OBJECT with all the DOM elements with the class .slot
$(".slot")[0] // this returns the FIRST RAW DOM ELEMENT from those selected by the ".slot" selector. because it's a raw DOM element and not a jQuery object, it doesn't have any of the jQuery methods, which is why doing just $(".slot")[0].html(slotOne) wouldn't work. the raw DOM element doesn't have the html() method
$($(".slot)[0]) // using the jQuery wrapper object here (the extra $( .. )) ensures that you're working with a JQUERY OBJECT and hence can use all the jQuery methods on the selected elements

thanks for bringing this up. it helped me clarify some things

CamperBot
@camperbot
Oct 30 2015 17:30
h4r1m4u sends brownie points to @lyonar :sparkles: :thumbsup: :sparkles:
:star: 177 | @lyonar | http://www.freecodecamp.com/lyonar
Rex Schrader
@SaintPeter
Oct 30 2015 17:30
@tinako97 Function to test each element of the array. Invoked with arguments (element, index, array)
Chahan Shah
@Chahanshah
Oct 30 2015 17:30
@Philosophist There is no optimal teaching strategy that applies universally. It depends from person to person. Based on individual learning styles and to some extent their background and experience with the topic.
Rex Schrader
@SaintPeter
Oct 30 2015 17:30
@tinako97 filter is responsible for calling the callback you give it. filter always passes those 3 arguments.
tinako97
@tinako97
Oct 30 2015 17:31
@SaintPeter Ah yes, those 3 are an example of implicit parameters?
Rex Schrader
@SaintPeter
Oct 30 2015 17:31
@tinako97 In the same way, the on data and on error events also call the callback with a predefined signature.
@tinako97 I guess? I would call them a "callback signature"
tinako97
@tinako97
Oct 30 2015 17:32
@SaintPeter Ah, I see.
Rex Schrader
@SaintPeter
Oct 30 2015 17:32
@tinako97 It's less that there is an "implicit" definition than there is a pattern of arguments, a "signature", that the calling method expects the callback to be able to accept/handle.
@tinako97 Sort of in the way that you plug a plug into the wall - the expectation is that (in the US at least), you'll get 120v AC, at 60Hz
tinako97
@tinako97
Oct 30 2015 17:33
I see. And I was searching for info with console but really I should have looked up on data.
Derek
@Lyonar
Oct 30 2015 17:34
@h4r1m4u Thanks that does help!
CamperBot
@camperbot
Oct 30 2015 17:34
lyonar sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 430 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Rex Schrader
@SaintPeter
Oct 30 2015 17:34
@tinako97 Yes! The data event will tell you what it is sending.
@tinako97 what its callback "signature" is
h4r1m4u
@h4r1m4u
Oct 30 2015 17:34
@Lyonar great!
Rex Schrader
@SaintPeter
Oct 30 2015 17:35
@tinako97 Out of curiosity, what type of object is producing the data event?
tinako97
@tinako97
Oct 30 2015 17:36
http.get()
I'm having trouble finding documentation for on data. Do you know?
Rex Schrader
@SaintPeter
Oct 30 2015 17:36
@tinako97 for Angular?
@tinako97 or Express?
tinako97
@tinako97
Oct 30 2015 17:37
@SaintPeter no, it's the node.js tutorial.
The object type is string.
Jacob Andra
@jacob4
Oct 30 2015 17:40
I tried copying and pasting all my code from the cat app exercises. I pasted it into SublimeText and when I opened in Chrome, the Bootstrap elements were not functional. The rest of the content and styling showed up fine, just without the Bootstrap styling. Can anyone help me to figure out why? Code is below.

<!doctype html>

<html>
<head>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>

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


<style>
h2 {
font-family: Lobster, Monospace;
}

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

</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div>
<img src="http://bit.ly/fcc-running-cats" class="img-responsive">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<div class="row">
<div class="col-xs-7">
<input type="text" class="form-control" placeholder="cat photo URL" required>
</div>
<div class="col-xs-5">
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>
Submit</button>
</div>
</div>
</form>
</div>
</body>
</html>

Rex Schrader
@SaintPeter
Oct 30 2015 17:41
@tinako97 Wow, there is basically no documentation that I can find.
@tinako97 As near as I can tell, the data event has a single parameter, which is the "chunk" of data that is being returned.
h4r1m4u
@h4r1m4u
Oct 30 2015 17:45
@jacob4 because this <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> is a protocol relative url and if you're testing the page locally, it's trying to find the bootstrap.css on your local machine (in a non-existing location). easy fix, just add the https protocol to make it a proper url:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
Jacob Andra
@jacob4
Oct 30 2015 17:46
@h4r1m4u By Jove, you are right! Thanks!
CamperBot
@camperbot
Oct 30 2015 17:46
jacob4 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 431 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
tinako97
@tinako97
Oct 30 2015 17:46
@SaintPeter That's all very helpful. Thanks so much!
Esteban
@fr0gs
Oct 30 2015 17:51
Hello everyone, I am near finishing the first Zipline about my own portfolio and when I load the page locally my navbar works fine, however when I upload it to Codepen it keeps functionality but does neither change navbar color nor show the font awesome icons + links in the navbar
Byron Lagrone
@byronic
Oct 30 2015 17:52
I'm taking a look, @fr0gs
Esteban
@fr0gs
Oct 30 2015 17:52
I also struggle with that right padding, I honestly am lost, makes no sense that padding to me
thank you @byronic
CamperBot
@camperbot
Oct 30 2015 17:52
fr0gs sends brownie points to @byronic :sparkles: :thumbsup: :sparkles:
:star: 214 | @byronic | http://www.freecodecamp.com/byronic
Bruhman503
@Bruhman503
Oct 30 2015 17:53
can anyone help me with waypoint 3 in the intro to object oriented programming? The waypoint title is "make object properties private". I don't understand the code nor what they are asking of me.

var Bike = function() {

// Only change code below this line.

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

};

this.speed = 100;

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

// Only change code above this line.

Byron Lagrone
@byronic
Oct 30 2015 17:56
I have a few questions @fr0gs
Esteban
@fr0gs
Oct 30 2015 17:56
Tell me
Byron Lagrone
@byronic
Oct 30 2015 17:57

First: You have many local stylesheets linked here within CodePen that won't actually exist, i.e.:

<!-- Own CSS file -->
  <link href="css/mystyles.css" rel="stylesheet">

If these stylesheets actually exist and are on your computer, then they need to be either a) copied and pasted to the CSS portion of the Pen or b) uploaded to a web-accessible server you control so that you can link them via the web

@fr0gs Secondly: I have some good news for you, which is that the text + font awesome is definitely working / present. Right now it's the same color as the background, which is why you can't see it -- if you highlight that portion of the site by selecting w/mouse you'll see that it pulled the fonts for you correctly
Before I go on, do both of those make sense or maybe generate an a-ha! moment?
Esteban
@fr0gs
Oct 30 2015 18:00
Yes, I pasted my mystyles.css in the css tab on codepen
Otherwise It would not format most of the rows properly
ChanaBanana
@ChanaFerrari
Oct 30 2015 18:01
Waypoint: Use Responsive Design with Bootstrap Fluid Containers
Make sure you have nested all HTML elements in .container-fluid.
code:

.container-fluid{
}
</style>

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

<div class="container-fluid">
<p>Click here for <a href="#">cat photos</a>.</p>

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

<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>

need help :(
Byron Lagrone
@byronic
Oct 30 2015 18:01
@fr0gs There is an issue in your CSS. I'll dig and see if I can find it. The reason I know is that if I remove your CSS, the nav-bar (and its hover-color change) appears correctly.
Esteban
@fr0gs
Oct 30 2015 18:01
@byronic On the other side, it should not have the same background color, as in the CSS i change the #mynavbar color explicitly. But maybe I need to reference to the pasted stylesheet in a specific manner in codepen
Byron Lagrone
@byronic
Oct 30 2015 18:02
No, it's definitely referencing it correctly @fr0gs , there's just an issue within it
I'm banging away to find it right now ;)
Esteban
@fr0gs
Oct 30 2015 18:02
Strange, strange.. I can properly visualize it locally
Chrome.
Jason Wood
@catapixel
Oct 30 2015 18:03
@ChanaFerrari The instructions you've copied in say to "Make sure you have nested all HTML elements in .container-fluid" but you have a <h2 class="red-text">CatPhotoApp</h2> before your div container. Probably is your issue
ChanaBanana
@ChanaFerrari
Oct 30 2015 18:03

@catapixel like that

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>

<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;
}
.container-fluid{
}
</style>

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

<div class="container-fluid">
<p>Click here for <a href="#">cat photos</a>.</p>

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

<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>

Byron Lagrone
@byronic
Oct 30 2015 18:04

@fr0gs --

#mynavbar > ul > li > a {
  color: #FFFFFF;
}

is the culprit where your navbar is concerned

Try removing that (or commenting out, if you prefer), then see if that looks more like what you wanted
Esteban
@fr0gs
Oct 30 2015 18:05
hmmm let's check it out
Jason Wood
@catapixel
Oct 30 2015 18:06
@ChanaFerrari No. You do not need to add .container-fluid between your <style></style> tags. It is a class that is built into Bootstrap. You just use it. Look below your closing <style> tag. Do you see that <h2> element that is outside the <div class="container-fluid"> that comes immediately after. Move the <h2> so it is after the <div class="container-fluid">
Esteban
@fr0gs
Oct 30 2015 18:07
@byronic thank you, that fixed it.
CamperBot
@camperbot
Oct 30 2015 18:07
fr0gs sends brownie points to @byronic :sparkles: :thumbsup: :sparkles:
:warning: fr0gs already gave byronic points
ChanaBanana
@ChanaFerrari
Oct 30 2015 18:07
@catapixel thank youuu so much :D
CamperBot
@camperbot
Oct 30 2015 18:07
chanaferrari sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 553 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Oct 30 2015 18:08
@ChanaFerrari np. You also don't need this <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/> at the beginning of your code. FCC is handling that for you.
Byron Lagrone
@byronic
Oct 30 2015 18:08
@fr0gs No problem, glad I could help ! :)
ChanaBanana
@ChanaFerrari
Oct 30 2015 18:09
@catapixel thank you again I got it :)
CamperBot
@camperbot
Oct 30 2015 18:09
chanaferrari sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:warning: chanaferrari already gave catapixel points
metalek
@metalek
Oct 30 2015 18:39

Hi all, currently on the first basejump and am getting an error when I try to use chart.js. The error is:

'Chart' is not defined.

Is this due to the way I'm importing chart.js? How do I fix this?

Rex Schrader
@SaintPeter
Oct 30 2015 18:44
@metalek You need to add the appropriate reference to your app.js file
Byron Lagrone
@byronic
Oct 30 2015 18:59
Alrighty, I haven't had any luck in /HelpZiplines, so I'm throwing this question in here:
I have one lingering issue in my portfolio Zipline, which is that on mobile devices the anchor links present in the navbar don't actually perform their function, instead depositing the user at the top of the page.
If anyone can help me, that would be awesome. If you spot anything else that I've missed, either on desktop or mobile, that would be cool too, since I want to move to the next Zipline today. :wink:
http://codepen.io/byronic/pen/PPQGeM
metalek
@metalek
Oct 30 2015 19:09
@SaintPeter Like this? I'm still getting the same error:
angular.module('basejumpsApp', [
  'ngCookies',
  'ngResource',
  'ngSanitize',
  'ngRoute',
  'ui.bootstrap',
  'chart.js'
])
Rex Schrader
@SaintPeter
Oct 30 2015 19:09
@metalek I tihnk it's Chart.js?
@metalek Case senstivite - capital C
Richard
@Klagid
Oct 30 2015 19:13
Your p element should have the text "View more " (with a space after it). There is a red X next to this hint on the left in way point.
<p>View more <a href="http://www.freecatphotoapp.com"> cat photos</a></p>
That's my code and I don't know why I am not able to proceed.
Rex Schrader
@SaintPeter
Oct 30 2015 19:14
@Klagid Extra space before the c in cat
Richard
@Klagid
Oct 30 2015 19:15
I am still not able to proceed even after modifying my code :/
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
^^new code
Byron Lagrone
@byronic
Oct 30 2015 19:15
@h4r1m4u helped me in HelpZiplines, so please consider my above query closed
h4r1m4u @h4r1m4u woot woots!
metalek
@metalek
Oct 30 2015 19:16
@SaintPeter Still no, same error
Richard
@Klagid
Oct 30 2015 19:16
@SaintPeter I am still getting the same error after removing the space before cat photos
Rex Schrader
@SaintPeter
Oct 30 2015 19:16
@metalek You'd need to make sure that it's actually installed - did you do --save when you installed it with NPM?
@Klagid Is your <p> the first one in the list, after the <h2>? It needs to be.
Bill
@kirah1314
Oct 30 2015 19:17
@Klagid you need a space after "more"
Rex Schrader
@SaintPeter
Oct 30 2015 19:17
@Klagid Oh, hey, you're from Roseville!
@Klagid We've got a coffee and code coming up on the 11th
Richard
@Klagid
Oct 30 2015 19:18
Woo Hoo that worked!!
yes I am :D
I sent a request to join the Sacramento FB group too
What time on the 11th
metalek
@metalek
Oct 30 2015 19:18
@SaintPeter I did, yeah. I was initially installing it with bower but I uninstalled it from bower and tried it with npm with --save and it still isn't working
Rex Schrader
@SaintPeter
Oct 30 2015 19:18
@Klagid 7pm at Brookfields
Byron Lagrone
@byronic
Oct 30 2015 19:19
@Eruditious thanks!
CamperBot
@camperbot
Oct 30 2015 19:19
byronic sends brownie points to @eruditious :sparkles: :thumbsup: :sparkles:
:star: 212 | @eruditious | http://www.freecodecamp.com/eruditious
Rex Schrader
@SaintPeter
Oct 30 2015 19:19
@Klagid Details in the event on the Sac site.
Richard
@Klagid
Oct 30 2015 19:19
Okay awesome!!
Fennek
@fennekbe
Oct 30 2015 19:20

Hey, can someone help me out here. I'm using CSS to style my webpage but I'm having some issues with how to adress the correct elements. Here's my code

        <nav class="top-nav">
            <div class="top-nav-wrap">
                <h1>Genthay</h1>
                <ul>
                    <li class="active"><a href="#">Home</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Portfolio</a></li>
                    <li><a href="#">Blog</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
        </nav>

and css

.top-nav {
  width: 100%;
  height: 40px;
  background-color: #EEE;
}

.top-nav-wrap {
  width: 960px;
}

.top-nav-wrap h1 {
  float: left;
}

.top-nav-wrap ul {
  float: right;
}

I'm having a problem with the bottom part of my CSS, h1 and ul won't move.

Rex Schrader
@SaintPeter
Oct 30 2015 19:20
@metalek I don't have any more insight. I used it on my Voting Basejump and had similar issues, but I just worked through it.
metalek
@metalek
Oct 30 2015 19:20
@SaintPeter Alright, thanks anyway
CamperBot
@camperbot
Oct 30 2015 19:20
metalek sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1288 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Oct 30 2015 19:21
ok, lunchtime, TTYL
h4r1m4u
@h4r1m4u
Oct 30 2015 19:21
@fennekbe do you have it in codepen?
Dardan Kadrija
@DardanKadrija
Oct 30 2015 19:21
Anyone needs help ?
Fennek
@fennekbe
Oct 30 2015 19:21
I do not, I'm sorry
@h4r1m4u
@h4r1m4u I had some hosting laying around, may aswell use it
genthay.eu if it helps you
h4r1m4u
@h4r1m4u
Oct 30 2015 19:22
@fennekbe ok. it's tough to troubleshoot it without seeing the rest of it as i can't tell what other CSS may be overriding the style of those elements
Fennek
@fennekbe
Oct 30 2015 19:22
there's no other css. Only some standard body modifications
h4r1m4u
@h4r1m4u
Oct 30 2015 19:23
is genthay.eu the site you're working on?
Fennek
@fennekbe
Oct 30 2015 19:23
@h4r1m4u Yes sir/mam
h4r1m4u
@h4r1m4u
Oct 30 2015 19:23
ah, cool. give me a second
Fennek
@fennekbe
Oct 30 2015 19:23
Working on is a big word though. hehe
Byron Lagrone
@byronic
Oct 30 2015 19:24
-- obligatory "small, difficult word" joke here --
h4r1m4u
@h4r1m4u
Oct 30 2015 19:25

@fennekbe the actual site code is:

        <nav>
            <div class="top-nav">
                <h1>Genthay</h1>

                <ul>
                    <li class="active"><a href="http://www.genthay.eu">Home</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Portfolio</a></li>
                    <li><a href="#">Blog</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
        </nav>

it doesn't have the .top-nav-wrap div which you use in your CSS definitions

the float never gets applied on the <h1> and <ul>
Fennek
@fennekbe
Oct 30 2015 19:26
oh
That's incredibly stupid, I guess I didn't save properly
h4r1m4u
@h4r1m4u
Oct 30 2015 19:26
:D
Fennek
@fennekbe
Oct 30 2015 19:27
It does indeed work now haha. Thank you @h4r1m4u
CamperBot
@camperbot
Oct 30 2015 19:27
fennekbe sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 433 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Oct 30 2015 19:27
you're welcome!
Augustas
@AugustasV
Oct 30 2015 19:43
Hello, give me some github projects - I want to edit something little, i am begginer :)
h4r1m4u
@h4r1m4u
Oct 30 2015 19:45
@AugustasV how about starting with the FreeCodeCamp waypoints and ziplines?
Augustas
@AugustasV
Oct 30 2015 19:46
for example, what should i edit? Documentation?
h4r1m4u
@h4r1m4u
Oct 30 2015 19:47
if you're a beginner, it might be a good idea to start here: http://freecodecamp.com/map
Ethan Leyden
@Darksmurf
Oct 30 2015 19:49
bf falsy
CamperBot
@camperbot
Oct 30 2015 19:49
Sorry, can't find a bonfire called falsy. [ Check the map? ]
Ethan Leyden
@Darksmurf
Oct 30 2015 19:49
bf falsey
CamperBot
@camperbot
Oct 30 2015 19:49

:fire:Bonfire: Falsey Bouncer :link:

function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  return arr;
}

bouncer([7, 'ate', '', false, 9]);

Remove all falsey values from an array.

more info:  bf details | bf links | hint

Ethan Leyden
@Darksmurf
Oct 30 2015 19:49
hint
CamperBot
@camperbot
Oct 30 2015 19:49
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
tanel3203
@tanel3203
Oct 30 2015 20:19
Hey
Does FCC not support prompt()?
Blauelf
@Blauelf
Oct 30 2015 20:23
@tanel3203 prompt() is a function of Window. Not sure we are allowed to use that.
tanel3203
@tanel3203
Oct 30 2015 20:30
Kind of stomped on how to get user input...
Blauelf
@Blauelf
Oct 30 2015 20:31
What do you need that for?
André Duarte
@clint74
Oct 30 2015 20:32
bf Roman Numeral Converter
CamperBot
@camperbot
Oct 30 2015 20:32

:fire:Bonfire: Roman Numeral Converter :link:

function convert(num) {
 return num;
}

convert(36);

Convert the given number into a roman numeral.

more info:  bf details | bf links | hint

tanel3203
@tanel3203
Oct 30 2015 20:32
I'm doing the last Intermediate Algorithm Scripting bonfire. "Create a function that sums two arguments together. If only one argument is provided, then return a function that expects one argument and returns the sum."
André Duarte
@clint74
Oct 30 2015 20:32
bf details
CamperBot
@camperbot
Oct 30 2015 20:32

:fire:Bonfire: Roman Numeral Converter :link:

function convert(num) {
 return num;
}

convert(36);
Convert the given number into a roman numeral.
All <a href="http://www.mathsisfun.com/roman-numerals.html">roman numerals</a> answers should be provided in upper-case.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
André Duarte
@clint74
Oct 30 2015 20:33
bf links
André Duarte
@clint74
Oct 30 2015 20:33
hint
CamperBot
@camperbot
Oct 30 2015 20:33
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Blauelf
@Blauelf
Oct 30 2015 20:33
@tanel3203 And what is your user input supposed to do?
Rex Schrader
@SaintPeter
Oct 30 2015 20:34
@tanel3203 The user input is given via the function calls. The key to that Bonfire is that you need to return a function if only one number is passed in.
tanel3203
@tanel3203
Oct 30 2015 20:35
@SaintPeter thanks
CamperBot
@camperbot
Oct 30 2015 20:35
tanel3203 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1290 | @saintpeter | http://www.freecodecamp.com/saintpeter
tanel3203
@tanel3203
Oct 30 2015 20:35
It helps me forward a bit
David Wilbanks
@dwilbank68
Oct 30 2015 20:37
@tanel3203 I think the exercise doesn't give what you're doing its proper name
Jen Barney
@snazzy4razzy
Oct 30 2015 20:38
I need a hint...I can't remember.... how to create a CSS class called pink-text
Blauelf
@Blauelf
Oct 30 2015 20:38
@dwilbank68 Now I'm hungry again :D
David Wilbanks
@dwilbank68
Oct 30 2015 20:38
yeh I still haven't looked up why it has that silly name
Rex Schrader
@SaintPeter
Oct 30 2015 20:39
@snazzy4razzy .pink-text { /* some directives here */ }
Jen Barney
@snazzy4razzy
Oct 30 2015 20:39
@SaintPeter thanks!
CamperBot
@camperbot
Oct 30 2015 20:39
snazzy4razzy sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1291 | @saintpeter | http://www.freecodecamp.com/saintpeter
tanel3203
@tanel3203
Oct 30 2015 20:39
@dwilbank68 yes the requirements are a bit hard to understand
Blauelf
@Blauelf
Oct 30 2015 20:40
@dwilbank68 I found that name in some kata on codewars
David Wilbanks
@dwilbank68
Oct 30 2015 20:41
wouldn't have wanted to do that exercise without already knowing currying...
tanel3203
@tanel3203
Oct 30 2015 20:43
@dwilbank68 thanks!
CamperBot
@camperbot
Oct 30 2015 20:43
tanel3203 sends brownie points to @dwilbank68 :sparkles: :thumbsup: :sparkles:
:star: 16 | @dwilbank68 | http://www.freecodecamp.com/dwilbank68
tanel3203
@tanel3203
Oct 30 2015 20:43
Think I got it
David Wilbanks
@dwilbank68
Oct 30 2015 20:43
yay
Jen Barney
@snazzy4razzy
Oct 30 2015 20:51
my h1 element should have the class pink-text. this is what I put in the style .pink-text {color-pink;} but my h1 element isn't pink. what did I miss or do wrong?
David Wilbanks
@dwilbank68
Oct 30 2015 20:52

why are the property and the pink connected by a hyphen? nay

seperate them with a colon

Jen Barney
@snazzy4razzy
Oct 30 2015 20:53
.pink-text {color: pink;} still not pink....
Blauelf
@Blauelf
Oct 30 2015 20:53
Did you add class="pink-text" to your element?
Jen Barney
@snazzy4razzy
Oct 30 2015 20:54
THANKS! that is what I couldn't remember!
CamperBot
@camperbot
Oct 30 2015 20:54
if you want to thank someone, put an @ before their name!
Dan Farcas
@dmfarcas
Oct 30 2015 20:55
bf title case
CamperBot
@camperbot
Oct 30 2015 20:55

:fire:Bonfire: Title Case a Sentence :link:

function titleCase(str) {
  return str;
}

titleCase("I'm a little tea pot");

Return the provided string with the first letter of each word capitalized.

more info:  bf details | bf links | hint

Dan Farcas
@dmfarcas
Oct 30 2015 20:55
bf details
CamperBot
@camperbot
Oct 30 2015 20:55

:fire:Bonfire: Title Case a Sentence :link:

function titleCase(str) {
  return str;
}

titleCase("I'm a little tea pot");
Return the provided string with the first letter of each word capitalized.
For the purpose of this exercise, you should also capitalize connecting words like 'the' and 'of'.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
Dan Farcas
@dmfarcas
Oct 30 2015 20:55
bf links
CamperBot
@camperbot
Oct 30 2015 20:55
Dan Farcas
@dmfarcas
Oct 30 2015 20:56
hint
CamperBot
@camperbot
Oct 30 2015 20:56
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
fedelegina2016
@fedelegina2016
Oct 30 2015 21:02
Hi im having a very hard time changing the h2 element to blue?
Rex Schrader
@SaintPeter
Oct 30 2015 21:03
@fedelegina2016 CAre you share your code?
fedelegina2016
@fedelegina2016
Oct 30 2015 21:03

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

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

Rex Schrader
@SaintPeter
Oct 30 2015 21:04
@fedelegina2016 ok, you've got your HTML mixed up with your css
@fedelegina2016 the css goes inside the <style> tags, the <h2> goes below those tags.