These are chat archives for FreeCodeCamp/Help

10th
Nov 2015
Coira Ellison
@Coira
Nov 10 2015 00:00
@RoboDel got it
Del
@RoboDel
Nov 10 2015 00:00
My closing <div>s seem to be messing up @Coira
Coira Ellison
@Coira
Nov 10 2015 00:01
@RoboDel post what you've got, starting from this point <form action="/submit-cat-photo">
@RoboDel are you getting the same error as @sbeauvais34 ?
Del
@RoboDel
Nov 10 2015 00:03
@Coira I just reset the page to start over...I'll send once I fill in again
Coira Ellison
@Coira
Nov 10 2015 00:03
@RoboDel ok
Synthia Beauvais
@sbeauvais34
Nov 10 2015 00:04
@Coira That didn’t work for me. Not sure why.
Adam Parker
@amichaelparker
Nov 10 2015 00:05
hey all, quick question on the last test for the Check for Palindromes bonfire ( http://www.freecodecamp.com/challenges/bonfire-check-for-palindromes ) - the last test is "palindrome("00 (: /-\ :) 0-0") should return true."; the problems I'm having are 1) the backslash isn't escaped, so console.log won't even print it, and loops / reverse() ignore it, and 2) "" != "-", so any hints on making that true?
that came out weird, should have been 2) "_" != "-" (hopefully that works)
Herman Fassett
@HermanFassett
Nov 10 2015 00:06
All punctuation should be removed
The testing string should be 0000
Which is a palindrome
Coira Ellison
@Coira
Nov 10 2015 00:06
@sbeauvais34 i have no idea, passes for me in chrome and ffox. maybe move on to the next waypoint?
Adam Parker
@amichaelparker
Nov 10 2015 00:06
gotcha, ty
Del
@RoboDel
Nov 10 2015 00:08
@Coira <form action="/subit-cat-photo">
Do I put that in the editor above my question spot?
Coira Ellison
@Coira
Nov 10 2015 00:10
@RoboDel i'm not sure what you mean. for the way point you just need to put in the divs and classes.
if you want me to check your code, paste everything from that line to the end here and i can take a look
Synthia Beauvais
@sbeauvais34
Nov 10 2015 00:12
@Coira I will do that and come back to it. Thanks again.
CamperBot
@camperbot
Nov 10 2015 00:12
sbeauvais34 sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:warning: sbeauvais34 already gave coira points
Del
@RoboDel
Nov 10 2015 00:12
I put the divs above each <button> and closed each div afther </button> and keep getting this : Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6. @Coira
flyingwh4le
@flyingwh4le
Nov 10 2015 00:12
whats a way to iterate trought alist on javascript?
whithout the boring for loop?
Coira Ellison
@Coira
Nov 10 2015 00:13
@RoboDel did you put all the buttons inside one div also?
Kenan
@Johnny34
Nov 10 2015 00:13
I have problem with migrating my wordpress site from localhost to live hosting..
can anyone help me??
po mogucnosti sa mog govornog podrucja..
Del
@RoboDel
Nov 10 2015 00:14
@Coira '<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">
<div class="col-xs-6">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-6">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
</div>
<div class="col-xs-4">
<div class="col-xs-6">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
</div>'
Kenan
@Johnny34
Nov 10 2015 00:14
I have problem with migrating my wordpress site from localhost to live hosting..
can anyone help me??
po mogucnosti sa mog govornog podrucja..
Del
@RoboDel
Nov 10 2015 00:14
sorry I guess I didn't use the backticks right
Coira Ellison
@Coira
Nov 10 2015 00:15
@RoboDel that's ok, it's 3 backticks. but the code you posted isn't the code you're meant to change
Del
@RoboDel
Nov 10 2015 00:16
@Coira what do you mean?
Coira Ellison
@Coira
Nov 10 2015 00:16
this is the one you're doing right? Waypoint: Responsively Style Radio Buttons ?
Nicole F.
@gitasong
Nov 10 2015 00:17
Can anyone take a question?
Coira Ellison
@Coira
Nov 10 2015 00:17
it's asking you to nest all your radio buttons, which are these
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
@gitasong you want to ask a question? or answer one? either way, feel free :)
Del
@RoboDel
Nov 10 2015 00:18
@Coira Yes, and it keeps Error Nest all of your radio buttons inside one div with the class row.
Nest each of your radio buttons inside its own div with the class col-xs-6.
@Coira OMG ...I'm an idiot
@Coira thanks
CamperBot
@camperbot
Nov 10 2015 00:19
robodel sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 296 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Nov 10 2015 00:19
@RoboDel lol, that's what coding does to you sometimes :p
Nicole F.
@gitasong
Nov 10 2015 00:19
Ask. I'm on Waypoint #189: Iterate over Arrays with map. I haven't a clue what's going on. I've never seen the map method before; I haven't a clue what the syntax means. Would someone care to explain it?
Coira Ellison
@Coira
Nov 10 2015 00:20
@gitasong what's the waypoint called? i don't know why, my waypoint numbers don't seem to match
@gitasong sorry, you already said it
Nicole F.
@gitasong
Nov 10 2015 00:21
Yep. Iterate over Arrays with map.

So what's going on with the example code?

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

return val * 4;

});

Oops--let me try that again:
var timesFour = oldArray.map(function(val){

  return val * 4;

});
So timesFour is a new function we're declaring/defining, yes?
Coira Ellison
@Coira
Nov 10 2015 00:23
@flyingwh4le bit late, but @gitasong just jogged my memory, have a look at javascript's functional array methods, like map, forEach, filter (there's more but i don't remember them right now)
Nicole F.
@gitasong
Nov 10 2015 00:23
oldArray is the array to which we're applying the map method, yes?
Coira Ellison
@Coira
Nov 10 2015 00:24
@gitasong oldArray, yes that's correct
timesFour is the result of what map does
Nicole F.
@gitasong
Nov 10 2015 00:24
And the map method is supposed to iterate through each element of the original array (in this case, oldArray), and perform the function timesFour on it, yes?
Coira Ellison
@Coira
Nov 10 2015 00:25
yep
Nicole F.
@gitasong
Nov 10 2015 00:25
Okay. So what's the (function(val) doing in there?? What the heck is that?
Coira Ellison
@Coira
Nov 10 2015 00:25
it's pretty much like a for-loop
Nicole F.
@gitasong
Nov 10 2015 00:25
The map method, yes.
I get that. It's the syntax that
's confusing.
Coira Ellison
@Coira
Nov 10 2015 00:27
in a for loop, you use array[i] to access the current element. in this case, val is the same as array[i]
Nicole F.
@gitasong
Nov 10 2015 00:28
What's the (function(val) doing in there (and why isn't there a closing parenthesis?)? Why can't we just go
var timesFour = 
oldArray.map {
return oldArray * 4;
}
or something like that?
So (function(val) is like saying "perform the map function on each element ("val") of oldArray"?
Coira Ellison
@Coira
Nov 10 2015 00:30
i guess cos map needs a function to apply to each val
Nicole F.
@gitasong
Nov 10 2015 00:30
I thought map was a function (i.e. a method)?
Coira Ellison
@Coira
Nov 10 2015 00:30
it is, but you can pass functions into functions, like you would, e.g. pass in numbers
Nicole F.
@gitasong
Nov 10 2015 00:31
Hmm. Okay.
How do I know that I need to pass in a function here?
Coira Ellison
@Coira
Nov 10 2015 00:31
map is more like, "map goes through each element in an array, and performs a function to that element"
Nicole F.
@gitasong
Nov 10 2015 00:32
Ah--so it's a nonspecific function? It just says "do something to every element in an array"?
Coira Ellison
@Coira
Nov 10 2015 00:32
yes! you can pass in any function as long as it returns something
:)
Nicole F.
@gitasong
Nov 10 2015 00:33
Okay... But still, why do we need the additional (function(val), if map is already saying "do this to every element in the array"?
Also, "function" is not naming a function; it's declaring that whatever follows is a function, correct?
So (function(val) has no meaning, as far as I can tell. :/
M Used
@mildused
Nov 10 2015 00:34
Anyone familiar with Parse?
Coira Ellison
@Coira
Nov 10 2015 00:35
your second line, "it's declaring a function", that's why you need it, otherwise you're not creating a new function
Nicole F.
@gitasong
Nov 10 2015 00:36
But .map already says "this is a function"?!
Coira Ellison
@Coira
Nov 10 2015 00:36
sorry @mildused not me
Nicole F.
@gitasong
Nov 10 2015 00:36
What I'm saying is that "function" is a keyword in JavaScript, yes?
Coira Ellison
@Coira
Nov 10 2015 00:37
yep
Nicole F.
@gitasong
Nov 10 2015 00:37
It's not the name of a function; it declares a function.
Coira Ellison
@Coira
Nov 10 2015 00:37
yep
Nicole F.
@gitasong
Nov 10 2015 00:37
So if we say oldArray.map(function(val) -- that doesn't mean anything, because we haven't named and defined a function after the keyword function!?!
Bo Sanders
@Biletnikoff
Nov 10 2015 00:38
how do I unbreak a bonfire?
Coira Ellison
@Coira
Nov 10 2015 00:38
wiki storage
CamperBot
@camperbot
Nov 10 2015 00:38

:point_right: clear your browser's local storage [wiki]

Removing all your locally stored challenges will solve many problems related to the browser crashing on FreeCodeCamp

In Chrome:

  • On 'freecodecamp.com' open your console
    • Windows: Ctrl + Shift + J
    • Mac OS: Cmd + Opt + J
  • Go to resources tab(chrome).
    • There click on the localStorage link in the nav bar on the right.
  • Delete all the entries on the right side.
  • See if this solves your issue

Alternatively, if you are having issues with a specific challenge freezing your browser, find the name of that challenge in local storage and delete just that one.
:pencil: read more about clear your browsers local storage on the FCC Wiki

Nicole F.
@gitasong
Nov 10 2015 00:38
(This damn syntax drives me crazy! :p )
Coira Ellison
@Coira
Nov 10 2015 00:39
@gitasong ha, don't worry about it, it does that to everyone. it's a good question
Bo Sanders
@Biletnikoff
Nov 10 2015 00:39
@Coira thanks
CamperBot
@camperbot
Nov 10 2015 00:39
biletnikoff sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 297 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Nov 10 2015 00:39
@gitasong you have to tell javascript you're defining a function before you actually define it
Nicole F.
@gitasong
Nov 10 2015 00:40
The syntax "function(val)" looks like it's saying "Here's a function named "function" that takes the argument "val." But there cannot be a function named "function" in JS because "function is a reserved keyword!
Okay, but ^^.\
Coira Ellison
@Coira
Nov 10 2015 00:40
ohh i see, you're not naming the function "function", you're just saying, the next bit is a function
Nicole F.
@gitasong
Nov 10 2015 00:41
But "val" is an argument here; it's not a function name or definition!
Coira Ellison
@Coira
Nov 10 2015 00:41
if you don't name it, it actually creates a function without a name
Nicole F.
@gitasong
Nov 10 2015 00:41
Unless--it's talking about the "return val * 4" bit??
But it still hasn't named the damn function!! :p
Coira Ellison
@Coira
Nov 10 2015 00:42
without val, how would you do return val*4 ?
Nicole F.
@gitasong
Nov 10 2015 00:42
Not a clue. :p
Coira Ellison
@Coira
Nov 10 2015 00:42
'val' can be anything btw, function(element) works just as well
Nicole F.
@gitasong
Nov 10 2015 00:43
Okay. But still, why do we need "function" (which doesn't seem to do anything or refer to anything here)? Why don't we just do oldArray.map(val)?
Coira Ellison
@Coira
Nov 10 2015 00:43
what's map going to do with val?
you haven't told it what to do
Nicole F.
@gitasong
Nov 10 2015 00:44
Well, that comes in the next line, return val * 4.
Val is just the name for the argument of the .map function (i.e. the individual elements of oldArray).
Coira Ellison
@Coira
Nov 10 2015 00:45
have you looked at the mdn page for map btw? it might help
Nicole F.
@gitasong
Nov 10 2015 00:45
The keyword "function" doesn't seem to be doing anything here. I think that's my confusion. Everything else makes sense.
No. What's mdn?
may or may not be useful depending on how far you are, but always useful to know
Nicole F.
@gitasong
Nov 10 2015 00:46
Ohhhh--So it's built into the syntax of the map function. It's the callback.
How utterly annoying. A new syntax for every type of function. :p
Coira Ellison
@Coira
Nov 10 2015 00:46
wait, your first line is correct, but i'm not sure about your second
Nicole F.
@gitasong
Nov 10 2015 00:47
Sorry, but JavaScript seems like a bad fantasy writer. It just creates a new gimmick for every problem it can't solve. :p
My second line--you mean about the callback?
Coira Ellison
@Coira
Nov 10 2015 00:48
oh, that's just the start of it, and i love js :p
Nicole F.
@gitasong
Nov 10 2015 00:48
LOL. I'm already beginning to hate it. :p
Coira Ellison
@Coira
Nov 10 2015 00:48
yeah, the callback. lots and lots of functions will need a callback, and they're all written using function(val...)
Nicole F.
@gitasong
Nov 10 2015 00:49
But I really enjoy coding (the little I can do so far), and I like solving problems, so I'm going to stick with it for a while...
Coira Ellison
@Coira
Nov 10 2015 00:49
so now you've learnt it, you'll know for when you next need it again
Nicole F.
@gitasong
Nov 10 2015 00:49
So "function" here is just referring to any generic function?? It's not even being used as a keyword?
(next time) I guess so!
Coira Ellison
@Coira
Nov 10 2015 00:50
it is a keyword, it's part of the syntax, like brackets or var
Nicole F.
@gitasong
Nov 10 2015 00:50
But it's not actually in the syntax in the Wiki entry.
Also, the callback function is supposed to take [ ], not ( ).
Coira Ellison
@Coira
Nov 10 2015 00:51
hm i don't know what that is, the wiki entry on syntax
the [] means that the next bit is optional
Daniel Steffano
@Ubernaga
Nov 10 2015 00:52
So I'm pretty lost.
Nicole F.
@gitasong
Nov 10 2015 00:52
Oh. Okay. Hmm.
Daniel Steffano
@Ubernaga
Nov 10 2015 00:52

  this.speed = 100;

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

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

};
See if you can keep myBike.speed and myBike.addUnit private, while making myBike.getSpeed publicly accessible.
What do I even do here?
Nicole F.
@gitasong
Nov 10 2015 00:52
Oh--that's the one I just got stuck on yesterday, @Ubernaga .
It's sneaky, and they don't explain it well.
Daniel Steffano
@Ubernaga
Nov 10 2015 00:53
@gitasong Do you think you can give me a hint? i've tried fudging things around left and right and it doesn't make any sense to me lol
Coira Ellison
@Coira
Nov 10 2015 00:53
@gitasong maybe it's missed off the wiki, or maybe it's not a keyword but some other jargon-y thing
Nicole F.
@gitasong
Nov 10 2015 00:53
Yep. So which keyword do you need to make things public?
Synthia Beauvais
@sbeauvais34
Nov 10 2015 00:53
@Coira Found it lol. Needed 3 end tags on line 20, 21 and 22. http://goo.gl/4pKQLJ I shortend the link :-)
Nicole F.
@gitasong
Nov 10 2015 00:54
Okay. I'm still not really getting the function of "function" here, but I get the rest, @Coira . Thanks for all your help!
CamperBot
@camperbot
Nov 10 2015 00:54
gitasong sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 298 | @coira | http://www.freecodecamp.com/coira
Synthia Beauvais
@sbeauvais34
Nov 10 2015 00:54
Not sure where that picture came from :-/
Daniel Steffano
@Ubernaga
Nov 10 2015 00:54
@gitasong I don't know :(
Nicole F.
@gitasong
Nov 10 2015 00:55
Look back in the instructions.
Coira Ellison
@Coira
Nov 10 2015 00:55
@sbeauvais34 great! :)
@gitasong np. i suppose it's one of those things you'll do enough times that it becomes automatic
Daniel Steffano
@Ubernaga
Nov 10 2015 00:56
@gitasong "This"
Nicole F.
@gitasong
Nov 10 2015 00:56
Yes!
So which statements are you making public and which private?
Synthia Beauvais
@sbeauvais34
Nov 10 2015 00:57
Yes indeed @Coira :-)
Daniel Steffano
@Ubernaga
Nov 10 2015 00:57
myBike.speed and myBike.addUnit are supposed to be private; myBike.getSpeed - public
Nicole F.
@gitasong
Nov 10 2015 00:58
Yes. Is the first one, getSpeed, currently public or private?
Sorry--the first one is simply speed. Is it currently public or private?
Daniel Steffano
@Ubernaga
Nov 10 2015 00:58
speed looks like it's public.
Nicole F.
@gitasong
Nov 10 2015 00:59
Right. And it should be what?
Daniel Steffano
@Ubernaga
Nov 10 2015 00:59
private
Nicole F.
@gitasong
Nov 10 2015 00:59
Okay. So how would you make it private?
Daniel Steffano
@Ubernaga
Nov 10 2015 00:59
adding myBike property?
Nicole F.
@gitasong
Nov 10 2015 00:59
No. Look again at the instructions. You may have to go back a waypoint or two.
Or just simply: What makes it public, again?
EricHassan
@EricHassan
Nov 10 2015 01:00
I think I found a bug. Can someone help me with my code? It is too simple to be me making a mistake or I am just an idiot
<script>
$(document).ready(function($("button").addClass("animated bounce")) {

});
</script>
It says"missing ) after formal parameters"
Daniel Steffano
@Ubernaga
Nov 10 2015 01:01
Add another )
Nvm that doesn't seem right
EricHassan
@EricHassan
Nov 10 2015 01:01
I tried and it doesnt work
Same error message
They are all there
I'm hardly a pro and don't want to say there is something wrong with the site when I am still learning, but I think there is in this case.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:02
@gitasong sigh i'm getting killed
Nicole F.
@gitasong
Nov 10 2015 01:02
No. You just said it above, @Ubernaga . What makes a property or function public?
(It's much simpler than you're thinking. You just said it above. :) )
Daniel Steffano
@Ubernaga
Nov 10 2015 01:03
@gitasong this
Pranay Kothapalli
@kotAPI
Nov 10 2015 01:03
Anyone on their way to their front end certificate yet? :D
Nicole F.
@gitasong
Nov 10 2015 01:03
(I got tripped up by the simplicity also, and by the confusing difference in the syntax of the statements.)
Yes. .this. If the statement is not public, it's private. So how would you make this.speed private?
Or rather, this.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:04
Take away "this."?
Nicole F.
@gitasong
Nov 10 2015 01:04
(No preceding dot. :) )
Yes!!
See--ridiculously simple. The same logic, in reverse, applies to the third statement, the one with getSpeed. (The second is a little trickier.)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:05
How does that make myBike.speed undifined :(
Cause that's one of the tasks
and It makes it correct.. but I don't see how
Nicole F.
@gitasong
Nov 10 2015 01:05
Forget about that. I don't know why that's in there.
It's wrong. :p
Daniel Steffano
@Ubernaga
Nov 10 2015 01:06
Hmm.. Lol
Okay. So it says The method getSpeed of myBike should be accessible outside the object.
Nicole F.
@gitasong
Nov 10 2015 01:06
myBike.speed stays set at 100.
Right--which means public (I think).
Daniel Steffano
@Ubernaga
Nov 10 2015 01:06
Which would make sense
Nicole F.
@gitasong
Nov 10 2015 01:06
Right.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:06
So I have to add this?
Nicole F.
@gitasong
Nov 10 2015 01:06
Yes!!
Daniel Steffano
@Ubernaga
Nov 10 2015 01:06
I just added this. to getspeed
and it completed it
wow
what
Nicole F.
@gitasong
Nov 10 2015 01:06
Yep.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:06
This makes no sense
(this waypoint, anyway)..
Nicole F.
@gitasong
Nov 10 2015 01:07
Much simpler than you thought.
Yep.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:07
I just hate how they throw in all of this extra code but don't really explain any of it
Nicole F.
@gitasong
Nov 10 2015 01:07
It's very poorly written, and not explained well. I submitted a rather scathing bug report.
Yep--my complaints exactly.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:07
There's a bunch that do make sense
Nicole F.
@gitasong
Nov 10 2015 01:07
Yeah. But this section largely doesn't.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:08
yep..
sigh
lol
Nicole F.
@gitasong
Nov 10 2015 01:08
It's supposedly getting rewritten, but since this site is pretty much staffed by all volunteers, it could take some time.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:08
Thank you @gitasong :)
CamperBot
@camperbot
Nov 10 2015 01:08
ubernaga sends brownie points to @gitasong :sparkles: :thumbsup: :sparkles:
:star: 190 | @gitasong | http://www.freecodecamp.com/gitasong
Daniel Steffano
@Ubernaga
Nov 10 2015 01:08
Wow you aren't kidding
Nicole F.
@gitasong
Nov 10 2015 01:08
You're welcome! :)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:08
I'm kinda right behind you - 175
Nicole F.
@gitasong
Nov 10 2015 01:08
Yep.
LOL.
Yeah--I just ranted about it yesterday, and practically got into a fistfight with someone on the forum. You can scroll back, if you wish. ;)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:10
Hehh
Nicole F.
@gitasong
Nov 10 2015 01:10
I'm now ranting about Waypoint #189, I believe. ;)
No--#190. :p
@Coira has been kind enough to walk me through the logic and the syntax, but I'm realizing I still don't get it.
EricHassan
@EricHassan
Nov 10 2015 01:11
@gitasong Hey, I"m a Portlander as well. How long have you been codecamping?
Daniel Steffano
@Ubernaga
Nov 10 2015 01:12
Haha wow I see it :0
Nicole F.
@gitasong
Nov 10 2015 01:12
@Coira , it's telling me to add three to each value in the array, and I've already done that!
@EricHassan : Supposedly since July or August, but I really wasn't able to do much then. I've pretty much been working over this past weekend; that's it. :)
EricHassan
@EricHassan
Nov 10 2015 01:13
I'm not employed right now so its easier for me. I got to 111 in the past few days.
Nicole F.
@gitasong
Nov 10 2015 01:13
I've been coding on and off (much more off than on) for about a year and a half. (Much more off than on. :p )
Yeah; same here.
EricHassan
@EricHassan
Nov 10 2015 01:14
Haha, I got into it a year ago and quit
Nicole F.
@gitasong
Nov 10 2015 01:14
Yeah; it's been very start-and-stop for me.
EricHassan
@EricHassan
Nov 10 2015 01:14
I'm doing 2-2.5 hours a day for first thirty days
Then I'm going to 5 hours a day
Nicole F.
@gitasong
Nov 10 2015 01:14
Mostly stop, occasional starts.
Great!
EricHassan
@EricHassan
Nov 10 2015 01:14
Only one way to eat an elephant
Nicole F.
@gitasong
Nov 10 2015 01:14
I'm waiting for some money, then I might do a real bootcamp, like Epicodus. :)
Bo Sanders
@Biletnikoff
Nov 10 2015 01:14
same
Nicole F.
@gitasong
Nov 10 2015 01:14
LOL--yes!
EricHassan
@EricHassan
Nov 10 2015 01:15
I've heard good things about hackreactor
Bo Sanders
@Biletnikoff
Nov 10 2015 01:15
im in the middle of the interview process for hackreactor
Nicole F.
@gitasong
Nov 10 2015 01:15
Oh? I haven't heard of that one. Is that in PDX?
Bo Sanders
@Biletnikoff
Nov 10 2015 01:15
San fran
Nicole F.
@gitasong
Nov 10 2015 01:15
Cool, @Biletnikoff .
Bo Sanders
@Biletnikoff
Nov 10 2015 01:15
I would seriously look into it
Nicole F.
@gitasong
Nov 10 2015 01:15
Ah! I can't travel, so I'm limited to Portland or online.
What's so good about it?
EricHassan
@EricHassan
Nov 10 2015 01:16
hackreactor has a mobile bootcamp
Daniel Steffano
@Ubernaga
Nov 10 2015 01:16
I'm on 176 after about a week. I stopped for the whole weekend though.
Nicole F.
@gitasong
Nov 10 2015 01:16
Oh??
I'll take a look then.
Bo Sanders
@Biletnikoff
Nov 10 2015 01:16
It has set the standard for bootcamps
EricHassan
@EricHassan
Nov 10 2015 01:16
If you are dedicated and do it every day then you can
Bo Sanders
@Biletnikoff
Nov 10 2015 01:16
nuf said
Nicole F.
@gitasong
Nov 10 2015 01:16
@Ubernaga :)
Yes; definitely.
Bo Sanders
@Biletnikoff
Nov 10 2015 01:16
Javascript based as well
Nicole F.
@gitasong
Nov 10 2015 01:18
Well, ultimately I want to be in iOS programming, so I don't know if I want to be in JS for the long haul.
And I have my eye on a little-known high-level rapid application development platform that's extremely user-friendly and beginner-friendly, called LiveCode, which I want to use to code an education app that I've had in mind for about a decade.
Del
@RoboDel
Nov 10 2015 01:19
??? What am I missing here???
'''</div>
<div row>
<div class="col-xs-7">
<input type="text" class="form-control" placeholder="cat photo URL" required>
</div>
</div>
<div row>
<div class="col-sx-5">
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button>
</div>
</div>'''
Nest your form submission button in a div with the class col-xs-5
Nest your form submission button and text input in a div with class row.
CamperBot
@camperbot
Nov 10 2015 01:19
:bulb: to format code use backticks! ``` more info
Bo Sanders
@Biletnikoff
Nov 10 2015 01:19
you can create apps with JS
facebook is a JS framework
Nicole F.
@gitasong
Nov 10 2015 01:19
Yeah, but it's a pain in the butt. :)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:19
@RoboDel <div class="col-sx-5">
M Used
@mildused
Nov 10 2015 01:19
you mean react is a js framework
Daniel Steffano
@Ubernaga
Nov 10 2015 01:20
@RoboDel col-XS-5
Nicole F.
@gitasong
Nov 10 2015 01:20
I want to learn native iOS programming, as well as LiveCode. :)
Bo Sanders
@Biletnikoff
Nov 10 2015 01:20
@mildused yes lol
Del
@RoboDel
Nov 10 2015 01:20
I thought I used backticks
@Ubernaga thanks
CamperBot
@camperbot
Nov 10 2015 01:20
robodel sends brownie points to @ubernaga :sparkles: :thumbsup: :sparkles:
:star: 177 | @ubernaga | http://www.freecodecamp.com/ubernaga
Bo Sanders
@Biletnikoff
Nov 10 2015 01:20
better yet, facebook is based off a JS framework
Nicole F.
@gitasong
Nov 10 2015 01:20
And maybe do some front-end developer work, which is where the JS would come in. But definitely not exclusively.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:20
@RoboDel NP! back ticks are `, not '
Left of the "1" key
``
Nicole F.
@gitasong
Nov 10 2015 01:21
Yeah, but @Biletnikoff , I just don't like JS!
Bo Sanders
@Biletnikoff
Nov 10 2015 01:21
thats a shame!!
Nicole F.
@gitasong
Nov 10 2015 01:21
Not elegant like Objective-C or Swift (or, better yet, LiveCode)!
M Used
@mildused
Nov 10 2015 01:21
Then why are you here?
Del
@RoboDel
Nov 10 2015 01:21
@Ubernaga thanks again!
CamperBot
@camperbot
Nov 10 2015 01:21
robodel sends brownie points to @ubernaga :sparkles: :thumbsup: :sparkles:
:warning: robodel already gave ubernaga points
Bo Sanders
@Biletnikoff
Nov 10 2015 01:21
@mildused right lol
Nicole F.
@gitasong
Nov 10 2015 01:21
Ah, well. To each their own. That's why there are so many programming languages, right? :)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:21
@RoboDel You're welcome :smile:
Nicole F.
@gitasong
Nov 10 2015 01:22
I'm here to learn programming, not because I'm in love with JS. Also, it's FREE.
ronaldrdguez
@ronaldrdguez
Nov 10 2015 01:22
@gitasong Sadly there's nothing else in the browser.
M Used
@mildused
Nov 10 2015 01:22
What do you mean elegant?
Del
@RoboDel
Nov 10 2015 01:22
@Ubernaga it's still telling me my div row is wrong
Nicole F.
@gitasong
Nov 10 2015 01:23
Sure there is. There's Python/Django, Ruby/Rails, etc. etc. You can even write in LiveCode for the web.
Bo Sanders
@Biletnikoff
Nov 10 2015 01:23
probably less syntax for him means = more elegant
Nicole F.
@gitasong
Nov 10 2015 01:23
Her. I'm a she. :)
Bo Sanders
@Biletnikoff
Nov 10 2015 01:23
HER
Nicole F.
@gitasong
Nov 10 2015 01:23
Yes; that's part of it.
M Used
@mildused
Nov 10 2015 01:23
Well if you had the decency to look at her name, I'm sure that Nicole is a girl's name.
Always look at names ;)
Nicole F.
@gitasong
Nov 10 2015 01:24
:) @mildused This is still a very male-dominated field!
Bo Sanders
@Biletnikoff
Nov 10 2015 01:24
life goes on
Daniel Steffano
@Ubernaga
Nov 10 2015 01:24
@RoboDel You need to make sure the Div row lasts the entire div section
Bo Sanders
@Biletnikoff
Nov 10 2015 01:24
i mean as far as elegance isn't coffeescript the solution for elegance?
Nicole F.
@gitasong
Nov 10 2015 01:25
I have no idea. I don't know anything about coffeescript.
Daniel Steffano
@Ubernaga
Nov 10 2015 01:25
@RoboDel Make sure your div row is the entire DIV. It's being cut early right after your input type
M Used
@mildused
Nov 10 2015 01:25
@gitasong I'm a 16 year old male. Even at school, talking about this is what one can call a "turn-off"
Nicole F.
@gitasong
Nov 10 2015 01:25
But seriously--you should let go of the idea that there's one best way to do things, and you have it. :)
Del
@RoboDel
Nov 10 2015 01:25
@Ubernaga got it, there was no class=
Nicole F.
@gitasong
Nov 10 2015 01:25
There are lots of good ways to do things. To each their own.
M Used
@mildused
Nov 10 2015 01:25
It's just preference. Do what you prefer, and master it.
Nicole F.
@gitasong
Nov 10 2015 01:26
Yep; I hear you, @mildused . :)
Daniel Steffano
@Ubernaga
Nov 10 2015 01:26
@RoboDel nice
Nicole F.
@gitasong
Nov 10 2015 01:26
Exactly. Or do what you must, and master it as much as you need to. :)
Brian Bier
@brianbier
Nov 10 2015 01:26
Can someone help me with this problem? I was trying to play around with some jquery on my local computer and I can't seem to get my jquery to work at all. However on Waypoint Target Elements by ID Using jQuery in FreeCodeCamp it works fine. Below are a few snippets for reference.
<head>
  <link rel="stylesheet" type="text/css" href="style.css">
  <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script type="text/javascript" src="script.js"></script>
  <title>Dog Lover</title>
</head>

      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>


#This is what I have on my script.js file
<script>
  $(document).ready(function() {
    $("#target2").addClass("animated bounce");
    $(".well").addClass("animated shake");
    $("#target3").addClass("animated fadeOut");

  });
</script>
M Used
@mildused
Nov 10 2015 01:26
Whoa. How about some warning next time
Bo Sanders
@Biletnikoff
Nov 10 2015 01:26
lol
Nicole F.
@gitasong
Nov 10 2015 01:26
JS is somewhat of a necessity if you want to do web work, which is why I'm learning it. But it's not where I ultimately want to be.
M Used
@mildused
Nov 10 2015 01:28
@gitasong I'd like to discuss something. I sent you a PM
Daniel Robinson
@danielrob
Nov 10 2015 01:29

Question about event synchronicity - I have the following code:

(function() {
  'use strict';
  document.getElementById(7).addEventListener("click", function(){
    console.log('clicked 7');
  })
  console.log('before 7');
  document.getElementById(7).click();
  console.log('after 7')
}());

I would have expected before 7 -> after 7 -> clicked 7, because the code should run synchronously through, and then respond to the click event once the code has been run? But instead I get before 7 -> clicked 7 -> after 7.... any thoughts / ideas?

Nicole F.
@gitasong
Nov 10 2015 01:30
Oh; okay, @mildused . How do I access my PMs?
M Used
@mildused
Nov 10 2015 01:30
Check the left
Nicole F.
@gitasong
Nov 10 2015 01:30
The left of--?
M Used
@mildused
Nov 10 2015 01:31
The left of this page haha
Nicole F.
@gitasong
Nov 10 2015 01:32
Oh, really? I don't see anything over on the left. :/ Do I have to pop it out?
M Used
@mildused
Nov 10 2015 01:32
Hmm
Watch for a message now
Nicole F.
@gitasong
Nov 10 2015 01:32
Ah--got it! I had to pop out the page. I was using it as chat only. :)
Daniel Robinson
@danielrob
Nov 10 2015 01:34
@mildused - yes this confirms my expectations. Yet I am getting asynchronous code executing syncrhonously?
Nicole F.
@gitasong
Nov 10 2015 01:34
Cripes, @Biletnikoff --at $17,000+ tuition, I could never afford Hackreactor.
Dee Martin
@dxmartin8
Nov 10 2015 01:34
@brianbier I think it is an css issue
Brian Bier
@brianbier
Nov 10 2015 01:35
Yes. I just got it. I was missing the animate.css
@dxmartin8
M Used
@mildused
Nov 10 2015 01:35
@danielrob Where are you running this?
Daniel Robinson
@danielrob
Nov 10 2015 01:39
@mildused Firefox 41 console.
Starkiller12
@Starkiller12
Nov 10 2015 01:43
hi
Faisal Dirie A
@FaisalDirieA
Nov 10 2015 01:44
Hello form a newbie
Starkiller12
@Starkiller12
Nov 10 2015 01:44
can anybody help me with a bonfire?
CamperBot
@camperbot
Nov 10 2015 01:44
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Del
@RoboDel
Nov 10 2015 01:53
I've put the well class everywhich way but loose?????????????????
<div class="container-fluid"> <h3 class="text-primary text-center">jQuery Playground</h3> <div class="row"> <div class="well"> <div class="col-xs-6"> </div> </div> <div class="well"> <div class="col-xs-6"> </div> </div> </div> </div>
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
Nest both of your div elements with the class "col-xs-6" within your div element with the class "row".
Joel M. Swensen
@JoelMSwensen
Nov 10 2015 01:53
Anyone up for a js question?
This is a calculator and it works, I just wanna make it better.
$( document ).ready(function() {

    $("input").click(function(){
    if($(this).attr("value") === "c"){
      x = 0;
    $("#text").html(x);
    } else if($(this).attr("value") === "="){
    answer = eval(x);
    $("#text").html(answer);
    }else{
    x += $(this).attr("value");
    $("#text").html(x);
      };
    });
});
Del
@RoboDel
Nov 10 2015 01:57
Nver Mind ...I got it
Joel M. Swensen
@JoelMSwensen
Nov 10 2015 01:57
I want to make it so that it works like a normal calculator in that when you press a function key the previous numbers are removed from the display. It seemed like this would work, but it didn’t
    if($(this).attr("value") === "*" || "/" || "+" || "-"){
      display = $(this).attr("value");
    $("#text").html(display);
  }
So the entire thing looks like this:
` var x = " "; var y; var answer; var display; $( document ).ready(function() { // if($(this).attr("value") === "*" || "/" || "+" || "-"){ // display = $(this).attr("value"); // $("#text").html(display); // }; $("input").click(function(){ if($(this).attr("value") === "c"){ x = 0; $("#text").html(x); } else if($(this).attr("value") === "="){ answer = eval(x); $("#text").html(answer); }else{ x += $(this).attr("value"); $("#text").html(x); }; }); });
var x = " ";
var y;
var answer;
var display;
$( document ).ready(function() {
  //   if($(this).attr("value") === "*" || "/" || "+" || "-"){
  //     display = $(this).attr("value");
  //   $("#text").html(display);
  // };
    $("input").click(function(){
    if($(this).attr("value") === "c"){
      x = 0;
    $("#text").html(x);
    } else if($(this).attr("value") === "="){
    answer = eval(x);
    $("#text").html(answer);
    }else{
    x += $(this).attr("value");
    $("#text").html(x);
      };
    });
});
Daniel Robinson
@danielrob
Nov 10 2015 02:09
@mildused and others, I've added my question to stack overflow. Initial responses match my confusion. http://stackoverflow.com/questions/33621545/are-eventlistener-click-events-asynchronous-in-javascript
eagle122
@eagle122
Nov 10 2015 02:23

Waypoint: Iterate over Arrays with map i cant figure out wgat im doing wrong

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

// Only change code below this line.

var newArray = oldArray;

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

// Only change code above this line.

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

You should add three to each value in the array. x
You should be making use of the map method. y
You should only modify the array with map. y

Leandro
@LeandroTavares
Nov 10 2015 02:25
@eagle122 Actually, you might use "oldArray" value to complete your function
You do not need create another var (plusThree)
Michael Cheung
@m6cheung
Nov 10 2015 02:29
@frogmorton nice thanks
CamperBot
@camperbot
Nov 10 2015 02:29
m6cheung sends brownie points to @frogmorton :sparkles: :thumbsup: :sparkles:
:star: 312 | @frogmorton | http://www.freecodecamp.com/frogmorton
Joshuah Pierce
@Joshjackpierce
Nov 10 2015 02:30
When I am trying to adjust the width of my image, do I need to create another <style> or can i place the code under my existing <style> i am using for fonts
eagle122
@eagle122
Nov 10 2015 02:31

@LeandroTavares I did that too with same results
var newArray = oldArray;

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

Leandro
@LeandroTavares
Nov 10 2015 02:33
@eagle122 Pay attention at the last code line before the "error" messages
this one: (function() {return newArray;})();
Larry
@runstache
Nov 10 2015 02:34
Only build one style section in a page. You can create multiple style definitions in that one section. Including the <style> element is a way to define your Css classes without using a referenced style sheet
Leandro
@LeandroTavares
Nov 10 2015 02:34
Then, go back and check the last message that you've just sent
See if you can figure out what's wrong
If you want, I can send you my code ;)
Joshuah Pierce
@Joshjackpierce
Nov 10 2015 02:38
Thank you @runstache
CamperBot
@camperbot
Nov 10 2015 02:38
joshjackpierce sends brownie points to @runstache :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for runstache
eagle122
@eagle122
Nov 10 2015 02:39

@LeandroTavares Im not stupid, but I'm just not getting it

I tried this
var newArray = oldArray;

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

and got this

Program Execution Failure

it is prob easy but im just not seeing it
Leandro
@LeandroTavares
Nov 10 2015 02:40
Take it easy @eagle122 I am just trying to help you without give you the ready solution
Craig Morrison
@frogmorton
Nov 10 2015 02:40
@m6cheung yw
Leandro
@LeandroTavares
Nov 10 2015 02:42
Try to place the method map at the oldArray value which it's been passed to the var newArray
At the same line
var newArray = oldArray.map(function(){ ...
eagle122
@eagle122
Nov 10 2015 02:46
@LeandroTavares That wasnt meant towards you. That was meant towards me. I should be able to see this but I just cant see it. My apologies
Leandro
@LeandroTavares
Nov 10 2015 02:47
Don't worry buddy. Did it work? @eagle122
Colson Scott
@OctopusHugz
Nov 10 2015 02:48
Hey guys I joined on Saturday and I just got to the first Zipline of building a Personal Portfolio. I'm new to this and don't have the experience writing code from scratch. Where is the best place to start?
eagle122
@eagle122
Nov 10 2015 02:49
@LeandroTavares Yes!!! Thank you I never thought to add it there.
CamperBot
@camperbot
Nov 10 2015 02:49
eagle122 sends brownie points to @leandrotavares :sparkles: :thumbsup: :sparkles:
:star: 183 | @leandrotavares | http://www.freecodecamp.com/leandrotavares
Leandro
@LeandroTavares
Nov 10 2015 02:49
@eagle122 ;)
CoreyThomas
@CoreyThomas
Nov 10 2015 02:52
Guys i'm having trouble with filter arrays with filter and don't know why.

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

// Only change code below this line.

array = array.filter(function(val) {

return val >= 5;

});

// Only change code above this line.

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

Jon
@jcmockbee
Nov 10 2015 02:53

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

I just canot figure out how to get color to be blue
Leandro
@LeandroTavares
Nov 10 2015 02:54
Hey @CoreyThomas you might "eliminated" the numbers greater than 5 ;)
Craig Morrison
@frogmorton
Nov 10 2015 02:54
@OctopusHugz I suggest either starting with the suggested barebones bootstrap template provided in the zipline or directly to the bootstrap website, where you can see example snippets of the different HTML elements and how bootstrap handles them
Larry
@runstache
Nov 10 2015 02:54
The
Colson Scott
@OctopusHugz
Nov 10 2015 02:54
@CoreyThomas your return val should be < 6
typicaljoe111
@typicaljoe111
Nov 10 2015 02:54
@jcmockbee You add h2{color:blue;} inside style tags. <h2> remains intact.
Jon
@jcmockbee
Nov 10 2015 02:55
thankyou
CoreyThomas
@CoreyThomas
Nov 10 2015 02:55
it didn't work for me
Larry
@runstache
Nov 10 2015 02:56
@jcmockbee check how you have your style section set up. The whole h2 element does not go inside the style section
Craig Morrison
@frogmorton
Nov 10 2015 02:56
@jcmockbee you need to add a class to your div, and then define that classes styles in a separate CSS document
Colson Scott
@OctopusHugz
Nov 10 2015 02:56
@frogmorton thank you sir! It says to write your own code but I used the hint and did take the bootstrap template. I've gone on to code academy because they have a make a website challenge so hopefully I can use an amalgamation of different things
CamperBot
@camperbot
Nov 10 2015 02:56
octopushugz sends brownie points to @frogmorton :sparkles: :thumbsup: :sparkles:
:star: 313 | @frogmorton | http://www.freecodecamp.com/frogmorton
Leandro
@LeandroTavares
Nov 10 2015 02:57
@CoreyThomas Try to invert the operator that you've just sent
Colson Scott
@OctopusHugz
Nov 10 2015 02:57
@CoreyThomas var newArray = oldArray.filter(function(val) {
return val < 6;
});
don't forget to label newArray and oldArray if
h4r1m4u
@h4r1m4u
Nov 10 2015 02:59
@anders462 nice work. it's great you found your own solution without relying on bootstrap!
CoreyThomas
@CoreyThomas
Nov 10 2015 03:00
I changed everything and its still not working!!
Its fixed. Thanks
CamperBot
@camperbot
Nov 10 2015 03:01
if you want to thank someone, put an @ before their name!
Leandro
@LeandroTavares
Nov 10 2015 03:01
@CoreyThomas array.filter(function(val) {
return val <= 5;
});
CoreyThomas
@CoreyThomas
Nov 10 2015 03:02
Thanks man it was 5
CamperBot
@camperbot
Nov 10 2015 03:02
if you want to thank someone, put an @ before their name!
Leandro
@LeandroTavares
Nov 10 2015 03:03
;)
Craig Morrison
@frogmorton
Nov 10 2015 03:03
Well @OctopusHugz , unless you're super familiar with all the bootstrap classes and how it "does things", you practically have to use a template. The more DIY intensive option would be write a absolute barebones HTML boilerplate page to start with (like only HTML, head, body), and then add elements one at a time, via the bootstrap documentation site, to build a custom layout. After you have the basic layout, you could then focus on modifying the styling to your liking. :-)
Colson Scott
@OctopusHugz
Nov 10 2015 03:06
@CoreyThomas yes I'm sorry it would've been 5 if you kept it as val <==5. I just used val < 6 and achieved the same thing
CoreyThomas
@CoreyThomas
Nov 10 2015 03:07
Oh ok thanks @OctopusHugz
CamperBot
@camperbot
Nov 10 2015 03:07
coreythomas sends brownie points to @octopushugz :sparkles: :thumbsup: :sparkles:
:star: 201 | @octopushugz | http://www.freecodecamp.com/octopushugz
CoreyThomas
@CoreyThomas
Nov 10 2015 03:07
and @LeandroTavares
Colson Scott
@OctopusHugz
Nov 10 2015 03:07
@frogmorton I'll definitely have to try that after I get this zipline finished to help reinforce my understanding. Thanks for your help!
CamperBot
@camperbot
Nov 10 2015 03:07
octopushugz sends brownie points to @frogmorton :sparkles: :thumbsup: :sparkles:
:warning: octopushugz already gave frogmorton points
Colson Scott
@OctopusHugz
Nov 10 2015 03:08
@CoreyThomas sorry I'm still new to this but I figured I would try to help if I could! You're welcome
Anders Bengtsson
@anders462
Nov 10 2015 03:09
@h4r1m4u thanks, yeah it came out pretty good :-)
CamperBot
@camperbot
Nov 10 2015 03:09
anders462 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 603 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Leandro
@LeandroTavares
Nov 10 2015 03:13
@CoreyThomas You're welcome
Charles Haralson
@cdonell22
Nov 10 2015 03:14
How do I style an element with a CSS class...can anyone help me?
Craig Morrison
@frogmorton
Nov 10 2015 03:16
@cdonell22 Yes
typicaljoe111
@typicaljoe111
Nov 10 2015 03:17
@cdonell22 Apply class to the element like class="green" and use this class in your style tags or CSS like .green { background: green; }
Craig Morrison
@frogmorton
Nov 10 2015 03:18
For ex. <div class="class name"></div>
Charles Haralson
@cdonell22
Nov 10 2015 03:18
how do I apply to my h2 element?
typicaljoe111
@typicaljoe111
Nov 10 2015 03:19
@cdonell22 This is how you do it <h2 class="class-name">H2 Title</h2>. Now you can apply style to it using same class name like this .class-name { color: red; }
Craig Morrison
@frogmorton
Nov 10 2015 03:20
Same way <h2 class="some_class">h2 text here</h2>
Isaiah
@Buckhalton
Nov 10 2015 03:20
@cdonell22 <h2 class="class-name">h2 text</h2>
Charles Haralson
@cdonell22
Nov 10 2015 03:21
Got it....thank u guys!!
CamperBot
@camperbot
Nov 10 2015 03:21
if you want to thank someone, put an @ before their name!
Craig Morrison
@frogmorton
Nov 10 2015 03:25
@cdonell22 the main thing to remember for classes is putting the period (.) before the class name only in your style sheet, and not in the HTML. ID's work roughly the same way, but you put a hash (#) in front of the ID name in the style sheet.
Charles Haralson
@cdonell22
Nov 10 2015 03:28
So I would use a hash within my style tags?
Oh I see what you mean now
Craig Morrison
@frogmorton
Nov 10 2015 03:29
Not for classes, only for ids
Although you can have style tags right in the HTML, it's a better practice to define all the styles in a separate .css file, which you would link to
Charles Haralson
@cdonell22
Nov 10 2015 03:33
Thank you @frogmorton
CamperBot
@camperbot
Nov 10 2015 03:33
cdonell22 sends brownie points to @frogmorton :sparkles: :thumbsup: :sparkles:
:star: 314 | @frogmorton | http://www.freecodecamp.com/frogmorton
Craig Morrison
@frogmorton
Nov 10 2015 03:34
You're welcome
Travis Anderson
@TCAMPLS
Nov 10 2015 03:44
How am I supposed to apply two classes to the same element?
Every time it just take the first class and ignores the second one.
CoreyThomas
@CoreyThomas
Nov 10 2015 03:46
class =" first-class" "another class here" />
oops don't look at that lol
Travis Anderson
@TCAMPLS
Nov 10 2015 03:47
Oh that actually helped.
grade7mind
@grade7mind
Nov 10 2015 03:47
how i apply a link in <h2>
Travis Anderson
@TCAMPLS
Nov 10 2015 03:48
I kept trying to put a comma in between class names or declaring them seperately.
Alexander Køpke
@alexanderkopke
Nov 10 2015 03:48
class="firstclass secondclass"
CoreyThomas
@CoreyThomas
Nov 10 2015 03:49
The right way is <p class = "red-text" "blue-text"> You get the idea right?
Travis Anderson
@TCAMPLS
Nov 10 2015 03:49
Yep I got it working. Thanks guys
CamperBot
@camperbot
Nov 10 2015 03:49
if you want to thank someone, put an @ before their name!
Travis Anderson
@TCAMPLS
Nov 10 2015 03:50
Thank you @CoreyThomas
CamperBot
@camperbot
Nov 10 2015 03:50
tcampls sends brownie points to @coreythomas :sparkles: :thumbsup: :sparkles:
:star: 184 | @coreythomas | http://www.freecodecamp.com/coreythomas
CoreyThomas
@CoreyThomas
Nov 10 2015 03:50
Glad I can finally help someone!
Craig Morrison
@frogmorton
Nov 10 2015 03:53
@grade7mind you'll have to surround the text you wish to be a link with <a></a> tags
Don't forget the href="your-target path or URL" is needed in the opening a tag
grade7mind
@grade7mind
Nov 10 2015 04:00
thank you @frogmorton
CamperBot
@camperbot
Nov 10 2015 04:00
grade7mind sends brownie points to @frogmorton :sparkles: :thumbsup: :sparkles:
:star: 315 | @frogmorton | http://www.freecodecamp.com/frogmorton
Craig Morrison
@frogmorton
Nov 10 2015 04:01
yw
Phuc Le
@PhucLe1992
Nov 10 2015 04:02
guys I'm stuck at .reverse

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

array.reverse(function(a,b) {return a - b;});

as my code they still show X "you should use reverse method"
can any one help?
Adam Parker
@amichaelparker
Nov 10 2015 04:08
I can't think of how to help without just stating the answer :P
CoreyThomas
@CoreyThomas
Nov 10 2015 04:08
Take the Callout our of it
or look it up on MDN
Phuc Le
@PhucLe1992
Nov 10 2015 04:10
your answer compare with my code and that is it
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:12
does the reverse() method takes parameters?
Craig Morrison
@frogmorton
Nov 10 2015 04:12
Take callout out??? You mean take callback out, @CoreyThomas ?
CoreyThomas
@CoreyThomas
Nov 10 2015 04:13
Oops ha thats right. Fat finger syndrome
@frogmorton
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:14
seems like you call the method on the array for it to reverse it. Does it need parameters?
grade7mind
@grade7mind
Nov 10 2015 04:15
sir how to degrades a font
Craig Morrison
@frogmorton
Nov 10 2015 04:17
Np, @CoreyThomas... I've done far worse ;)
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:17
{font-family: first font, default-font;}
Craig Morrison
@frogmorton
Nov 10 2015 04:18
Degrade a font?
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:19
degrade a font.. if the computer doesn't have the font, you can specify a default font.. or default fonts
Craig Morrison
@frogmorton
Nov 10 2015 04:21
Ok, just wasn't sure f
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:22
np.. to be honest I had to look it up to be sure xD
Craig Morrison
@frogmorton
Nov 10 2015 04:22
... What it was called
grade7mind
@grade7mind
Nov 10 2015 04:23
thank you sir @alexanderkopke
CamperBot
@camperbot
Nov 10 2015 04:23
grade7mind sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 116 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 10 2015 04:23
no problem :)
Pranav Doshi
@pranavdoshi
Nov 10 2015 04:30
guys need ur help asap trying to reverse array without using the reverse method and using just push and pop. not getting desired output.

function myarray(array){
var newarray = [];
for(var i=0;i<array.length;i++)
{
var removed = array.pop();
alert(removed);
newarray.push(removed);
alert(newarray);
}
return newarray;
}

alert(myarray([1,2,3,4,5]));

this is the code
getting 5,4,3 only
i tried using alert to understand but my loop stops after 3 and get 5,4,3
Del
@RoboDel
Nov 10 2015 04:31

Help...I've tried to put the button everywherer...?...
Nest three button elements within each of your div elements with class well.
You should have a total of 6 button elements.
Make sure all your button elements have closing tags.
`<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<div class="well">

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



  </div>
</div>

</div>
</div>`

DJ
@qualitymanifest
Nov 10 2015 04:34
@pranavdoshi you're mutating array every time you do array.pop, causing your loop to shorten each time and end early
@pranavdoshi https://repl.it/BY95
Craig Morrison
@frogmorton
Nov 10 2015 04:35
@RoboDel Do you know what they mean by the term "nesting"?
Del
@RoboDel
Nov 10 2015 04:40
@frogmorton <div class="well btn"> ?
I also tried class =well class=btn ?
@frogmorton and then I did 3 different <div class="btn"> under the well div
@frogmorton to answer your question....No I'm confused
Craig Morrison
@frogmorton
Nov 10 2015 04:47
Nope
Well is a div class
Here is a simple nesting ex....
h4r1m4u
@h4r1m4u
Nov 10 2015 04:49
@RoboDel 'nest' means to put one element inside another, for example:
<div>
 <p>This is a nested paragraph</p>
</div>
@frogmorton oops, sorry, didn't mean to hijack the conversation. thought you might be afk
Craig Morrison
@frogmorton
Nov 10 2015 04:49
Haha @h4r1m4u beat me to the punch
As I told you, typing on a mobile sux
CoreyThomas
@CoreyThomas
Nov 10 2015 04:51
bonfire script
CamperBot
@camperbot
Nov 10 2015 04:51
function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  return arr;
}

bouncer([7, 'ate', '', false, 9]);
h4r1m4u
@h4r1m4u
Nov 10 2015 04:51
oh yeah, i forgot you're on mobile
Craig Morrison
@frogmorton
Nov 10 2015 04:52
Carry on, I don't get my own web connected PC at work
Pranav Doshi
@pranavdoshi
Nov 10 2015 04:52
@qualitymanifest hey i didnt get u
h4r1m4u
@h4r1m4u
Nov 10 2015 04:53
@frogmorton what cheapoes those japanese :)
Del
@RoboDel
Nov 10 2015 04:53
@h41m4u thanks would I still need to put div tags on the class=btn ?
CamperBot
@camperbot
Nov 10 2015 04:53
robodel sends brownie points to @h41m4u :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for h41m4u
DJ
@qualitymanifest
Nov 10 2015 04:53
@pranavdoshi check out the repl.it link i sent you and see what is happening to array
Craig Morrison
@frogmorton
Nov 10 2015 04:53
Well, all the Japanese teachers do, not the western teachers :-(
Pranav Doshi
@pranavdoshi
Nov 10 2015 04:54
@qualitymanifest the array is reducing
from 5 to zero element
h4r1m4u
@h4r1m4u
Nov 10 2015 04:54
@RoboDel which waypoint is it? are they asking you to nest <button> elements or <div>s with class 'btn'?
Pranav Doshi
@pranavdoshi
Nov 10 2015 04:54
@qualitymanifest so what should i use if i use shift and unshift same prob will occur right
Craig Morrison
@frogmorton
Nov 10 2015 04:55
Why don't you use the actual <button>button text here</button>? @RoboDel
DJ
@qualitymanifest
Nov 10 2015 04:55
@pranavdoshi yep.. and since your loop is set to run only while i < array.length, and you're shorting array with .pop, that's why your loop ends early
@pranavdoshi try .push
Del
@RoboDel
Nov 10 2015 04:55
Add elements within your bootsrtap wells
DJ
@qualitymanifest
Nov 10 2015 04:56
@pranavdoshi and loop backwards
Franco Benner
@FrancoBenner
Nov 10 2015 04:56
Hello
Del
@RoboDel
Nov 10 2015 04:56
@h4r1m4u Nest three button elements within each of your div elements with class well.
h4r1m4u
@h4r1m4u
Nov 10 2015 04:57
@RoboDel yep, so you need to nest a <button> element inside the wells. button element looks like what @frogmorton said above. or a completely barebones one without any text looks like this:
<button></button>
Del
@RoboDel
Nov 10 2015 04:58
@h4r1m4u so no class?
h4r1m4u
@h4r1m4u
Nov 10 2015 04:58
@RoboDel they're not asking you to use any. the assignment is to nest <button> elements in the .well <div>s
Del
@RoboDel
Nov 10 2015 04:59
Ok
h4r1m4u
@h4r1m4u
Nov 10 2015 04:59
putting classes on the buttons comes in the later waypoints, if i remember it correctly
Del
@RoboDel
Nov 10 2015 05:00
I thought I knew what was going on but this threw me for a loop for some reason... appreciate the help
h4r1m4u
@h4r1m4u
Nov 10 2015 05:00
sure thing
Craig Morrison
@frogmorton
Nov 10 2015 05:01
Sometimes the wording on these things can be a bit vague
Del
@RoboDel
Nov 10 2015 05:01
@frogmorton I totally agree
h4r1m4u
@h4r1m4u
Nov 10 2015 05:02
yeah. sometimes i wonder whether it's vague intentionally to encourage folks to ask / google
Pranav Doshi
@pranavdoshi
Nov 10 2015 05:02
@qualitymanifest hey

function myarray(array){
var newarray = [];
for(var i=array.length-1;i>=0;i--)
{
newarray.push(array[i]);
}
return newarray;
}

alert(myarray([1,2,3,4,5]));

is this okay currently getting the desired result
Craig Morrison
@frogmorton
Nov 10 2015 05:03
IMHO, I think it's vague, so that they are not totally handing you the answer, @h4r1m4u @RoboDel
DJ
@qualitymanifest
Nov 10 2015 05:04
@pranavdoshi yup... i rewrote your function to work and that is exactly what i came up with
.... word for word
h4r1m4u
@h4r1m4u
Nov 10 2015 05:05
@pranavdoshi the standard is to start the for loop iteration from the beginning:
for (var i = 0; i < array.length; i++) {
 ...
}
@frogmorton yeah, it's funny. some of the waypoints give you the exact code you need to pass and all you need to do is to paste it from the sidebar into the codepane. while other waypoints make people regularly go 'wut?'
DJ
@qualitymanifest
Nov 10 2015 05:06
@h4r1m4u i guess then you could do something like newArray.push(array[array.length-i]); ?
Craig Morrison
@frogmorton
Nov 10 2015 05:06
That's a pretty clever workaround though, to collect the elements in reverse order
h4r1m4u
@h4r1m4u
Nov 10 2015 05:07
@qualitymanifest or you can simply use .unshift() instead of .push()
DJ
@qualitymanifest
Nov 10 2015 05:07
@h4r1m4u either way i don't really see any thing wrong with doing it the way we wrote...? i guess maybe people would more commonly use a while loop for that though?
@h4r1m4u guess i need to get more familiar with .unshift()
h4r1m4u
@h4r1m4u
Nov 10 2015 05:08
@qualitymanifest there's nothing wrong with it per se. the only issue is code legibility. when scanning through your code people will immediately understand if you implement the for loop in the standard way (like i suggested above). if it's not standard, they'll need to pause and think for a little while to get what that for loop does
DJ
@qualitymanifest
Nov 10 2015 05:09
@h4r1m4u fair enough
h4r1m4u
@h4r1m4u
Nov 10 2015 05:09
@qualitymanifest .unshift() is like .push(). except push adds the new element to the end of the array, while unshift adds it to the beginning
DJ
@qualitymanifest
Nov 10 2015 05:10
@h4r1m4u oh cool, thanks
CamperBot
@camperbot
Nov 10 2015 05:10
qualitymanifest sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 604 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 10 2015 05:10
you're welcome
Pranav Doshi
@pranavdoshi
Nov 10 2015 05:13
@qualitymanifest thanks
@qualitymanifest wanted to ask u few things
u der?
Pranav Doshi
@pranavdoshi
Nov 10 2015 05:18
can anyone tell anyway to store pop elements and again push them in new array??
h4r1m4u
@h4r1m4u
Nov 10 2015 05:21
newArray.push(oldArray.pop()) @pranavdoshi
Clemson
@iSchematic
Nov 10 2015 05:37
You need an a element that links to http://freecatphotoapp.com Hey guys. Here's what I got so far. <p>Here's a <a href="http://freecatphotosapp.com"> link to cat photos</a> for you to follow.</p>
Jerome Ricks
@jeromericks
Nov 10 2015 05:38
delete the s on photo in your url
@iSchematic delete the s on photo in your url
Clemson
@iSchematic
Nov 10 2015 05:39
Oh that darn S Thanks @jeromericks
CamperBot
@camperbot
Nov 10 2015 05:39
ischematic sends brownie points to @jeromericks :sparkles: :thumbsup: :sparkles:
:star: 46 | @jeromericks | http://www.freecodecamp.com/jeromericks
Zachary Ryals
@ZachRyals
Nov 10 2015 05:57
In waypoint use responsive design with bootstrap fluid containers where am I supposed to put the div element?
h4r1m4u
@h4r1m4u
Nov 10 2015 06:00
@ZachRyals 'we should NEST ALL OF OUR HTML in a div element with the class container-fluid.' in other words, the fluid container div should nest everything that's not style
Zachary Ryals
@ZachRyals
Nov 10 2015 06:01
I did that but all of the buttons on the left disappeared and I could not advance.... I guess it's just a bug.
Thanks @h4r1m4u
CamperBot
@camperbot
Nov 10 2015 06:02
zachryals sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 608 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 10 2015 06:05
@ZachRyals would you like to post your code? i could double-check what the issue might be
Kevin H.
@kbolt
Nov 10 2015 06:54
Hello
Dustin Frank
@DustInCompetent
Nov 10 2015 06:54
Hi
Stephen Bolton
@skbolton
Nov 10 2015 06:54
Hi there @wolfboyprime
grade7mind
@grade7mind
Nov 10 2015 06:56
can see an example href attribute set #
Jason
@Jauble
Nov 10 2015 06:58
Hey @h4r1m4u. So I passed the first two tests on that bonfire from yesterday (http://www.freecodecamp.com/challenges/bonfire-where-art-thou), but in the third test, the source includes two objects. I'm not sure if I can refactor my code to work with that. Do you know if there's a way to say something like: if (source is in collection[i]) { ?
Dustin Frank
@DustInCompetent
Nov 10 2015 06:59
@grade7mind <a href="#">Dead link text</a>
Mike Sierra
@yazidanefantasy
Nov 10 2015 07:01
@grade7mind in the freecodecamp editor..if u type a and push the button tab..it will make that href attribute..just like using sublime text
@grade7mind this for fast typing purpose actually
Kevin H.
@kbolt
Nov 10 2015 07:10
this bonfire is kicking my butt
CamperBot
@camperbot
Nov 10 2015 07:10
Sorry, can't find a bonfire called kicking my butt. [ Check the map? ]
grade7mind
@grade7mind
Nov 10 2015 07:12
nice it work than you sr @DustInCompetent
ahh thank you sir @yazidanefantasy
CamperBot
@camperbot
Nov 10 2015 07:13
grade7mind sends brownie points to @yazidanefantasy :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for yazidanefantasy
grade7mind
@grade7mind
Nov 10 2015 07:13
thank you @DustInCompetent
CamperBot
@camperbot
Nov 10 2015 07:13
grade7mind sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
:star: 175 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
Alexander Køpke
@alexanderkopke
Nov 10 2015 07:25
Camperbot cracks me up
Stephen Bolton
@skbolton
Nov 10 2015 07:25
thanks @alexanderkopke
CamperBot
@camperbot
Nov 10 2015 07:25
skbolton sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 117 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Stephen Bolton
@skbolton
Nov 10 2015 07:26
your welcome @alexanderkopke haha
Shannon Mulloy
@smulloy21
Nov 10 2015 07:30
hi - i'm stuck on the second bonfire - i seem to be getting the right answer but it's not going through - anyone else have an issue?
Stephen Bolton
@skbolton
Nov 10 2015 07:31
@smulloy21 the reverse a string challenge?
Shannon Mulloy
@smulloy21
Nov 10 2015 07:31
no, the factorialize one
Stephen Bolton
@skbolton
Nov 10 2015 07:31
I was able to do it. Post your code and I can try to help
Shannon Mulloy
@smulloy21
Nov 10 2015 07:31
function factorialize(num) {
var answer = (num > 2) ? (num * factorialize(num - 1)) : num;
return answer;
}
oh, wait - i scrolled down and found the spec i'm not passing - it doesn't cover for 1
Stephen Bolton
@skbolton
Nov 10 2015 07:32
yep exactly
Shannon Mulloy
@smulloy21
Nov 10 2015 07:32
sorry about that!
Stephen Bolton
@skbolton
Nov 10 2015 07:32
nice ternary operator use!
Ankit Panwar
@coderNoob
Nov 10 2015 07:50
The content in my pen loads after I click different tabs two or three times and not instantly. It worked fine when I did it with a button. Only the profile tab has been done so far.
http://codepen.io/coderNoob/pen/RWKbMN
h4r1m4u
@h4r1m4u
Nov 10 2015 07:53
@Jauble the source always contains only one object, but in the third example it has two properties. you will need to iterate over the source property names and check that both of them are present in the object from the collection array
AYE EVANS
@ignorantusguru
Nov 10 2015 07:54
hello world
CamperBot
@camperbot
Nov 10 2015 07:54

welcome to FreeCodeCamp @ignorantusguru!

h4r1m4u
@h4r1m4u
Nov 10 2015 07:56
@coderNoob that's because you call the allUser() function inside userData() which you call inside the #usersTab click handler. so the api call to twitch is not made until after you start clicking on the tabs. you should make the api call inside the document.ready function, so that you poll twitch for the data as soon as the page loads
AYE EVANS
@ignorantusguru
Nov 10 2015 07:56
Is anyone up here, I need help with getting pass the "Use Responsive Design with Bootstrap Fluid Containers"
h4r1m4u
@h4r1m4u
Nov 10 2015 07:57
@ignorantusguru what's the issue?
AYE EVANS
@ignorantusguru
Nov 10 2015 08:00
nested and it took me pass, But i think it doesnt obey the rule cos I still my imported google font at the top
just wondering if its me or its okay that way plus shouldn't that be replaced with the bootstrap style-sheet code line?
h4r1m4u
@h4r1m4u
Nov 10 2015 08:02
@ignorantusguru the waypoint has nothing to do with the imported google font. it's fine it's there
the bootstrap is loaded 'behind the scenes' as the sidebar says
in other words, it's done for you already
but if you were working on your own project, you'd have to import it first the way the sidebar describes, so that you can use the bootstrap classes
AYE EVANS
@ignorantusguru
Nov 10 2015 08:04
okay thanks for thought so, but i just needed to be sure, again thanks alot @h4r1m4u and for "Bootstrap class": its been noted
CamperBot
@camperbot
Nov 10 2015 08:04
ignorantusguru sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 610 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 10 2015 08:05
my pleasure
AYE EVANS
@ignorantusguru
Nov 10 2015 08:10
I am really new to coding and I am hoping to take this far
h4r1m4u
@h4r1m4u
Nov 10 2015 08:13
keep at it and you will
Stephen Bolton
@skbolton
Nov 10 2015 08:29
@h4r1m4u get ready to get frustrated a lot. But things do get a little easier
h4r1m4u
@h4r1m4u
Nov 10 2015 08:29
@skbolton wut?
Stephen Bolton
@skbolton
Nov 10 2015 08:29
sorry that was meant for @ignorantusguru
h4r1m4u
@h4r1m4u
Nov 10 2015 08:29
ah lol :D
Stephen Bolton
@skbolton
Nov 10 2015 08:29
but I guess its universal advice haha
h4r1m4u
@h4r1m4u
Nov 10 2015 08:29
very true :D
Gleb
@GlebShaucou
Nov 10 2015 08:43
1.JPG
Hi, why it returns me "false"?
I'cant understan
with this "["zyxwvutsrqponmlkjihgfedcba", "qrstu"]" it returns true
but with ["floor", "for"] and ["hello", "Hello"] false
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 08:49
has anyone had issues getting the links to work when trying to build a website in codepen?
Markus Kiili
@Masd925
Nov 10 2015 08:50
@HlebShautsou There is a problem with the logic on your return statements.
h4r1m4u
@h4r1m4u
Nov 10 2015 08:50
@Leeiaisabelle are you adding target="_blank" to your <a> elements?
or i should ask first, what issues are you experiencing?
Markus Kiili
@Masd925
Nov 10 2015 08:51
@HlebShautsou Try returning false if the letter is not found and after the loop return true?
@HlebShautsou You cannot return true after checking one letter.
Gleb
@GlebShaucou
Nov 10 2015 08:56
@Masd925 thanks, will think further
CamperBot
@camperbot
Nov 10 2015 08:56
hlebshautsou sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 275 | @masd925 | http://www.freecodecamp.com/masd925
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:00
@h4r1m4u i will try that... I am trying to add the links to the buttons, but nothing is happening
h4r1m4u
@h4r1m4u
Nov 10 2015 09:01
@Leeiaisabelle you mean when you click them? yeah, that sounds like you're missing the target attribute. just code your links like this and they'll open fine:
<a href="http://www.google.com" target="_blank">Google</a>
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:02
<div class="col-md-3"> <button class="btn btn-block" href="https://github.com/Leeiaisabelle" target="_blank">GitHub</button> </div>
h4r1m4u
@h4r1m4u
Nov 10 2015 09:02
oh, you're putting the link attributes inside a button. that's not right
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:02
where should i put it?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:03
you need to nest the <a> element inside the <button>, like this: <button class="btn btn-block"><a href="https://github.com/Leeiaisabelle" target="_blank">GitHub</a></button>
only <a> element is for links. you can't use the href attribute on any other HTML elements
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:06
this is what happens:
blob
h4r1m4u
@h4r1m4u
Nov 10 2015 09:08
@Leeiaisabelle please see my reply above and adjust your code accordingly
Alexander Køpke
@alexanderkopke
Nov 10 2015 09:10
Yes the 'a' tags are missing.
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:12
ok! I see what I did wrong..I didn't close the button tag! thanks @h4r1m4u !
CamperBot
@camperbot
Nov 10 2015 09:12
leeiaisabelle sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 611 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 10 2015 09:12
you're welcome
Alexander Køpke
@alexanderkopke
Nov 10 2015 09:12
Btw href is also used in the link tag. For example when you link your html document to a stylesheet or linking to bootstrap.
h4r1m4u
@h4r1m4u
Nov 10 2015 09:14
you're right @alexanderkopke i didn't consider those. thanks!
CamperBot
@camperbot
Nov 10 2015 09:14
h4r1m4u sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 118 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Ankit Panwar
@coderNoob
Nov 10 2015 09:29
@h4r1m4u Okay I've put all the code inside the ready function but it's still acting in the same way as before.
h4r1m4u
@h4r1m4u
Nov 10 2015 09:31
@coderNoob can you link the pen again?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:32
you moved them inside the document.ready function, but the userData() function still gets called only within the tab click handler: $("#usersTab").on("click", userData);
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:32
@h4r1m4u hi
u der?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:33
@coderNoob just move out the userData() out of the click handler. you don't need the handler
@pranavdoshi yes
theSyndical
@theSyndical
Nov 10 2015 09:33
@h4r1m4u @Leeiaisabelle you should never nest <a> inside of <button> cause it bugs in firefox and ie , just use a single anchor tag
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:33
haaan when i asked a question regarding how to reverse array using push and pop
Sophanarith Sok
@sok213
Nov 10 2015 09:34
Hi, I am in need of assistance for Waypoint : Build Web Apps with Express.js exercise 8/8
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:34
u and @qualitymanifest answered
Sophanarith Sok
@sok213
Nov 10 2015 09:34
help.png
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:34
regarding reversing array
using push and pop
h4r1m4u
@h4r1m4u
Nov 10 2015 09:35
@Intr0nA you're absolutely right, thanks for the correction. it completely slipped my mind. <buttons> should not contain nested <a> tags, it's incorrect HTML.
CamperBot
@camperbot
Nov 10 2015 09:35
h4r1m4u sends brownie points to @intr0na :sparkles: :thumbsup: :sparkles:
:star: 55 | @intr0na | http://www.freecodecamp.com/intr0na
Sophanarith Sok
@sok213
Nov 10 2015 09:35
It seems like I am returning the correct content, however it includes extra slashes
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:35
@h4r1m4u so the one wic u said now newarray.push(oldarray.pop())
dat didnt work for me
i first trried dat
h4r1m4u
@h4r1m4u
Nov 10 2015 09:36
@pranavdoshi you asked how you can remove an element from an array and push it into a new one which is what newarray.push(oldarray.pop()) does
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:36
does it?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:37
yes
you just need to adjust the array name variables to fit your scenario
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:38
i tried using for loop
but it wouldnt return

function myarray(array){
var newarray = [];
for(var i=array.length-1;i>=0;i--)
{
newarray.push(array[i]);
}
return newarray;
}

alert(myarray([1,2,3,4,5]));

if i do it within this den is it possible?
theSyndical
@theSyndical
Nov 10 2015 09:40
@sok213 try using replace("\", "")
h4r1m4u
@h4r1m4u
Nov 10 2015 09:40
@pranavdoshi i don't understand your question
what are you trying to do?
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:41
@h4r1m4u want to reverse array using push and pop
so can i use newarray.push(oldarray.pop())
within for loop?
will it return reversed array?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:42
the function you posted above already reverses the array
are you looking to change it?
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:42
haaan want to see if it works using push and pop
Ankit Panwar
@coderNoob
Nov 10 2015 09:43
@h4r1m4u If I don't call the function in the click handler, how would I be able to call the userData() then?
theSyndical
@theSyndical
Nov 10 2015 09:43
@pranavdoshi while (array.length) { }
@pranavdoshi its better to use a while loop for push/pop
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:43
@Intr0nA shud i use while loop?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:43
@pranavdoshi yes, it will work. but you will need to adjust the forloop to start from i = 0
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:44
why for loop is the standardized one @Intr0nA
can u help me wid dat
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:44
@Intr0nA so should I do the opposite and nest the button inside of the anchor tag instead?
h4r1m4u
@h4r1m4u
Nov 10 2015 09:45
@coderNoob instead of $("#usersTab").on("click", userData); just do userData();
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:45
for(i=0;i<array.length;i++) is it right @Intr0nA
theSyndical
@theSyndical
Nov 10 2015 09:45
@Leeiaisabelle yes that will solve the cross-browser issue but still its not good HTML you should just use a single anchor tag <a class="btn btn-block">
@pranavdoshi for/while both work but when you write it with while its less code and looks more cleaner
h4r1m4u
@h4r1m4u
Nov 10 2015 09:46
@Leeiaisabelle the bootstrap contains classes to make your <a> look like a button. you can simply remove the <button> element altogether and just use <a> like this:
<a class="btn btn-block" href="http://yoururl.com" target="_blank">Your link text</a>
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:48
but will it work @Intr0nA
theSyndical
@theSyndical
Nov 10 2015 09:49
@pranavdoshi yes
Elliott McNary
@bighitbiker3
Nov 10 2015 09:50
In the pomodoro clock I've bene trying to manipulate the HTML...would it be better to set the values using JS?
theSyndical
@theSyndical
Nov 10 2015 09:50
@bighitbiker3 what values ?
Soumya Rauth
@soumyaRauth
Nov 10 2015 09:51
Bonfire: Sum All Odd Fibonacci Numbers
CamperBot
@camperbot
Nov 10 2015 09:51

:fire:Bonfire: Sum All Odd Fibonacci Numbers :link:

function sumFibs(num) {
  return num;
}

sumFibs(4);

Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.

more info:  bf details | bf links | hint

Ankit Panwar
@coderNoob
Nov 10 2015 09:51
@h4r1m4u Thanks. Now I get it ! I need to call the API and not wait for the user to make a click in order to fetch the data. I need to do the same with any other function that I might create as well.
CamperBot
@camperbot
Nov 10 2015 09:51
codernoob sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 612 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Elliott McNary
@bighitbiker3
Nov 10 2015 09:51
Leeia Isabelle
@Leeiaisabelle
Nov 10 2015 09:51
ok thanks @Intr0nA I will try that!
CamperBot
@camperbot
Nov 10 2015 09:51
leeiaisabelle sends brownie points to @intr0na :sparkles: :thumbsup: :sparkles:
:star: 56 | @intr0na | http://www.freecodecamp.com/intr0na
Elliott McNary
@bighitbiker3
Nov 10 2015 09:52
Just check the JS in that...i'm setting the var values using the data in the HTML and manipulating from there...having trouble getting any further than I am right now
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:52
Thanks
CamperBot
@camperbot
Nov 10 2015 09:52
if you want to thank someone, put an @ before their name!
h4r1m4u
@h4r1m4u
Nov 10 2015 09:52
@coderNoob that's right. that's what i was trying to explain to you. whether you will need to do the same for any other function you create, that depends. sometimes you may not want the function to execute before the user takes some action (such as a click). in which case the function should go inside a click handler like you did originally
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:52
Thanks @h4r1m4u
CamperBot
@camperbot
Nov 10 2015 09:52
pranavdoshi sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 613 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Pranav Doshi
@pranavdoshi
Nov 10 2015 09:52
Thanks @Intr0nA
CamperBot
@camperbot
Nov 10 2015 09:52
pranavdoshi sends brownie points to @intr0na :sparkles: :thumbsup: :sparkles:
:star: 57 | @intr0na | http://www.freecodecamp.com/intr0na
Elliott McNary
@bighitbiker3
Nov 10 2015 10:10
can someone explain why I can't get this minus button to work?
$(document).ready(function(){
//set vals
  var sMin = 1500
  var sSec = 00
  var brkMin = 300
  var brkSec = 00

  $("#session").html(sMin/60);
  $("#sessionSec").html(sSec + "0");
  $("#breakMin").html(brkMin/60);
  $("#breakSec").html(brkSec + "0");

  $("#minusBreak").click(function() {brkMin = brkMin - 60; });

  //end doc readyVV
})
theSyndical
@theSyndical
Nov 10 2015 10:13
@bighitbiker3 youre storing the new value inside a variable but your not sending it to the dom.
after the brkMin = brkMin - 60; you should do $("#breakMin").html(brkMin/60);
$("#breakSec").html(brkSec + "0") again
Jason
@Jauble
Nov 10 2015 10:15
@h4r1m4u Ya, that's what I meant. I'm just not sure how to check that both of them are present. Do you know if it's possible to do something like: if (collection[i][key + 1] === source[prop[j + 1]]) { ?
Elliott McNary
@bighitbiker3
Nov 10 2015 10:17
@Intr0nA yep that did it! thank you didn't know I had to resend it to the dom
CamperBot
@camperbot
Nov 10 2015 10:17
bighitbiker3 sends brownie points to @intr0na :sparkles: :thumbsup: :sparkles:
:star: 58 | @intr0na | http://www.freecodecamp.com/intr0na
h4r1m4u
@h4r1m4u
Nov 10 2015 10:19
@Jauble it's hard to tell whether the above will work without seeing the rest of the code. you should also consider that the source object may have more than 2 properties. you can use a for loop to iterate over the properties of source and check that each of them is in the object from the collection array
@Jauble on a related note, i want you to pass the bonfire with your own code, but once you figure it out, let me know. i'll show you my solution which is much simpler.
Elliott McNary
@bighitbiker3
Nov 10 2015 10:26
@Intr0nA how can I go about actually defining the variables on the click though? Otherwise my timer won't update when I click the plus or the minus
theSyndical
@theSyndical
Nov 10 2015 10:26
@bighitbiker3 use onclick="yourfunction()"
Elliott McNary
@bighitbiker3
Nov 10 2015 10:27
ah ha thank you!
CamperBot
@camperbot
Nov 10 2015 10:27
if you want to thank someone, put an @ before their name!
andreivn2
@andreivn2
Nov 10 2015 11:05
hello
need some help getting a json into a variable
    var myjson;

    $.get("https://api.twitch.tv/kraken/streams/"+usernames[i], checkFunction);
    function checkFunction(data){

    myjson=data;
    }
  alert(myjson);
here is my code
the alert returns undefined
Jason
@Jauble
Nov 10 2015 11:11
@h4r1m4u This is what I came up with if you're still around:
function where(collection, source) {
  var arr = [];
  var prop = Object.keys(source);
  var count = 0;
  var prop1 = prop[0];
  if (prop.length < 2) {
      for (var i = 0; i < collection.length; i++) {
          for (var key in collection[i]) {
              if (key === prop1) {
                  if (collection[i][key] === source[prop]) {
                      arr.push(collection[i]);
                  }
              }
          }
      }
  }
  else {
      for (var i = 0; i < collection.length; i++) {
          count = 0;
          for (var key in source) {
              for (var keys in collection[i]) {
                  if (keys === key) {
                      if (source[key] === collection[i][keys])
                          count++;
                          break;
                      }
                  }
              }
              if (count === 2) {
                  arr.push(collection[i]);
                  count = 0;
          }
      }
  }
  return arr;
}

where([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 })
h4r1m4u
@h4r1m4u
Nov 10 2015 11:12
@Jauble does it work?
Jason
@Jauble
Nov 10 2015 11:14
Ya
h4r1m4u
@h4r1m4u
Nov 10 2015 11:15
@Jauble cool. is there any reason why you have two separate branches depending on prop.length? you could iterate over the property array even if it has only one element
also, this if (count === 2) { to me seems to suggest that you're relying on source only having 2 properties?
what if it has 3, will your code break?
Geepum Lee
@Geepum
Nov 10 2015 11:23
hey guys, I'm working on passing parameters in constructors. I don't understand the reason why we would ever want to use 'new'.
can anybody explain?
This is javascript problem
Jason
@Jauble
Nov 10 2015 11:24

Of course it will lol. I just wanted to get something that works and then figure out what I can do to improve it.

What I was working on yesterday seemed to require two separate branches. I changed what I was doing yesterday, but didn't think about not needing two separate branches. I probably shouldn't be working on this stuff at 3am lol

@h4r1m4u
h4r1m4u
@h4r1m4u
Nov 10 2015 11:25
haha
@Jauble will you still continue to try to optimize it?
Manikanth
@manikanth1024
Nov 10 2015 11:26

<head>

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

}
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"/>
h2{
font-family:Lobster;
}
p {
font-size: 16px;
font-family: Monospace;
}
</style>
</head>

<body>
<h2>CatPhotoApp</h2>

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

i want to use a google font to h2 element how to set it?
Jason
@Jauble
Nov 10 2015 11:27
@h4r1m4u ya
Manikanth
@manikanth1024
Nov 10 2015 11:27
i wrote the code but it showed me wrong
h4r1m4u
@h4r1m4u
Nov 10 2015 11:27
@Jauble ok, cool. when you're done, let me know.
@manikanth1024 the <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"/> font import links doesn't go inside your <style>. it should come before it
Manikanth
@manikanth1024
Nov 10 2015 11:28
thank u
CamperBot
@camperbot
Nov 10 2015 11:28
if you want to thank someone, put an @ before their name!
Manikanth
@manikanth1024
Nov 10 2015 11:29
thank u @Jauble
CamperBot
@camperbot
Nov 10 2015 11:29
manikanth1024 sends brownie points to @jauble :sparkles: :thumbsup: :sparkles:
:star: 221 | @jauble | http://www.freecodecamp.com/jauble
Jason
@Jauble
Nov 10 2015 11:29
@manikanth1024 that was @h4r1m4u who helped you
Geepum Lee
@Geepum
Nov 10 2015 11:30
I'm gonna ask again haha.
I'm working on passing parameters in constructors. I don't understand the reason why we would ever want to use 'new' in the first place in javascript.
can anybody explain?
Jason
@Jauble
Nov 10 2015 11:30
@h4r1m4u Ok
Geepum Lee
@Geepum
Nov 10 2015 11:31
when do you guys actually use 'new' in reality?
Manikanth
@manikanth1024
Nov 10 2015 11:32
when we want to create objects
we use "new" keyword
Jason
@Jauble
Nov 10 2015 11:32
@h4r1m4u Is yours anywhere near what I have?
h4r1m4u
@h4r1m4u
Nov 10 2015 11:33
@Jauble it's much simpler
i think you'll enjoying seeing how it can be done after working on it for so long
which, by the way, is great. it's fantastic that you're trying to crack it on your own
Aparna Ramesh
@aparna1591
Nov 10 2015 11:43
This message was deleted
Jason
@Jauble
Nov 10 2015 11:45
@h4r1m4u Ya that's what I figured. Mind if I see it now? I'm still gonna see what I can do to fix what I have, but I'm pretty sure yours is so different it won't have any influence
h4r1m4u
@h4r1m4u
Nov 10 2015 11:46
@Jauble sure. i'll pm you
Jason
@Jauble
Nov 10 2015 11:46
@h4r1m4u Thanks
CamperBot
@camperbot
Nov 10 2015 11:46
jauble sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 615 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Coira Ellison
@Coira
Nov 10 2015 11:47
sorry @gitasong I went to bed, did you manage to work it out?
Aparna Ramesh
@aparna1591
Nov 10 2015 11:51

@Geepum

Say you have a situation where you have to create an array of custom objects.
You will first create a constrcutor for it like so:
var myArray = []; // the array you want to push objects to

//contructor for object with 3 properties firstName, lastName and title
function empInfo(firstName, lastName, title){
this.firstName = firstName;
this.lastName = lastName;
this.title = title;
}

Next you will instantiate the object like so:

var tempObject = new empInfo("John","Doe","Technical Analyst"); // you pass values for object properties as parameters // here. I have hard coded values here but these could be //dynamic fom a web service

//Lastly, push this new object to myArray
myArray.push(tempObject)

@Geepum hope that helped, let me know if you need any clarification
Markus Kiili
@Masd925
Nov 10 2015 11:54
@Geepum You can use the new keyword and constructor to make objects, or factory functions that return objects (new keyword not used there).
Pranay Kothapalli
@kotAPI
Nov 10 2015 11:54
finding LCM isn't as easy as i thought it was
Paul de Wouters
@pdewouters
Nov 10 2015 11:55
@Geepum the new keyword was added to JS basically to attract devs who were used to OOP programming in Java
```
h4r1m4u
@h4r1m4u
Nov 10 2015 11:56
because calling the language JAVAScript wasn't enough :D
Mach
@vijesh-s
Nov 10 2015 11:57
hey @h4r1m4u .. need help
Bonfire: Falsy Bouncer
CamperBot
@camperbot
Nov 10 2015 11:57
Sorry, can't find a bonfire called falsy bouncer. [ Check the map? ]
Paul de Wouters
@pdewouters
Nov 10 2015 11:57
help code formatting
CamperBot
@camperbot
Nov 10 2015 11:57
no wiki entry for: code formatting
:pencil: click here to create one now!after creating your page type update to reload it here
Markus Kiili
@Masd925
Nov 10 2015 11:57
@Geepum You can make a factory function that returns the list containing the strings, without ever using the new keyword.
Mach
@vijesh-s
Nov 10 2015 11:58
function bouncer(arr) {
  // Don't show a false ID to this bouncer.

  var r = arr.filter(function(val) {
    if(val===false || val === "" || val === undefined || val === 0 || isNaN(val) || val ===null)
      {
        console.log("d");
        return false;
      }
    return true;
  });

  return r;
}
isNaN filters the strings too
Paul de Wouters
@pdewouters
Nov 10 2015 11:59
this is an example of creating an object with both methods: http://pastebin.com/p0bM9nfP
you can see that in the first instance it creates a Person object with the prototype set to Person and in the second, it is an Object with the Object prototype
Decatek
@Decatek
Nov 10 2015 12:00
Hi, im trying to reverse a string for using it in the palidrome check, how is that this code is not returning a reversed tmp?
var tmp = str;
  tmp = tmp.toLowerCase().replace(/\W/g, '');

  tmp.split(' ').reverse().join('');

  return tmp
Markus Kiili
@Masd925
Nov 10 2015 12:00
@vijesh-s use Boolean(val) instead of that long condition on if.
Decatek
@Decatek
Nov 10 2015 12:00
the split, reverse and join line specifically
Markus Kiili
@Masd925
Nov 10 2015 12:04
@Decatek You are not storing the reversed string anywhere. Strings are immutable.
Mach
@vijesh-s
Nov 10 2015 12:04
wow. efficient.. thanks @Masd925
CamperBot
@camperbot
Nov 10 2015 12:04
vijesh-s sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 276 | @masd925 | http://www.freecodecamp.com/masd925
Z.G.Hao
@akidox
Nov 10 2015 12:04
how you define a “page” in your code?
there’s one sentence says "Each id must be unique to a specific element and used only once per page."
Paul de Wouters
@pdewouters
Nov 10 2015 12:05
@akidox that refers to the actual web page
Z.G.Hao
@akidox
Nov 10 2015 12:06
oh
Paul de Wouters
@pdewouters
Nov 10 2015 12:06
so on index.html you can only have one instance of #foo
Z.G.Hao
@akidox
Nov 10 2015 12:06
thanks @pdewouters
CamperBot
@camperbot
Nov 10 2015 12:06
akidox sends brownie points to @pdewouters :sparkles: :thumbsup: :sparkles:
:star: 226 | @pdewouters | http://www.freecodecamp.com/pdewouters
Mach
@vijesh-s
Nov 10 2015 12:06
hmm. interesting question @akidox . I think any within a <body></body> is one page. But expert opinion required
:+1:
Z.G.Hao
@akidox
Nov 10 2015 12:08
sounds make sense
thank you too @vijesh-s
CamperBot
@camperbot
Nov 10 2015 12:09
akidox sends brownie points to @vijesh-s :sparkles: :thumbsup: :sparkles:
:star: 200 | @vijesh-s | http://www.freecodecamp.com/vijesh-s
Decatek
@Decatek
Nov 10 2015 12:15
@Masd925 thank you!
CamperBot
@camperbot
Nov 10 2015 12:15
decatek sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 277 | @masd925 | http://www.freecodecamp.com/masd925
Larry
@runstache
Nov 10 2015 12:21
@akidox a page is everything between the <body> tags. Id values should be unique in that context.
Decatek
@Decatek
Nov 10 2015 12:21
how come palindrome("00 (: /-\ :) 0-0") should return true? does it consider to be the lowercase of -?
'("0_0 (: /-\ :) 0-0")'
Z.G.Hao
@akidox
Nov 10 2015 12:22
thanks @runstache
CamperBot
@camperbot
Nov 10 2015 12:22
akidox sends brownie points to @runstache :sparkles: :thumbsup: :sparkles:
:star: 174 | @runstache | http://www.freecodecamp.com/runstache
Z.G.Hao
@akidox
Nov 10 2015 12:23
now I know it
jpjenkins
@jpjenkins
Nov 10 2015 12:41
Decatex, you have to remove all the special characters
The answer is there :)
@Decatek :point_up:
Decatek
@Decatek
Nov 10 2015 12:59
that link is really helpful, thanks @jpjenkins :D
CamperBot
@camperbot
Nov 10 2015 12:59
decatek sends brownie points to @jpjenkins :sparkles: :thumbsup: :sparkles:
:star: 219 | @jpjenkins | http://www.freecodecamp.com/jpjenkins
jpjenkins
@jpjenkins
Nov 10 2015 12:59
you're welcome :)
Decatek
@Decatek
Nov 10 2015 12:59
regex is still painful though :(
can't wrap my head around it
jpjenkins
@jpjenkins
Nov 10 2015 13:00
yeah, this video is quite good for understanding the power of it: https://www.youtube.com/watch?v=EkluES9Rvak
Decatek
@Decatek
Nov 10 2015 13:01
oh thanks @jpjenkins , more brownies for you :D
CamperBot
@camperbot
Nov 10 2015 13:01
decatek sends brownie points to @jpjenkins :sparkles: :thumbsup: :sparkles:
:warning: decatek already gave jpjenkins points
Decatek
@Decatek
Nov 10 2015 13:01
nvm :/
jpjenkins
@jpjenkins
Nov 10 2015 13:01
yeah, camperbot's a bit strict on the brownie giving
So much for peace and love
Gleb
@GlebShaucou
Nov 10 2015 13:05
1.JPG
Why cycle "for" doesn't work here? It goes only through i=0 and then end.
andreivn2
@andreivn2
Nov 10 2015 13:08
hello
does anybody know if codepen.io restricts external links?
Decatek
@Decatek
Nov 10 2015 13:08
it seems to me that argsArr.length will be 0 after you execute line 3, i guess storing var length = argsArr; before line 3 should fix it @HlebShautsou
var length = argsArr.length; whoops
jpjenkins
@jpjenkins
Nov 10 2015 13:10
some comments would be nice too :P
that top line is confusing me
what's going on there
why 2 slices in a row
Decatek
@Decatek
Nov 10 2015 13:11
nope, i was wrong. you initialise var argsArr = arr; and you destroy it after the function call, else you won't be able to access arr in your function
jpjenkins
@jpjenkins
Nov 10 2015 13:12
what is 'Array'?
anyway, @HlebShautsou when you return something, it ends all
h4r1m4u
@h4r1m4u
Nov 10 2015 13:13
@HlebShautsou you cannot return value from within a for loop. or technically you can, but the moment the return statement happens, the for loop finishes executing and the function exits
that's why it runs only once
jpjenkins
@jpjenkins
Nov 10 2015 13:14
:point_up:
what he said
or she!
h4r1m4u
@h4r1m4u
Nov 10 2015 13:17
@jpjenkins the Array refers to the global Array object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array. he uses its method slice() to parse the function arguments object: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/arguments
Gleb
@GlebShaucou
Nov 10 2015 13:18
@h4r1m4u Thanks, it works)
CamperBot
@camperbot
Nov 10 2015 13:18
hlebshautsou sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 616 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Markus Kiili
@Masd925
Nov 10 2015 13:18
@HlebShautsou Do you really need to make the arguments array for your code? You are just using length and anguments[i] which work on plain arguments.
jpjenkins
@jpjenkins
Nov 10 2015 13:19
Array is used to refer to what @h4r1m4u ?
h4r1m4u
@h4r1m4u
Nov 10 2015 13:19
the global Array object
Dennis
@ydennisy
Nov 10 2015 13:19
hey guys has anyone completed the express course??
Gleb
@GlebShaucou
Nov 10 2015 13:20
@Masd925 this is for my convenience)
Markus Kiili
@Masd925
Nov 10 2015 13:23
@HlebShautsou ok, but when you have the args array, you could make your code very short by using array method.
function destroyer(arr) {
  args = Array.prototype.slice.call(arguments);
  return arr.filter(function(val) {
    return args.indexOf(val)===-1;
  });
}
jpjenkins
@jpjenkins
Nov 10 2015 13:24
@h4r1m4u ah, the global array object being the array in the argument?
I've not seen this before :sparkles:
Decatek
@Decatek
Nov 10 2015 13:27
I'm having this "tmp[i] is undefined", but if I return max from withing the loop (after the first iteration) it indeed gets the second word if longer than the previous
function findLongestWord(str) {
  var tmp = str.split(" ");
  var max = tmp[0];

  for (i = 1, length = str.length; i <= length; i++) {
    max = (tmp[i].length > max.length) ? tmp[i] : max;
  }

  return max.length;
}
h4r1m4u
@h4r1m4u
Nov 10 2015 13:27
@jpjenkins no, the slice() is a method of the global Array object. you can bind the method to array-like object (which the arguments object is). see the 'Array-like objects' section about half-way down the page here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
Markus Kiili
@Masd925
Nov 10 2015 13:32
@Decatek Shouldn't you be looping over the array tmp? Your for is looping the original string.
Decatek
@Decatek
Nov 10 2015 13:35
yea indeed that was wrong. still tmp[i] is undefined though. i tried storing tmp[i] in variable scoped within the loops and still i get the error. funny thing is that max is getting the value it's supposed to get
Matt Leonard
@matty22
Nov 10 2015 13:39
@decatek you have a comma in your loop iteration after i = 1. I dunno if that's causing your errors though.
Should be a ;?
Adrien Zaganelli
@adrienZ
Nov 10 2015 13:41
hint
CamperBot
@camperbot
Nov 10 2015 13:41
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Matt Leonard
@matty22
Nov 10 2015 13:42
And why bother making the new var length in your loop for iteration? Why not remove length = str.length; and just use i <= str.length; ?
Decatek
@Decatek
Nov 10 2015 13:43
that works in C, since you use a function in C to get string length it prevents from calling that function everytime in the array. i was just used to do it like this, i'll change it now and check, thanks @matty22 for pointing that out
CamperBot
@camperbot
Nov 10 2015 13:43
decatek sends brownie points to @matty22 :sparkles: :thumbsup: :sparkles:
:star: 228 | @matty22 | http://www.freecodecamp.com/matty22
Minh Nguyen
@mnguyec
Nov 10 2015 13:45
hello
Decatek
@Decatek
Nov 10 2015 13:46
hi @mnguyec
Minh Nguyen
@mnguyec
Nov 10 2015 13:46
im going through the html class. particularly "Make Circular Images with a Border Radius" the console is blank when this page loads. how do we go about getting the image file etc
Decatek
@Decatek
Nov 10 2015 13:50
try the reset button
sometimes it doesn't load the code that should be there, or loads just half of it
Markus Kiili
@Masd925
Nov 10 2015 13:59
@Decatek Now I got it to work:
function findLongestWord(str) {
  var tmp = str.split(" ");
  var max = tmp[0];

  for (i = 1, length = tmp.length; i < length; i++) {
    max = (tmp[i].length > max.length) ? tmp[i] : max;
  }

  return max.length;
}
Decatek
@Decatek
Nov 10 2015 14:01
why is it?
Rahul Roy
@Roy1990
Nov 10 2015 14:02
Hello World
CamperBot
@camperbot
Nov 10 2015 14:02

welcome to FreeCodeCamp @Roy1990!

Decatek
@Decatek
Nov 10 2015 14:04
welcome @Roy1990! thanks @Masd925, i have no idea why that is, but it work perfectly :D
Jason Wood
@catapixel
Nov 10 2015 14:04
@Roy1990 Welcome!
Markus Kiili
@Masd925
Nov 10 2015 14:06
@Decatek Using informative variable names would help spotting possible errors.
Decatek
@Decatek
Nov 10 2015 14:08
especially when you don't have types, indeed :D
saurav
@sauravkarki2
Nov 10 2015 14:10
screenshot-www.freecodecamp.com 2015-11-10 19-54-50.png
can anyone help me out with waypoint: iterate odd numbers using a for loop of basic java script?
Aleksander Gębicki
@Takumar
Nov 10 2015 14:12
@sauravkarki2 check your for loop. How you iterate your elements?
You start from value 0, what will be next element of your i index?
Just starting you push 0 to your array myArraywhereas you had to push odd elements.
saurav
@sauravkarki2
Nov 10 2015 14:13
@Takumar to print even numbers we use i += 2 but i dont know how we print odd numbers
Aleksander Gębicki
@Takumar
Nov 10 2015 14:14
@sauravkarki2 think how you would do it in your mind. You should start from 1, don't you?
Gobinda sahu
@Gobindasahu
Nov 10 2015 14:14
Hello World...
CamperBot
@camperbot
Nov 10 2015 14:14

welcome to FreeCodeCamp @Gobindasahu!

Aleksander Gębicki
@Takumar
Nov 10 2015 14:15
When you create loop you can start from any element you like: 5, -142 or 7890: for (var i = 7890...
saurav
@sauravkarki2
Nov 10 2015 14:15
@Takumar i tried to use (i = 2 * i + 1)
Rahul Roy
@Roy1990
Nov 10 2015 14:15
@sauravkarki2 i think 2*n-1 will give a odd number
Aleksander Gębicki
@Takumar
Nov 10 2015 14:15
@sauravkarki2 too complicated. Let's agree that 1 is first odd number, how you create second? Very simple.
Rahul Roy
@Roy1990
Nov 10 2015 14:16
welcome @Gobindasahu
saurav
@sauravkarki2
Nov 10 2015 14:16
@Takumar thank you it worked.....
CamperBot
@camperbot
Nov 10 2015 14:16
sauravkarki2 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 670 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 10 2015 14:17
@sauravkarki2 show your code how you did this? No need to create complicated formulas in such situation, you get next odd number just by adding 2 to previous just like in example with even numbers. The only change is starting number.
saurav
@sauravkarki2
Nov 10 2015 14:18
1.png
Aleksander Gębicki
@Takumar
Nov 10 2015 14:18
@sauravkarki2 good job :-)
saurav
@sauravkarki2
Nov 10 2015 14:19
@Takumar :)
Mahadevan
@karthic2914
Nov 10 2015 14:33

guys iam trying to fine length

lastName.length;

i am not getting the result
length() do i need to put like this
find length
Mahadevan
@karthic2914
Nov 10 2015 14:35
thanks @camperbot
CamperBot
@camperbot
Nov 10 2015 14:35
karthic2914 sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 536 | @camperbot | http://www.freecodecamp.com/camperbot
Yashraj-Gore
@Yashraj-Gore
Nov 10 2015 14:38
Anyone could help me out with the second task in the waypoint.,i am unable to add src attribute pointing to the kitten image.
blob
here is the screenshot attached for the same in above comment
Jerome Ricks
@jeromericks
Nov 10 2015 14:41
@Yashraj-Gore wrong image src
Aleksander Gębicki
@Takumar
Nov 10 2015 14:41
@Yashraj-Gore don't put spaces, type : <a href="http... and move this statement belowe header <h2>
saurav
@sauravkarki2
Nov 10 2015 14:49
screenshot-www.freecodecamp.com 2015-11-10 20-34-05.png
I do not understand the above code...please help me with this
Maria Kravtsova
@maria-kravtsova
Nov 10 2015 14:51
@sauravkarki2 what are you trying to do?
Yashraj-Gore
@Yashraj-Gore
Nov 10 2015 14:51
@jeromericks which part is going wrong? Am i entering wrong URL in <img src?
Jerome Ricks
@jeromericks
Nov 10 2015 14:52
@read the bottom of the page, it lists the right image
@Yashraj-Gore read the bottom of the page, it lists the right image
saurav
@sauravkarki2
Nov 10 2015 14:52
screenshot-www.freecodecamp.com 2015-11-10 20-37-57.png
Yashraj-Gore
@Yashraj-Gore
Nov 10 2015 14:52
@jeromericks trying shall get back in 5. It worked,thanks.
saurav
@sauravkarki2
Nov 10 2015 14:53
this should've been the code right??
dainramnauth
@dainramnauth
Nov 10 2015 14:59
im trying to do the filter array, to remove all elements greater than 5
but its not working
Geepum Lee
@Geepum
Nov 10 2015 15:00
thank you @aparna1591 @Masd925 @pdewouters !!! sorry about the late reply!
CamperBot
@camperbot
Nov 10 2015 15:00
geepum sends brownie points to @aparna1591 and @masd925 and @pdewouters :sparkles: :thumbsup: :sparkles:
:star: 278 | @masd925 | http://www.freecodecamp.com/masd925
:star: 166 | @aparna1591 | http://www.freecodecamp.com/aparna1591
:star: 227 | @pdewouters | http://www.freecodecamp.com/pdewouters
Peter Daily
@thepeted
Nov 10 2015 15:02
@dainramnauth what code have you got so far?
dainramnauth
@dainramnauth
Nov 10 2015 15:03
var array = [1,2,3,4,5,6,7,8,9,10];
// Only change code below this line.
array = array.filter(function(val) {
return val > 5;
});
that
saurav
@sauravkarki2
Nov 10 2015 15:04
screenshot-www.freecodecamp.com 2015-11-10 20-34-05.png
can someone tell me how does this work??
Peter Daily
@thepeted
Nov 10 2015 15:04
This message was deleted
@dainramnauth you're very close. Have another look at your operator there
Balint Toth
@tothbalint
Nov 10 2015 15:08
I would like to ask for a little bit of explanation for the JavaScript Slot Machine waypont. In the description it says in order to target the slots, we should use $($(".slot")[0]).html(slotOne);, why is it necessary to put $(".slot")[0] in additional parentheses?
dainramnauth
@dainramnauth
Nov 10 2015 15:08
I have the same question too
I don't get why its necessary
Mach
@vijesh-s
Nov 10 2015 15:20
$ is an element selector. $(".slot") returns an array of elements, to choose first one in that array one we need $(".slot")[0] , Now using jQuery to select that first one in the array we use the selector on it again. $((".slot")[0])
@dainramnauth @tothbalint
Balint Toth
@tothbalint
Nov 10 2015 15:21
that makes sense, thank you very much @vijesh-s
CamperBot
@camperbot
Nov 10 2015 15:21
tothbalint sends brownie points to @vijesh-s :sparkles: :thumbsup: :sparkles:
:star: 205 | @vijesh-s | http://www.freecodecamp.com/vijesh-s
Mach
@vijesh-s
Nov 10 2015 15:22
you are welcome @tothbalint
Shi Tian
@shitian007
Nov 10 2015 15:59
Capture.PNG
I used the reverse method and got the intended output but is unable to proceed. Any idea why? Thanks.
CamperBot
@camperbot
Nov 10 2015 16:00
if you want to thank someone, put an @ before their name!
Ryan Day
@rdanielday
Nov 10 2015 16:17
Hi guys, I'm working on the Title Case bonfire and I've run into a wall.
Michelle
@pinskers
Nov 10 2015 16:17

Hi all, I admit I am very stuck on Waypoint: Make Instances of Objects with a Constructor Function.

I've created a new instance of the Car constructor function and assigned it to the myCar variable. That runs on the tests fine, but when I assign the property nickname to the myCar variable, I keep getting an unexpected token

Code:
var myCar = new Car();
var myCar.nickname = "Bertha";
Ryan Day
@rdanielday
Nov 10 2015 16:18
Thus far I've split the initial string into an array, then I iterated through each new string in this array.
If I then split each of these strings into an array, I'm able to shift off the first letter. But then when I try to unshift the new capitalized letter onto the array, I'm running into an error.
Pranay Kothapalli
@kotAPI
Nov 10 2015 16:19
these algorithms will be the death of me
Ryan Day
@rdanielday
Nov 10 2015 16:20
How can I show my code? Is it just three single quotes, then my code?

'''
function titleCase(str) {
var arr = str.toLowerCase().split(' ');
for(var i = 0; i < arr.length; i ++) {
var capLetter = arr[i].charAt(0).toUpperCase();
var wordSplit = arr[i].split('');
var noFirst = wordSplit.shift();
console.log(noFirst.unshift(capLetter));
}
return str;
}

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

CamperBot
@camperbot
Nov 10 2015 16:21
:bulb: to format code use backticks! ``` more info
Dustin Baker
@DustinBaker22
Nov 10 2015 16:21
three back ticks
Ryan Day
@rdanielday
Nov 10 2015 16:22
function titleCase(str) {
  var arr = str.toLowerCase().split(' ');
  for(var i = 0; i < arr.length; i ++) {
    var capLetter = arr[i].charAt(0).toUpperCase();
    var wordSplit = arr[i].split('');
    var noFirst = wordSplit.shift();
    console.log(noFirst.unshift(capLetter));
  }
  return str;
}

titleCase("I'm a little tea pot");
Pranay Kothapalli
@kotAPI
Nov 10 2015 16:23
in between ``` three of these and ```` three of these
i used 4 so it isnt treated as code
Bo Sanders
@Biletnikoff
Nov 10 2015 16:23
@gitasong financing
Ryan Day
@rdanielday
Nov 10 2015 16:23
thanks @DustinBaker22 @kotAPI
CamperBot
@camperbot
Nov 10 2015 16:23
rdanielday sends brownie points to @dustinbaker22 and @kotapi :sparkles: :thumbsup: :sparkles:
:star: 201 | @dustinbaker22 | http://www.freecodecamp.com/dustinbaker22
:star: 235 | @kotapi | http://www.freecodecamp.com/kotapi
Bo Sanders
@Biletnikoff
Nov 10 2015 16:23
is Modernizr considered a framework?
Dustin Baker
@DustinBaker22
Nov 10 2015 16:26
@Biletnikoff It's a type of framework that helps with adding CSS3 to browsers who sometimes have issues with CSS3. At least that is what I'm seeing.
@Biletnikoff What are you trying to accomplish?
Bo Sanders
@Biletnikoff
Nov 10 2015 16:29
im trying not to use frameworks when creating my game
Dustin Baker
@DustinBaker22
Nov 10 2015 16:29
If you're looking for a cool framework, other than the typical bootstrap, http://materializecss.com/ is a cool one.
Oh!
Gotcha
Bo Sanders
@Biletnikoff
Nov 10 2015 16:32
actually nvm I think at the most im allowed to use this. Im creating this game for a bootcamp
Pranay Kothapalli
@kotAPI
Nov 10 2015 16:36
foundation is much better than the two
highly customizable
although i love materialze for its colors
Zakariya AbdulHameed
@Zaks0n
Nov 10 2015 16:58
hey guys, Im need help with this; Waypoint: Target a Specific Child of an Element Using jQuery . I am stuck
Pranay Kothapalli
@kotAPI
Nov 10 2015 17:23
what do you need @Zaks0n
Helio Ha
@helioha
Nov 10 2015 17:25
how do I enforce that the return type variable of a function in JS is a number?
Pranay Kothapalli
@kotAPI
Nov 10 2015 17:27
isNaN(numberGoesHere) needs to be false
Matt
@MattRynbrand
Nov 10 2015 17:47
hey
Helio Ha
@helioha
Nov 10 2015 17:48
thanks!
CamperBot
@camperbot
Nov 10 2015 17:48
if you want to thank someone, put an @ before their name!
Helio Ha
@helioha
Nov 10 2015 17:48
@kotAPI thank you so much!
CamperBot
@camperbot
Nov 10 2015 17:48
helioha sends brownie points to @kotapi :sparkles: :thumbsup: :sparkles:
:star: 236 | @kotapi | http://www.freecodecamp.com/kotapi
Marius Garbea
@MariusGarbea
Nov 10 2015 17:51
hello guys!
Andre Neves
@BupNup
Nov 10 2015 17:51
Hey guys, I need help here with Waypoint: Target Elements by Class Using jQuery
Marius Garbea
@MariusGarbea
Nov 10 2015 17:51
i have a little problem
Mach
@vijesh-s
Nov 10 2015 17:52
@BupNup @MariusGarbea where are you guys stuck?
Marius Garbea
@MariusGarbea
Nov 10 2015 17:52
i have a div element (mainly for the background), with some opacity
after i include a text in the div element it changes the text's opacity too
how can i prevent that?
Andre Neves
@BupNup
Nov 10 2015 17:52
I've added the classes animated and shake to my elements like this: $(".well").addclass("animated shake");
what am I doing wrong?
Mach
@vijesh-s
Nov 10 2015 17:53
@BupNup can share the full code here. so that i can take a look
Andre Neves
@BupNup
Nov 10 2015 17:54
yes sure

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addclass("animated shake");

});
</script>

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

Mach
@vijesh-s
Nov 10 2015 17:54
@MariusGarbea I think the child classes inherit the properties of parent element. So override it by changing the opacity of the text. I am not an expert, but try it.
Pranay Kothapalli
@kotAPI
Nov 10 2015 17:55
you dont have a button class @BupNup
Mach
@vijesh-s
Nov 10 2015 17:55
@BupNup make the "c" capital in $(".well").addclass("animated shake");
Marius Garbea
@MariusGarbea
Nov 10 2015 17:55
@vijesh-s yes i know. i tried changing the opacity directly in the h1 element where the text is, but doesn't work...
Mach
@vijesh-s
Nov 10 2015 17:55
its addClass and not addclass
Andre Neves
@BupNup
Nov 10 2015 17:56
lol
@vijesh-s thank you very much
CamperBot
@camperbot
Nov 10 2015 17:56
bupnup sends brownie points to @vijesh-s :sparkles: :thumbsup: :sparkles:
:star: 207 | @vijesh-s | http://www.freecodecamp.com/vijesh-s
Mach
@vijesh-s
Nov 10 2015 17:57
you are welcome @BupNup
@MariusGarbea I am afraid I dont know then
h4r1m4u
@h4r1m4u
Nov 10 2015 17:58
@MariusGarbea you cannot. opacity will change both the background and font transparency. the solution is too have two nested elements, each with its own opacity
Marius Garbea
@MariusGarbea
Nov 10 2015 17:58
@h4r1m4u so a div with it's opacity inside another div with another opacity?
its*
@h4r1m4u doesn't work this way..
h4r1m4u
@h4r1m4u
Nov 10 2015 18:00
@MariusGarbea yeah, that should work, something along these lines:
<div style="opacity: 0.5;">
   <div style="opacity: 1;"> <!-- you need to set the opacity to 1 on the inner div specifically, otherwise it'll inherit the parent's opacity -->
  </div>
</div>
Varun
@vattav90
Nov 10 2015 18:01
Hi Guys, Recently started with Free Code Camp. Need help in understanding this thing -
$($(".slot")[0])
What does this syntax mean?
h4r1m4u
@h4r1m4u
Nov 10 2015 18:02
@MariusGarbea if you can't get it to work, can you post your code or link your codepen?
Marius Garbea
@MariusGarbea
Nov 10 2015 18:03
@h4r1m4u yeah...doesn't work that way either
h4r1m4u
@h4r1m4u
Nov 10 2015 18:03
it should, i've done it before
line 24
h4r1m4u
@h4r1m4u
Nov 10 2015 18:04
what are you trying to make transparent? and what should not be?
Marius Garbea
@MariusGarbea
Nov 10 2015 18:04
the background 0.7 opacity and the text 1 opacity
Kevin H.
@kbolt
Nov 10 2015 18:04
Bonfire for capitalize every word has me stumped
CamperBot
@camperbot
Nov 10 2015 18:04
Sorry, can't find a bonfire called for capitalize every word has me stumped. [ Check the map? ]
Markus Kiili
@Masd925
Nov 10 2015 18:07
@vattav90 $() is a shorthand for $(document).ready() so it runs when the page has loaded. Inside you have a jquery object generated by css selector ".slot" and 0 takes the first matching element.
Mach
@vijesh-s
Nov 10 2015 18:07
@vattav90 $ is a selector function in jQuery. It selects elements in the page. $(".slot") return all elements using the slot class. Now $(".slot")[0] means first element of all those elements using the slot. Now you have to select that element to work on it using the $. i.e. $($(".slot")[0])
h4r1m4u
@h4r1m4u
Nov 10 2015 18:07

@MariusGarbea ok, here's a solution:

.mijloc h2 {
  color: rgba(0,0,0,1);
}

add this to your CSS and remove the opacity: 1 from the <h2>

Cailyn Rodriguez
@cailynerodriguez
Nov 10 2015 18:08
i am trying Use the jQuery addClass() function to give the classes animated and bounce to your button elements. i cant figure out what i am doing wrong.
<script>
$(document).ready(function() {
$("button").addClass("animatedbounce")

});
</script>
Markus Kiili
@Masd925
Nov 10 2015 18:09
@cailynerodriguez try space between class names?
Joseph Botros
@josephwasily
Nov 10 2015 18:09
Hello any hint about portfolio background images?
Cailyn Rodriguez
@cailynerodriguez
Nov 10 2015 18:10
@Masd925 that was it! thank you.
CamperBot
@camperbot
Nov 10 2015 18:10
cailynerodriguez sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 279 | @masd925 | http://www.freecodecamp.com/masd925
Yashraj-Gore
@Yashraj-Gore
Nov 10 2015 18:10
blob
Varun
@vattav90
Nov 10 2015 18:11
@vijesh-s @Masd925 So the 0 2 would represent the .slot elements , but if we had an id for this slot elements we wouldn't bee needing to use this nos., right?
h4r1m4u
@h4r1m4u
Nov 10 2015 18:12
@vattav90 to add to what @vijesh-s said:
$(".slot") - this is a jQuery selector method which selects all elements with class .slot in the DOM and returns them as a collection in a jQuery object
$(".slot")[0] - selects the first element from the collection (it's an array, so it has the same syntax as you'd expect in javascript). this returns the raw DOM element. since it's a raw DOM element and not a jQuery object, it doesn't have any of the jQuery methods and thus we need to do:
$($(".slot")[0])) - by wrapping it in the jQuery wrapper, we turn the RAW element into a jQuery object again and can now use the jQuery methods on it (such as .addClass(), .css(), etc.)
Yashraj-Gore
@Yashraj-Gore
Nov 10 2015 18:12
I am unable to complete the first step in the challenge,what am i missing here,could anyone please point out:
blob
h4r1m4u
@h4r1m4u
Nov 10 2015 18:13
@Yashraj-Gore the button needs to be inside the form. you have it outside of it
@MariusGarbea did you get it to work?
Varun
@vattav90
Nov 10 2015 18:16
@h4r1m4u Thanks, but what is DOM?
CamperBot
@camperbot
Nov 10 2015 18:16
vattav90 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 617 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Marius Garbea
@MariusGarbea
Nov 10 2015 18:16
@h4r1m4u nope..
@h4r1m4u actually let me try again
h4r1m4u
@h4r1m4u
Nov 10 2015 18:16
@vattav90 document object model: https://en.wikipedia.org/wiki/Document_Object_Model
It's only running for the first word for me
h4r1m4u
@h4r1m4u
Nov 10 2015 18:17
@MariusGarbea use the rgba color as i suggest above for the h2. it'll work
i tested it
Markus Kiili
@Masd925
Nov 10 2015 18:18
@h4r1m4u jQuery object is not an array as you said, but an array-like object :)
Marius Garbea
@MariusGarbea
Nov 10 2015 18:20
@h4r1m4u yes it works ty!
h4r1m4u
@h4r1m4u
Nov 10 2015 18:20
@Masd925 i meant the collection of the elements in the jQuery object, not the object itself
@MariusGarbea yw
Marius Garbea
@MariusGarbea
Nov 10 2015 18:22
@h4r1m4u oh...doesn't work...
@h4r1m4u if i change the opacity to 0.2 (let's say) for the background, the text changes too
@h4r1m4u try to do it for a really low opacity so you can see the difference
Yashraj-Gore
@Yashraj-Gore