These are chat archives for FreeCodeCamp/Help

19th
Nov 2015
Jonathan
@jonathantimm
Nov 19 2015 00:27
could anyone give me a small hint on the titlecase bonfire? I'm not sure I know where to start
Mason Shin
@minsooshin
Nov 19 2015 00:28
@jonathantimm you need to start with spliting the centense
Rob Eichenlaub
@eichenlaub
Nov 19 2015 00:28
Having some trouble with Waypoint: Make Unique Objects by Passing Parameters to our Constructor
"var myCar;
var myCar = new Car(6, 3, 1);” doesn’t work?
Jonathan
@jonathantimm
Nov 19 2015 00:29
@minsooshin so I was thinking that I have to split the string into an array and then titlecase the first character of each string with a for loop
Mason Shin
@minsooshin
Nov 19 2015 00:29
yes :)
Jonathan
@jonathantimm
Nov 19 2015 00:29
but then i also have to make sure that each letter after that is lowercase, and i'm not sure how long each string will be
Mason Shin
@minsooshin
Nov 19 2015 00:30
@eichenlaub did you change your constructor, too?
Jonathan
@jonathantimm
Nov 19 2015 00:30
which sounds really complicated but i might be overthinking it
Mason Shin
@minsooshin
Nov 19 2015 00:31
@jonathantimm what methods I used are toLowerCase, split, chartAt, toUpperCase, and slice
Rob Eichenlaub
@eichenlaub
Nov 19 2015 00:31
@jonathantimm that did it! thank you! :+1:
CamperBot
@camperbot
Nov 19 2015 00:31
eichenlaub sends brownie points to @jonathantimm :sparkles: :thumbsup: :sparkles:
:star: 325 | @jonathantimm | http://www.freecodecamp.com/jonathantimm
Jonathan
@jonathantimm
Nov 19 2015 00:32
@eichenlaub I didn't help you! haha
Peter W Ross
@PeterWRoss
Nov 19 2015 00:33
<style>
  body {
    background-color: black;
    font-family: Monospace;
    color: green;

  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }

 #orange-text {
    color:orange;
  }

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

Let's override your pink-text and blue-text classes, and make your h1 element orange, by giving the h1 element an id and then styling that id.

Give your h1 element the id attribute of orange-text. Remember, id styles look like this:

<h1 id="orange-text">

Leave the blue-text and pink-text classes on your h1 element.

Create a CSS declaration for your orange-text id in your style element.

any ideas?
Rob Eichenlaub
@eichenlaub
Nov 19 2015 00:33
@minsooshin Thanks, that did it! :+1:
CamperBot
@camperbot
Nov 19 2015 00:33
eichenlaub sends brownie points to @minsooshin :sparkles: :thumbsup: :sparkles:
:star: 235 | @minsooshin | http://www.freecodecamp.com/minsooshin
MirkaG
@MirkaG
Nov 19 2015 00:34
Campers a question: I need to add 3 to every value in my Array. What am I doing wrong?
var oldArray = [1,2,3,4,5];

// Only change code below this line.

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

// Only change code above this line.

(function() {return newArray;})();
Matt Yamamoto
@MattYamamoto
Nov 19 2015 00:36
@MirkaG is all that in a function? Your syntax is wrong
function myFuncName() {
//put your code in here

return newArray;
}
Coira Ellison
@Coira
Nov 19 2015 00:38
@MirkaG you've got the basic idea, but you don't need var addThree, just add the .map bit to oldArray
Peter W Ross
@PeterWRoss
Nov 19 2015 00:39
That stuff that you guys are doing looks a bit scary.. lol
Mason Shin
@minsooshin
Nov 19 2015 00:39
@PeterWRoss first of all, you can use only one id for an element
it is not like class
Peter W Ross
@PeterWRoss
Nov 19 2015 00:40
so that does not go in the <style> </style> portion
Mason Shin
@minsooshin
Nov 19 2015 00:40
for class you can use multiple class names on one element
Coira Ellison
@Coira
Nov 19 2015 00:40
@PeterWRoss scary... but fun?
Matt Yamamoto
@MattYamamoto
Nov 19 2015 00:40
@MirkaG oh yeah, I missed that. as @Coira you don't need addThree, just do newArray = oldArray.map...
Peter W Ross
@PeterWRoss
Nov 19 2015 00:40
I'll let you know when I get there @Coira
Coira Ellison
@Coira
Nov 19 2015 00:41
:)
Peter W Ross
@PeterWRoss
Nov 19 2015 00:41
Let me look back through my notes @minsooshin brb
Mason Shin
@minsooshin
Nov 19 2015 00:42
@PeterWRoss
<h1 id="orange-text” class="blue-text pink-text">Hello World!</h1>
oops
Peter W Ross
@PeterWRoss
Nov 19 2015 00:42
ahhhh
i remember though I think
Mason Shin
@minsooshin
Nov 19 2015 00:42
<h1 id="orange-text" class="blue-text pink-text">Hello World!</h1>
Peter W Ross
@PeterWRoss
Nov 19 2015 00:43
not quite sure I understand the theory of this yet though..
Jonathan
@jonathantimm
Nov 19 2015 00:43
@minsooshin am I on the right track?
function titleCase(str) {
  var wordArray = str.split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i].charAt(0).toUpperCase();
    wordArray[i].arr.slice([1,]).toLowerCase();
  }


  return str;
}
Mason Shin
@minsooshin
Nov 19 2015 00:43
@jonathantimm I would like make it lower case first
but you are right on track
var wordArray = str.toLowerCase().split(‘ ‘);
I started with this to be sure all other letters are lower case at the end
var wordArray = str.toLowerCase().split(‘ ‘);
Jonathan
@jonathantimm
Nov 19 2015 00:45
oh that makes more sense
Peter W Ross
@PeterWRoss
Nov 19 2015 00:46
@minsooshin thank you
CamperBot
@camperbot
Nov 19 2015 00:46
peterwross sends brownie points to @minsooshin :sparkles: :thumbsup: :sparkles:
:star: 236 | @minsooshin | http://www.freecodecamp.com/minsooshin
Mason Shin
@minsooshin
Nov 19 2015 00:46
@PeterWRoss np
Peter W Ross
@PeterWRoss
Nov 19 2015 00:46
#orange-text {
   color:orange
 }

</style>
<h1 id="orange-text" class="blue-text pink-text">Hello World!</h1>
Jonathan
@jonathantimm
Nov 19 2015 00:46
i was really puzzled thinking about how to make the rest of the string lowercase
@minsooshin thank you
CamperBot
@camperbot
Nov 19 2015 00:46
jonathantimm sends brownie points to @minsooshin :sparkles: :thumbsup: :sparkles:
:star: 237 | @minsooshin | http://www.freecodecamp.com/minsooshin
Peter W Ross
@PeterWRoss
Nov 19 2015 00:46
this is the right answer.. but, why would you want to set up your code like that? what would be the benefit?
Why not just keep it orange?
Mason Shin
@minsooshin
Nov 19 2015 00:47
@PeterWRoss what do you mean?
Jonathan
@jonathantimm
Nov 19 2015 00:47
@PeterWRoss I think the purpose of where you are is to show you the hierarchy of css styling
Mason Shin
@minsooshin
Nov 19 2015 00:47
yes
Jonathan
@jonathantimm
Nov 19 2015 00:47
in other words, when you have two styles, which one wins?
Mason Shin
@minsooshin
Nov 19 2015 00:47
the hierarchy of styling is like this
tag name < class < id < inline
Jonathan
@jonathantimm
Nov 19 2015 00:48
you forgot !important :-)
Mason Shin
@minsooshin
Nov 19 2015 00:48
yes
I am saying that :)
Jonathan
@jonathantimm
Nov 19 2015 00:48
oh hehe
Mason Shin
@minsooshin
Nov 19 2015 00:48
thanks @jonathantimm
CamperBot
@camperbot
Nov 19 2015 00:48
minsooshin sends brownie points to @jonathantimm :sparkles: :thumbsup: :sparkles:
:star: 326 | @jonathantimm | http://www.freecodecamp.com/jonathantimm
Mason Shin
@minsooshin
Nov 19 2015 00:48
hehehe
Jonathan
@jonathantimm
Nov 19 2015 00:49
i wish brownie points gave us real brownies
Mason Shin
@minsooshin
Nov 19 2015 00:50
lol
Zeljko Sevic
@schewmeister
Nov 19 2015 00:51
hi everybody
Jonathan
@jonathantimm
Nov 19 2015 00:51
hi @schewmeister
Zeljko Sevic
@schewmeister
Nov 19 2015 00:51
@jonathantimm how is it going?
Jonathan
@jonathantimm
Nov 19 2015 00:52
slowly but surely
@minsooshin now I feel like my code is perfect but it's not working hehe
function titleCase(str) {
  var wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i].charAt(0).toUpperCase();
  }


  return str;
}
don't tell me the answer but maybe another hint?? :-)
oh wait i haven't joined them back together that's one thing
Mason Shin
@minsooshin
Nov 19 2015 00:54
you missed slice
wordArray[i].charAt(0).toUppercase() + arr[i].slice(1);
you need to append rest of the word after make first letter upper case
:)
also as you mentioned, you missed join
Zeljko Sevic
@schewmeister
Nov 19 2015 00:56
how can I make that variables are defined on multiple pages?
Peter W Ross
@PeterWRoss
Nov 19 2015 00:57
thank you @jonathantimm still not sure i totally grasp it... I do get the fact that its saying inline> id>class> tag name .. time to open up a youtube tutorial
CamperBot
@camperbot
Nov 19 2015 00:57
peterwross sends brownie points to @jonathantimm :sparkles: :thumbsup: :sparkles:
:star: 327 | @jonathantimm | http://www.freecodecamp.com/jonathantimm
Coira Ellison
@Coira
Nov 19 2015 00:59
@schewmeister i'm not sure what you mean?
Zeljko Sevic
@schewmeister
Nov 19 2015 01:01
@Coira I have two html pages, on the first I created one variable and gave it some value, but when it redirects to second pages, it doesn't recognize that variable
Coira Ellison
@Coira
Nov 19 2015 01:03
@schewmeister the html pages, do they have embedded <script> where you declare the var?
Zeljko Sevic
@schewmeister
Nov 19 2015 01:03
@Coira yes, both pages have that
RickGrimes808
@RickGrimes808
Nov 19 2015 01:03
Having trouble with commenting. It seems like I have everything right but it keeps saying be sure to delete all trailing comment tags, even though I don't have any. Here's my code: <!--uncomment-->

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>

Coira Ellison
@Coira
Nov 19 2015 01:05
@schewmeister hm, i think you won't be able to share the vars in that case, because each script will have it's own context
Zeljko Sevic
@schewmeister
Nov 19 2015 01:07
@Coira do you have any idea how can I do that?
Coira Ellison
@Coira
Nov 19 2015 01:08
@schewmeister i... have no idea. anyone else know?
Liam
@LiamOnRails
Nov 19 2015 01:08
Create a slot machine - I'm confused.
Math.floor(Math.random() * ((max + 1) - min)) + min
why isn't this working??
Peter W Ross
@PeterWRoss
Nov 19 2015 01:10
let me see if I can help you with that @RickGrimes808 lol.. im new too... but, i struggled with that yesterday
Coira Ellison
@Coira
Nov 19 2015 01:11
@schewmeister have you googled? this answer from stackoverflow suggests localstorage http://stackoverflow.com/a/21129119
Peter W Ross
@PeterWRoss
Nov 19 2015 01:12
try erasing the trail from uncomment and putting under the "<p>Hello Paragraph</p>"
Coira Ellison
@Coira
Nov 19 2015 01:12
it doesn't seem like it can be done in a straight forward manner
Peter W Ross
@PeterWRoss
Nov 19 2015 01:12
not sure if i remember that correctly @RickGrimes808
Luis Gaytan
@techiedodo
Nov 19 2015 01:13
@RickGrimes808 — anything that you want to comment goes in between the <!- - stuff to be commented - ->
Think of them like parenthesis with the stuff in between being commented out
MIN
@una720302
Nov 19 2015 01:14
Question-->Replace the value of your a element's href attribute with a #, also known as a hash symbol, to turn it into a dead link. how do you do dead link?
Bill
@kirah1314
Nov 19 2015 01:16
@una720302 href="#"
MIN
@una720302
Nov 19 2015 01:20
@kirah1314 thank you for your help and where do you put it? <style> or <p>?
CamperBot
@camperbot
Nov 19 2015 01:20
una720302 sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 337 | @kirah1314 | http://www.freecodecamp.com/kirah1314
MIN
@una720302
Nov 19 2015 01:20

I did this and didn't work. -->href="#"

<p>Click here for <a #="http://www.freecatphotoapp.com">cat photos</a>.</p>

Bill
@kirah1314
Nov 19 2015 01:21
@una720302 you put it in the anchor element a
@una720302 so change <a #="http://www.freecatphotoapp.com"> to <a href="#">
MIN
@una720302
Nov 19 2015 01:23
@kirah1314 thank you and i tried this. it worked. --> <p>Click here for <a href="#" "http://www.freecatphotoapp.com">cat photos</a>.</p>
CamperBot
@camperbot
Nov 19 2015 01:23
una720302 sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:warning: una720302 already gave kirah1314 points
Bill
@kirah1314
Nov 19 2015 01:24
@una720302 glad to help :thumbsup:
Jacob
@mcneece
Nov 19 2015 01:30
Trying to create a function that returns a random number that’s greater than or equal to a minimum and less than or equal to a maximum with javascript. any help
Joe
@JoeBello
Nov 19 2015 01:32
To whom it may concern, I may have found a bug and was instructed to bring it here before creating a github issue
Zeljko Sevic
@schewmeister
Nov 19 2015 01:33
@Coira I tried that, but it doesn't work, I am still searching for anything that could be helpful
Bill
@kirah1314
Nov 19 2015 01:36
@mcneece can you paste what you've tried?
Jacob
@mcneece
Nov 19 2015 01:37
@kirah1314 just got it figured out. but thanks
CamperBot
@camperbot
Nov 19 2015 01:37
mcneece sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 338 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Bill
@kirah1314
Nov 19 2015 01:37
@mcneece that's great!
Jonathan
@jonathantimm
Nov 19 2015 01:40
@minsooshin are you still there?
Does anyone know why you would get this error: "...is not a function"?
it's this line:
 wordArray[i].charAt(0).toUppercase();
oh crap i know
Herman Fassett
@HermanFassett
Nov 19 2015 01:44
;)
Brock Callahan
@brockc
Nov 19 2015 01:45
Thanks @skbolton
CamperBot
@camperbot
Nov 19 2015 01:45
brockc sends brownie points to @skbolton :sparkles: :thumbsup: :sparkles:
:star: 241 | @skbolton | http://www.freecodecamp.com/skbolton
Brandon
@bbensonz
Nov 19 2015 01:52
I don't understand how to "Use a CSS Class to Style an Element". Can anyone help me? It's asking me to color <h2> and I can't figure it out.
Bill
@kirah1314
Nov 19 2015 01:53
@bbensonz
h2 {
color: white;
}
Gaston Lenotre
@GLenotre
Nov 19 2015 01:53
@bbensonz start like this h2 {
Brandon
@bbensonz
Nov 19 2015 01:54
alright
Timothy Weaver
@timweaver419
Nov 19 2015 01:54
So I'm stuck on the JavaScript Slot Machine. I made the if else statements to determine if the slots were the same number to return null like the waypoint asks but it doesn't clear me. What am I doing wrong in this particular challenge?
Jonathan
@jonathantimm
Nov 19 2015 01:54
I'm really stumped and still don't get how I'm supposed to use slice in this function
function titleCase(str) {
  var wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i].charAt(0).toUpperCase();
    wordArray.join();
  }


  return wordArray.toString();
}
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 01:55
@jonathantimm you don't need slice for that
Bill
@kirah1314
Nov 19 2015 01:56
@timweaver419 can you paste what you have?
Jonathan
@jonathantimm
Nov 19 2015 01:56
@AlmightyLaxz then it's not working for some other reason - could you give me a hint of what I should fix?
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 01:57
@jonathantimm i was stuck on that one an hour ago too lol, my for loop is:
  for(var i = 0; i < newStr.length; i++) {
    if(newStr.charAt(i) == " ") {
      var x = newStr.split("");
      x[i + 1] = x[i + 1].toUpperCase();
      x = x.join("");
      newStr = x;
    }
Will Kavanagh
@wKavey
Nov 19 2015 01:57
Hey - im stuck on the waypoint where you need to make the 2nd child of an element bounce.
This is my current code:
$(".well:nth-child(2)").addClass("animated bounce");
Brandon
@bbensonz
Nov 19 2015 01:57
@GLenotre Then what
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 01:57
@jonathantimm it turns letters after space into uppercase
Timothy Weaver
@timweaver419
Nov 19 2015 01:58
if (slotOne === slotTwo && slotTwo === slotThree) {return null;}
Will Kavanagh
@wKavey
Nov 19 2015 01:58
but it makes the entire well bounce and not the 2nd child
Jonathan
@jonathantimm
Nov 19 2015 02:00
@AlmightyLaxz hmm that's totally different from what i'm doing!
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:00
@jonathantimm yeah, i'm not sure there's one 'right way' to complete it, but that's just what i've come up with
Jonathan
@jonathantimm
Nov 19 2015 02:00
yours is confusing me haha
can you tell why mine isn't working by any chance?
Karolis
@Luomint
Nov 19 2015 02:01
help
CamperBot
@camperbot
Nov 19 2015 02:01

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

Basic Commands:

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

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Karolis
@Luomint
Nov 19 2015 02:01
find twitch
Karolis
@Luomint
Nov 19 2015 02:02
zipline twitch
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:02
@jonathantimm looking at yours i can't tell why it wouldn't work for at least the first string objective
Jonathan
@jonathantimm
Nov 19 2015 02:02
@AlmightyLaxz well thank you for trying
CamperBot
@camperbot
Nov 19 2015 02:02
jonathantimm sends brownie points to @almightylaxz :sparkles: :thumbsup: :sparkles:
:star: 195 | @almightylaxz | http://www.freecodecamp.com/almightylaxz
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:03
@jonathantimm all good, it's a tough one
Bill
@kirah1314
Nov 19 2015 02:04
@timweaver419 you have to return one of the variables instead of null
@timweaver419 the instruction says to return the number and the number is saved as the variables
@wKavey try adding a space after well
Jonathan
@jonathantimm
Nov 19 2015 02:08
@AlmightyLaxz i'm getting closer
Bill
@kirah1314
Nov 19 2015 02:09
@jonathantimm join() already turns an array into string so won't need toString(), your join(' ') should be outside of the loop
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:09
@jonathantimm cool, you'll probably need an if statement in your for loop to check if a character that isn't starting the word is capital, and if so change it to lowercase
for the last objectives
Bill
@kirah1314
Nov 19 2015 02:10
@jonathantimm and you have the first element but need the rest of the elements
Jonathan
@jonathantimm
Nov 19 2015 02:11
@AlmightyLaxz but my function starts by turning them all to lowercase
var newString; 
var wordArray;

function titleCase(str) {

  wordArray = str.toLowerCase().split(' ');
    for (var i = 0; i < wordArray.length; i++) { 
      wordArray[i].charAt(0).toUpperCase();
    }

    var newString = wordArray.join(" ");
    return newString; 

}
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:12
@jonathantimm oh right, I forgot, i was looking at what I did
Jonathan
@jonathantimm
Nov 19 2015 02:12
this is closer because it's at least working to the point of splitting them into an array, converting to lowercase, then joining it back into a string
but for some reason it's not turning the first letter to uppercase
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:12
hmm
Jonathan
@jonathantimm
Nov 19 2015 02:14
i've been working on this on and off for like two hours hah
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:15
@jonathantimm i think the problem is that the wordarray isnt actually being changed, it should look something like this
wordArray[i] = wordArray[i].charAt(0).toUpperCase();
@jonathantimm as in it's being evaluated but not assigned
Jonathan
@jonathantimm
Nov 19 2015 02:16
hmmm
so even though i'm doing toUpperCase it might not be putting that result anywhere
ah this is getting closer
AlmightyLaxz
@AlmightyLaxz
Nov 19 2015 02:16
@jonathantimm yeah
Hans van Riet
@hansinla
Nov 19 2015 02:16
@jonathantimm arrays and string are immutable, so you have to assign the result of an operation
Jonathan
@jonathantimm
Nov 19 2015 02:17
now the rest of the word is just gone, which is why i think someone was telling me to use split earlier
@hansinla thank you, that helps
CamperBot
@camperbot
Nov 19 2015 02:17
jonathantimm sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 600 | @hansinla | http://www.freecodecamp.com/hansinla
Zeljko Sevic
@schewmeister
Nov 19 2015 02:18
@Coira I solved it with passing it in url parameters, it works fine now
Mason Shin
@minsooshin
Nov 19 2015 02:26
@jonathantimm sorry I was away from my desk
Jonathan
@jonathantimm
Nov 19 2015 02:26
@minsooshin hah no need to apologize
believe it or not i'm still struggling with this one (although i also made dinner)
var newString; 
var wordArray;

function titleCase(str) {

  wordArray = str.toLowerCase().split(' ');
    for (var i = 0; i < wordArray.length; i++) { 
      wordArray[i] = wordArray[i].charAt(0).toUpperCase() + wordArray.slice(1);
    }

    var newString = wordArray.join(" ");
    return newString; 

}
so close! but it's returning a bunch of nonsense
Mason Shin
@minsooshin
Nov 19 2015 02:28
basically, you don’t need to define variable out of the function scope
Jonathan
@jonathantimm
Nov 19 2015 02:29
okay
Mysterical Cheesecake
@MysticalCheesecake
Nov 19 2015 02:29
I have no idea how to do the lastName length lesson. Totally new to all this
Mason Shin
@minsooshin
Nov 19 2015 02:29
function titleCase(str) {

  wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i] = wordArray[i].charAt(0).toUpperCase() + wordArray.slice(1);
   }
   return wardArray.join(‘ ‘); 
}
Jonathan
@jonathantimm
Nov 19 2015 02:31
does that work for you? it doesn't for me
it makes more sense and gets rid of my unnecessary stuff but still returns a jumbled version of the string
@MysticalCheesecake which one is that?
Manish Giri
@Manish-Giri
Nov 19 2015 02:33
@jonathantimm look at what you're doing in the for loop. That'll help
Mason Shin
@minsooshin
Nov 19 2015 02:37
oh...
I got it
you don’t use [i] on the slice aprt
part
function titleCase(str) {

  var wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i] = wordArray[i].charAt(0).toUpperCase() + wordArray[i].slice(1);
  }
  return wardArray.join(‘ ‘); 
}
Jonathan
@jonathantimm
Nov 19 2015 02:38
@Manish-Giri @minsooshin I just got it too!
When you said that I figured it out and came back and you had said it, @minsooshin
wow!!
It works!!!
Mason Shin
@minsooshin
Nov 19 2015 02:38
function titleCase(str) {

  var wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i] = wordArray[i].charAt(0).toUpperCase() + wordArray[i].slice(1);
  }
  return wardArray.join(‘ ‘); 
}
great
my code posting is weird
hahaha
Jonathan
@jonathantimm
Nov 19 2015 02:38
yeah that's strange
okay here's a more important question
Mason Shin
@minsooshin
Nov 19 2015 02:39
I am use specific language for code block
Jonathan
@jonathantimm
Nov 19 2015 02:39
when this happens, when it takes me a million tries and a bunch of help to finally get a bonfire, is that ok??
CamperBot
@camperbot
Nov 19 2015 02:39
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Rex Schrader
@SaintPeter
Nov 19 2015 02:39
@minsooshin if you do ```js it may display better
function titleCase(str) {

  var wordArray = str.toLowerCase().split(' ');
  for (var i = 0; i < wordArray.length; i++) { 
    wordArray[i] = wordArray[i].charAt(0).toUpperCase() + wordArray[i].slice(1);
  }
  return wardArray.join(‘ ‘); 
}
Mason Shin
@minsooshin
Nov 19 2015 02:39
```javascript
Jonathan
@jonathantimm
Nov 19 2015 02:39
i'm worried that i'm only squeaking by but really am not going to get it
Mason Shin
@minsooshin
Nov 19 2015 02:39
I am doing this
Rex Schrader
@SaintPeter
Nov 19 2015 02:39
@minsooshin See above for ```js
Mason Shin
@minsooshin
Nov 19 2015 02:39
yes
same
js and javascript are same basically
github markdown :)
thanks @SaintPeter
CamperBot
@camperbot
Nov 19 2015 02:40
minsooshin sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1578 | @saintpeter | http://www.freecodecamp.com/saintpeter
Peter W Ross
@PeterWRoss
Nov 19 2015 02:41
  <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive">

 <button> class=btn>Like</button>
Mason Shin
@minsooshin
Nov 19 2015 02:41
I guess the reason my code looks weird is I just copied code block above and paste to outer code block :)
Peter W Ross
@PeterWRoss
Nov 19 2015 02:41
Create a new button element below your large kitten photo. Give it the class btn and the text of "Like".
Create a new button element with the text "Like".
Your new button should have the class btn.
Make sure all your button elements have a closing tag.
oh shnap
hold up
Manish Giri
@Manish-Giri
Nov 19 2015 02:41
@jonathantimm just try to visualize the little things going on inside your loops. In your case, it was this:
wordArray[i].slice(1);
Peter W Ross
@PeterWRoss
Nov 19 2015 02:41
<button class="btn">Like</button>
thank you @peterWRoss
CamperBot
@camperbot
Nov 19 2015 02:41
sorry peterwross, you can't send brownie points to yourself! :sparkles: :sparkles:
Peter W Ross
@PeterWRoss
Nov 19 2015 02:42
lol
Mason Shin
@minsooshin
Nov 19 2015 02:42
lol
nice try
Freeze
@waterCold
Nov 19 2015 02:42
$(".target:nth-child(3)").addClass("bounce");
The second element in your target elements should bounce.
and this cannot pass
```
$(".target:nth-child(3)").addClass("bounce");
Bill
@kirah1314
Nov 19 2015 02:45
@waterCold which waypoint is this?
Freeze
@waterCold
Nov 19 2015 02:45
jQuery:15
h4r1m4u
@h4r1m4u
Nov 19 2015 02:48
@waterCold if it's a 2nd element that should bounce, why are you using nth-child(3)?
Manish Giri
@Manish-Giri
Nov 19 2015 02:48
@waterCold remember CSS selectors are not zero based, unlike JS
@waterCold everything starts from 1, so your second element is nth-child(2)
Bill
@kirah1314
Nov 19 2015 02:49
@waterCold the instructions:

Here's how you would give the third element in each well bounce:

$(".target:nth-child(3)").addClass("animated bounce");

Make the second child in each of your well elements bounce. You must target the children of element with the target class.

@waterCold you have to add animated also
Freeze
@waterCold
Nov 19 2015 02:50
$(".target:nth-child(2)").addClass("bounce");
it is wrong same as
h4r1m4u
@h4r1m4u
Nov 19 2015 02:51
@waterCold "Make the second child in each of your WELL elements bounce." well elements, not target
Freeze
@waterCold
Nov 19 2015 02:52
i cannot understand what do you mean
$(".target:nth-child(2)").addClass("animated bounce");
but this is right
h4r1m4u
@h4r1m4u
Nov 19 2015 02:52
@waterCold you're supposed to add the bounce class to elements with class well, not target
Freeze
@waterCold
Nov 19 2015 02:53
is it bug ?
h4r1m4u
@h4r1m4u
Nov 19 2015 02:53
nope. your code is not right
you need to adjust the selector
Mason Shin
@minsooshin
Nov 19 2015 02:53
@waterCold is the exercise for add class for all even element?
Mason Shin
@minsooshin
Nov 19 2015 02:55
code looks fine, tho
:nth-child should be applied to .target element
that is correct
if you apply it to .well it will change 2nd .well
@waterCold could you post your code?
Bill
@kirah1314
Nov 19 2015 02:58
strange, the codes are appearing on the top of the right phone screen and the codes are white color
Freeze
@waterCold
Nov 19 2015 02:59
there say"Make the second child in each of your well elements bounce. You must target the children of element with the target class."
and my code
Alexander Estupinan
@Stupkid1025
Nov 19 2015 02:59

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

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

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

how do i make the p element red
and class have red text as
well
Freeze
@waterCold
Nov 19 2015 02:59
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#target1").parent().css("background-color", "red");
    $("#right-well").children().css("color", "green");
    $(".target:nth-child(2)").addClass("animated bounce");
  });
</script>
Mason Shin
@minsooshin
Nov 19 2015 03:00
what is the output?
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:00
CSS class
Freeze
@waterCold
Nov 19 2015 03:00
<p class="red-text">
@Stupkid1025
Bill
@kirah1314
Nov 19 2015 03:00
@waterCold i suggest to skip this for now...
Mason Shin
@minsooshin
Nov 19 2015 03:01
@Stupkid1025 how did you make your <h2> red?
Freeze
@waterCold
Nov 19 2015 03:01
it is right now
Mason Shin
@minsooshin
Nov 19 2015 03:01
same as that
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:01
<h2 class="red-text">CatPhotoApp</h2>
same as this
?
Mason Shin
@minsooshin
Nov 19 2015 03:01
yes
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:01
ok got it thank you
Bill
@kirah1314
Nov 19 2015 03:04
@waterCold @minsooshin ok I figured it out, you have to move that code inside of <script>
Peter W Ross
@PeterWRoss
Nov 19 2015 03:07

Your buttons should all be nested within the same div element with the class row.

Each of your Bootstrap buttons should be nested within its own div element with the class col-xs-4.

Make sure each of your button elements has a closing tag.

Make sure each of your div elements has a closing tag.

I am missing a closing tag for the div element. any body see it?

<div class="container-fluid">
  <h2 class="red-text text-center">CatPhotoApp</h2>

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

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

  <img src="http://bit.ly/fcc-running-cats" class="img-responsive"></div>
 <div class="row col-xs-4">
   <button class="btn btn-block btn-primary">Like</button></div>
<div class="row col-xs-4"> <button class="btn btn-block btn-info">Info</button></div>
<div class="row col-xs-4"><button class="btn btn-block btn-danger">Delete</button></div>
DJ
@qualitymanifest
Nov 19 2015 03:09
@PeterWRoss columns get nested inside a row. you don't want to add row to each column class
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:10
for font size of an element how do i give an element for the p tag of 16 px
DJ
@qualitymanifest
Nov 19 2015 03:10
<div class="row">
  <div class="col.....></div>
  <div class="col.....></div>
  <div class="col.....></div>
</div>
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:10
h1 {
font-sized:30px;
}
same as this
this but just for p class
tag
i mean
DJ
@qualitymanifest
Nov 19 2015 03:11
font-size not font-sized
otherwise, yes
Jonathan
@jonathantimm
Nov 19 2015 03:11
@minsooshin @Manish-Giri again thanks so much you guys
CamperBot
@camperbot
Nov 19 2015 03:11
jonathantimm sends brownie points to @minsooshin and @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 221 | @manish-giri | http://www.freecodecamp.com/manish-giri
:star: 238 | @minsooshin | http://www.freecodecamp.com/minsooshin
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:12
@minsooshin thank you
CamperBot
@camperbot
Nov 19 2015 03:12
stupkid1025 sends brownie points to @minsooshin :sparkles: :thumbsup: :sparkles:
:star: 239 | @minsooshin | http://www.freecodecamp.com/minsooshin
Molly Eichar
@terra-bites
Nov 19 2015 03:13
It helps me a lot to have definitions as well as examples. Can someone define "constructor" for me, please?
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:14
how can i specifically changed the element for just p
Molly Eichar
@terra-bites
Nov 19 2015 03:14
which waypoint?
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:14
font
size
of an element
Hans van Riet
@hansinla
Nov 19 2015 03:15
@Stupkid1025
p{
//do something with font size
}
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:15
thank you @hansinla
CamperBot
@camperbot
Nov 19 2015 03:15
stupkid1025 sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 601 | @hansinla | http://www.freecodecamp.com/hansinla
Manish Giri
@Manish-Giri
Nov 19 2015 03:15
@terra-bites for the JS point of view, constructor is a function you use to create objects from a (similar) type of existing object
Molly Eichar
@terra-bites
Nov 19 2015 03:16
@Manish-Giri Thank you. That helps.
CamperBot
@camperbot
Nov 19 2015 03:16
terra-bites sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 222 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Nov 19 2015 03:16
@terra-bites
function Car(wheels, color, make) {
this.wheels = wheels;
this.color = color;
this.make = make;
}
var ford = new Car(4, "red", "Ford");
just a random example. Car is the constructor(function constructor) you use to make objects of type car. In JS, functions are first-class objects, so Car is technically also an object.
Peter W Ross
@PeterWRoss
Nov 19 2015 03:18
@qualitymanifest Sweet thanks
CamperBot
@camperbot
Nov 19 2015 03:18
peterwross sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 392 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Peter W Ross
@PeterWRoss
Nov 19 2015 03:18
Let me ask you this though.. Just out of curiousity.
<div class="row">
   <div class="col-xs-4"><button class="btn btn-block  btn-primary">Like</button></div>
  <div class="col-xs-4"><button class="btn btn-block btn-info">Info</button></div>
  <div class="col-xs-4"><button class="btn btn-block btn-danger">Delete</button></div>
Molly Eichar
@terra-bites
Nov 19 2015 03:19
@Manish-Giri is "this" randomly chosen? Could it equally be "that"? or does "this" have a special function/job/role?
Peter W Ross
@PeterWRoss
Nov 19 2015 03:19
does the code have to be indented neatly flush together when nested? What is correct format
Stephen Bolton
@skbolton
Nov 19 2015 03:20
@PeterWRoss html will ignore whitespace but it is easier to look at when properly indented
Manish Giri
@Manish-Giri
Nov 19 2015 03:20
@terra-bites this is a special keyword in JS, you use it to refer to the current object. Take a look at the link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this
Stephen Bolton
@skbolton
Nov 19 2015 03:20
@PeterWRoss you can see which elements are children of others when you indent properly and down the road that is super useful
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:21
@hansinla urg i can't get passed this its kill me
Hans van Riet
@hansinla
Nov 19 2015 03:21
@Stupkid1025 show all of your code
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:21
i need to give element font size to the p tag of 16 px
pk

h1 {
font-sized:30px;
}

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

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

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

DJ
@qualitymanifest
Nov 19 2015 03:21
This message was deleted
Molly Eichar
@terra-bites
Nov 19 2015 03:21
@Manish-Giri Thank you! I see that "this" refers to a new object being created.
CamperBot
@camperbot
Nov 19 2015 03:21
terra-bites sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: terra-bites already gave manish-giri points
Stephen Bolton
@skbolton
Nov 19 2015 03:22
@Stupkid1025 you need to give all p tags a font size of 16px?
DJ
@qualitymanifest
Nov 19 2015 03:22
@Stupkid1025 it's font-size not font-sized, and you have CSS above your opening <style> tag
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:22
yup
Manish Giri
@Manish-Giri
Nov 19 2015 03:22
@terra-bites yes!! In the example I gave above, this refers to the object being created (and returned) through the use of new Car
DJ
@qualitymanifest
Nov 19 2015 03:22
@Stupkid1025 you just basically need to do what you did with h2
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:24
<p>{font-size:16px;}? @qualitymanifest
Peter W Ross
@PeterWRoss
Nov 19 2015 03:25
thanks @skbolton
CamperBot
@camperbot
Nov 19 2015 03:25
peterwross sends brownie points to @skbolton :sparkles: :thumbsup: :sparkles:
:star: 242 | @skbolton | http://www.freecodecamp.com/skbolton
DJ
@qualitymanifest
Nov 19 2015 03:25
@Stupkid1025 without the brackets around p, and put it up inside your <style> tags
Stephen Bolton
@skbolton
Nov 19 2015 03:25
@qualitymanifest thanks
CamperBot
@camperbot
Nov 19 2015 03:25
skbolton sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 393 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Pranav Doshi
@pranavdoshi
Nov 19 2015 03:26
wassup guys good morning
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:27
<style> p font-size:16px?
DJ
@qualitymanifest
Nov 19 2015 03:27
@Stupkid1025 you were closer with your last idea. just do what you did before with p instead of <p>
Pranav Doshi
@pranavdoshi
Nov 19 2015 03:27
@Stupkid1025 wat prob facing?
Joshua Abu
@Absolutestunna
Nov 19 2015 03:30
This message was deleted
This message was deleted
Jonathan
@jonathantimm
Nov 19 2015 03:32
Do you guys feel like if we finish a challenge but struggled and needed help along the way, we should still move on? should we be expected to feel a little shaky even as we move through the bonfires?
CamperBot
@camperbot
Nov 19 2015 03:32
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Joshua Abu
@Absolutestunna
Nov 19 2015 03:34
@jonathantimm did you find the solution on your own or with help?
Jonathan
@jonathantimm
Nov 19 2015 03:35
i found the solution on my own but it was only after people gave me hints, like "look at your loop," etc
@Absolutestunna
DJ
@qualitymanifest
Nov 19 2015 03:38
@jonathantimm keep moving. maybe go back to the bonfi re you had trouble with, a day or two later, and try to solve it again 100% on your own. also it helps if you get in the habit of using console.log() to see what is happening in your code
Joshua Abu
@Absolutestunna
Nov 19 2015 03:38
@jonathantimm ahh..I'll say study your solution and recreate it again. Also partner with someone else that may have done it to show you a different way to do it
Jonathan
@jonathantimm
Nov 19 2015 03:38
@qualitymanifest @Absolutestunna those are good ideas. thanks guys
CamperBot
@camperbot
Nov 19 2015 03:38
jonathantimm sends brownie points to @qualitymanifest and @absolutestunna :sparkles: :thumbsup: :sparkles:
Joshua Abu
@Absolutestunna
Nov 19 2015 03:38
@jonathantimm But you can go ahead, move on and come back to it later
CamperBot
@camperbot
Nov 19 2015 03:38
:star: 394 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 329 | @absolutestunna | http://www.freecodecamp.com/absolutestunna
Joshua Abu
@Absolutestunna
Nov 19 2015 03:39
@jonathantimm I recommend using pythontutor.com. It'll break down your code and show you how it's working under the hood so to speak
give it a try
Matt Leonard
@matty22
Nov 19 2015 03:39

Hmm...I've run into an interesting issue in the Random Quote Generator zipline. When sharing my random quote as a tweet, if my quote has a semi-colon in it, it kills that line of JS and cuts off the end of the quote
Here's the line of JS that's writing that to Twitter.

document.getElementById("twitterButton").href = "https://twitter.com/intent/tweet?text=" + quoteArray[randomNumber][0];

But a quote with a ; in the middle of it ends it and the quote gets cut off?

document.getElementById("twitterButton").href = "https://twitter.com/intent/tweet?text=" + quoteArray[randomNumber][0];
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:41
@PeterWRoss

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

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

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

this is the code and i am trying
to set the p elements to 16 px
i understand
i need to put
them inside the style tag
but i am and its not working
i understand that this is the format h1 {font-size:16px;}
Jonathan
@jonathantimm
Nov 19 2015 03:42
@Absolutestunna thanks! that's really cool
CamperBot
@camperbot
Nov 19 2015 03:42
:warning: jonathantimm already gave absolutestunna points
jonathantimm sends brownie points to @absolutestunna :sparkles: :thumbsup: :sparkles:
Hans van Riet
@hansinla
Nov 19 2015 03:42
@Stupkid1025 I don’t see it in your code and you have a mistake in your second <p>
sunnysky906
@sunnysky906
Nov 19 2015 03:46
Hello everyone, i'm stuck on basic javascript portion where i'm trying to get the length of the lastname
I believe it should be, lastName.length
Freeze
@waterCold
Nov 19 2015 03:46
var ourDecimal = 10.1;
it cannot pass,10.1 is not a decimal point number?
sunnysky906
@sunnysky906
Nov 19 2015 03:46
but it's not working, maybe it's a bug?
Hans van Riet
@hansinla
Nov 19 2015 03:46
@sunnysky906 show you complete code
Pranav Doshi
@pranavdoshi
Nov 19 2015 03:46
@Stupkid1025 u forgot to add class name check ur code again.
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:49
<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>
does it go in here
sunnysky906
@sunnysky906
Nov 19 2015 03:49

var firstNameLength = 0;
var lastNameLength = 0;
var firstName = "Ada";

firstNameLength = firstName.length;

var lastName = "Lovelace";

// Only change code below this line.

lastNameLength = lastName;

// Only change code above this line.

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

Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:49
where do i add it after red -text?
Hans van Riet
@hansinla
Nov 19 2015 03:50
@sunnysky906 you see how the function .length is used in firstNameLength = firstName.length; ? The same way you do it in lastNameLength = lastName;
sunnysky906
@sunnysky906
Nov 19 2015 03:53
@hansinla ahhhhh. got it. thanks
CamperBot
@camperbot
Nov 19 2015 03:53
sunnysky906 sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 602 | @hansinla | http://www.freecodecamp.com/hansinla
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:54
<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>
where do i add the font size for the p element
in this code

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

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

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

to does it go somethere
else
Hans van Riet
@hansinla
Nov 19 2015 03:56
@Stupkid1025
p{
//do something with font size
}
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:56
where do i add that on the top
@hansinla
Hans van Riet
@hansinla
Nov 19 2015 03:57
@Stupkid1025 between the style tags
Alexander Estupinan
@Stupkid1025
Nov 19 2015 03:58
<style>
.red-text {color:red;}
</style>
?
@hansinla
does it go after the color
or before
Hans van Riet
@hansinla
Nov 19 2015 03:59
@Stupkid1025 doesn’t matter
Alexander Estupinan
@Stupkid1025
Nov 19 2015 04:00
last question the format would look like this p{font-size: 16px;}?
@hansinla
Hans van Riet
@hansinla
Nov 19 2015 04:00
yes
Alexander Estupinan
@Stupkid1025
Nov 19 2015 04:00
thank you @hansinla
CamperBot
@camperbot
Nov 19 2015 04:00
stupkid1025 sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:warning: stupkid1025 already gave hansinla points
Pranav Doshi
@pranavdoshi
Nov 19 2015 04:04
@Stupkid1025 now proper.
Peter W Ross
@PeterWRoss
Nov 19 2015 04:12
<div class="row">
    <form action="/submit-cat-photo">
<div class="col-xs-6"><label><input type="radio"       name="indoor-outdoor">Indoor</label></div>

<div class="col-xs-6"><label><input type="radio" name="indoor-outdoor">Outdoor</label></div>

<div class="col-xs-6"><label><input type="checkbox" name="personality">Loving</label></div>

<div class="col-xs-6"><label><input type="checkbox" name="personality">Lazy</label></div>

 <div class="col-xs-6"><label><input type="checkbox" name="personality">Crazy</label></div>

<input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form></div>
so lost
Nest all of your radio buttons within a <div class="row"> element. Then nest each of them within a <div class="col-xs-6"> element.
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
Hans van Riet
@hansinla
Nov 19 2015 04:14
@PeterWRoss overtime you nest an element you put an opening an closing element around it
<div>
//nested element
</div>
Peter W Ross
@PeterWRoss
Nov 19 2015 04:17
Delirium is starting to settle in
lol
@hansinla could you just give me the cheaters version and ill make sure to put it in my notes? lol
<div> class="row">
  <form action="/submit-cat-photo">
<div class="col-xs-6"><label><input type="radio"       name="indoor-outdoor">Indoor</label></div>

<div class="col-xs-6"><label><input type="radio" name="indoor-outdoor">Outdoor</label></div>

<div class="col-xs-6"><label><input type="checkbox" name="personality">Loving</label></div>

<div class="col-xs-6"><label><input type="checkbox" name="personality">Lazy</label></div>

 <div class="col-xs-6"><label><input type="checkbox" name="personality">Crazy</label></div>

<input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form></div>
are you saying... <div> class="row"> <form action="/submit-cat-photo"></div>
then repeated?
Manish Giri
@Manish-Giri
Nov 19 2015 04:21
@PeterWRoss I think there's something wrong with your col-xs-* code
Not sure what the question is, but every Bootstrap row has 12 columns.
Peter W Ross
@PeterWRoss
Nov 19 2015 04:22

ou can use Bootstrap's col-xs-* classes on form elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.

Nest all of your radio buttons within a <div class="row"> element. Then nest each of them within a <div class="col-xs-6"> element.
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.
Make sure each of your div elements has a closing tag.

Pranav Doshi
@pranavdoshi
Nov 19 2015 04:22
hey guys in bonfire truncate a string
i didnt get where we have to truncate
Manish Giri
@Manish-Giri
Nov 19 2015 04:25
@PeterWRoss so, the question asks you to nest two <radio> input elements, each in a col-xs-6 class. That way, you have 2 elements, each spanning 6 columns, totalling 12 columns which is equal to 1 row in BS
Peter W Ross
@PeterWRoss
Nov 19 2015 04:26
What does soemthing liek that look like @Manish-Giri
Manish Giri
@Manish-Giri
Nov 19 2015 04:26
the code for your <radio> input elements is okay, just remove the col-xs-6 from the checkbox input elements. I believe in the next step, you'll nest the three checkbox elements in col-xs-4 each
Peter W Ross
@PeterWRoss
Nov 19 2015 04:26
@Manish-Giri thank you by the way
CamperBot
@camperbot
Nov 19 2015 04:26
peterwross sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 223 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Nov 19 2015 04:27
<div> class="row">
  <form action="/submit-cat-photo">
<div class="col-xs-6"><label><input type="radio"       name="indoor-outdoor">Indoor</label></div>

<div class="col-xs-6"><label><input type="radio" name="indoor-outdoor">Outdoor</label>
</div>
</div>
@PeterWRoss think this should work..
as a general suggestion, try to have your opening and closing<div> elements in separate lines, and then nest child elements between them. That helps with the overall document structure.
Peter W Ross
@PeterWRoss
Nov 19 2015 04:33
Totally not absorbing this anymore.. **Bangs head... lol.. Its been 10 hours .. maybe i should turn it in
@Manish-Giri ... that answer did not help :(
Manish Giri
@Manish-Giri
Nov 19 2015 04:34
@PeterWRoss send the link to the question
http://www.freecodecamp.com/challenges/waypoint-responsively-style-radio-buttons?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20h2%20{%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20}%0A%0A%20%20.thick-green-border%20{%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20}%0A%3C%2Fstyle%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-8%22%3E%0A%20%20%20%20%20%20%3Ch2%20class%3D%22text-primary%20text-center%22%3ECatPhotoApp%3C%2Fh2%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22img-responsive%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cimg%20src%3D%22http%3A%2F%2Fbit.ly%2Ffcc-running-cats%22%20class%3D%22img-responsive%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-primary%22%3E%3Ci%20class%3D%22fa%20fa-thumbs-up%22%3E%3C%2Fi%3E%20Like%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-info%22%3E%3Ci%20class%3D%22fa%20fa-info-circle%22%3E%3C%2Fi%3E%20Info%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-danger%22%3E%3Ci%20class%3D%22fa%20fa-trash%22%3E%3C%2Fi%3E%20Delete%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cp%3EThings%20cats%20%3Cspan%20class%3D%22text-danger%22%3Elove%3A%3C%2Fspan%3E%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%20%20%0A%3Cdiv%3E%20class%3D%22row%22%3E%0A%3Cform%3E%20action%3D%22%2Fsubmit-cat-photo%22%3E%0A%3Cdiv%20class%3D%22col-xs-6%22%3E%3Clabel%3E%3Cinput%20type%3D%22radio%22%20%20%20%20%20%20%20name%3D%22indoor-outdoor%22%3EIndoor%3C%2Flabel%3E%3C%2Fdiv%3E%0A%0A%3Cdiv%20class%3D%22col-xs-6%22%3E%3Clabel%3E%3Cinput%20type%3D%22radio%22%20%20%20%20name%3D%22indoor-outdoor%22%3EOutdoor%3C%2Flabel%3E%3C%2Fdiv%3E%0A%0A%3Cdiv%20class%3D%22col-xs-4%22%3E%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3ELoving%3C%2Flabel%3E%3C%2Fdiv%3E%0A%0A%3Cdiv%20class%3D%22col-xs-4%22%3E%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3ELazy%3C%2Flabel%3E%3C%2Fdiv%3E%0A%0A%20%3Cdiv%20class%3D%22col-xs-4%22%3E%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3ECrazy%3C%2Flabel%3E%3C%2Fdiv%3E%0A%20%20%20%20%0A%3Cinput%20type%3D%22text%22%20placeholder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%20%20%3C%2Fform%3E%3C%2Fdiv%3E%0A
I think that one has the code in it
Alexander Estupinan
@Stupkid1025
Nov 19 2015 04:35
i need to put lobster font-family into my h2 element how do i go about this
<h2 class="red-text">CatPhotoApp</h2>
this is the entire code

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

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

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

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

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

MIN
@una720302
Nov 19 2015 04:37
Question:Set the placeholder value of your text input to "cat photo URL". my code: <input type="text" placeholder="this is placeholder text">
i am right at--> Add a placeholder attribute text input element.
But not this==>Set the value of your placeholder attribute to "cat photo URL"
Alexander Estupinan
@Stupkid1025
Nov 19 2015 04:38
nvm i got it
Peter W Ross
@PeterWRoss
Nov 19 2015 04:39
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
 action="/submit-cat-photo"></form>
i think... @una720302 ... forgive me if im wrong.. only a day old in this
@Stupkid1025
<style>
  }

  h2 {
    font-family: Lobster, Monospace;
  }

</style>
Manish Giri
@Manish-Giri
Nov 19 2015 04:42
@PeterWRoss did you get it right
DeMarc Johnson
@demarcj
Nov 19 2015 04:44
Hello everyone, I got a question. I've been working on this filter arrays challenge and I'd got stuck. I wondering could someone give me some feedback.

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

// Only change code below this line.

var newArray = oldArray;

newArray.filter(function(val){
return val <= 5;
});

// Only change code above this line.

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

Peter W Ross
@PeterWRoss
Nov 19 2015 04:44
no @Manish-Giri ... i think i need to quit for the day and try and again tomorrow with a fresh brain
thanks again
Alexander Estupinan
@Stupkid1025
Nov 19 2015 04:46

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

it asking me to comment out lobster font by adding <!--
in front of it
but I'm having trouble closing
it out
DeMarc Johnson
@demarcj
Nov 19 2015 04:48
close it out with
-->
MIN
@una720302
Nov 19 2015 04:51
@PeterWRoss Thank you so much for your help but it is still not right.
CamperBot
@camperbot
Nov 19 2015 04:51
una720302 sends brownie points to @peterwross :sparkles: :thumbsup: :sparkles:
:star: 89 | @peterwross | http://www.freecodecamp.com/peterwross
MIN
@una720302
Nov 19 2015 04:51
Question:Set the placeholder value of your text input to "cat photo URL". my code: <input type="text" placeholder="this is placeholder text">
i am right at--> Add a placeholder attribute text input element.
But not this==>Set the value of your placeholder attribute to "cat photo URL"
codeNameJKB
@codeNameJKB
Nov 19 2015 04:53
MIN
@una720302
Nov 19 2015 04:53
i got it thanks
codeNameJKB
@codeNameJKB
Nov 19 2015 04:54
you're welcome :smile: :+1:
DeMarc Johnson
@demarcj
Nov 19 2015 04:55
Never mind, just figured it out. It took me awhile though.
Now on to my first Bonfire, Whoo hoo!!!!!!
Vinamra
@iambali
Nov 19 2015 05:01
<a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a>
  <a><img class ="image-responsive thick-green-border"src ="http://bit.ly/fcc-running-cats"></a>
my 2nd image should be below 1st am i doing something wrong cause it is not showing green tick
Alexander Estupinan
@Stupkid1025
Nov 19 2015 05:02

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

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

h2 {
font-family: Lobster, Monospace;
}

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

</style>

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

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

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

where do i put the
formate
to change the width
of the pic
i am putting
between
the styles
tag and no luck
Vinamra
@iambali
Nov 19 2015 05:03
u want to change the borders width
Alexander Estupinan
@Stupkid1025
Nov 19 2015 05:04
i want to do this
.smaller-image{width:100px;}
Soulerik
@Soulerik
Nov 19 2015 05:04
@iambali assign some class to <img> and use this class
Alexander Estupinan
@Stupkid1025
Nov 19 2015 05:05
how can i assign a class to img
<img>
Lev Izraelit
@lizraeli
Nov 19 2015 05:06
<img class="..." src="...">
Peter W Ross
@PeterWRoss
Nov 19 2015 05:06
  <form action="/submit-cat-photo">
    <div class="row">
        <div class="col-xs-6"><label><input type="radio" name="indoor-outdoor"> Indoor</label></div>
        <div class="col-xs-6"><label><input type="radio" name="indoor-outdoor"> Outdoor</label></div>
        <div class="col-xs-6"><label><input   type="checkbox" name="personality"> Loving</label></div>    
        <div class="col-xs-6"><label><input type="checkbox" name="personality"> Lazy</label></div>
        <div class="col-xs-6"><label><input type="checkbox" name="personality"> Crazy</label></div>
</div>
Pranav Doshi
@pranavdoshi
Nov 19 2015 05:06
Hey can anyone helpme on truncate string bonfire
CamperBot
@camperbot
Nov 19 2015 05:06
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Peter W Ross
@PeterWRoss
Nov 19 2015 05:06
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.
Make sure each of your div elements has a closing tag.
Pranav Doshi
@pranavdoshi
Nov 19 2015 05:06
bonfire truncate a string
CamperBot
@camperbot
Nov 19 2015 05:06

:fire:Bonfire: Truncate a string :link:

function truncate(str, num) {
  // Clear out that junk in your trunk
  return str;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);

Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.

more info:  bf details | bf links | hint

Pranav Doshi
@pranavdoshi
Nov 19 2015 05:06
hint
CamperBot
@camperbot
Nov 19 2015 05:06
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Vinamra
@iambali
Nov 19 2015 05:06
but i am already doing tat
Peter W Ross
@PeterWRoss
Nov 19 2015 05:07
Wish I could help you
Vinamra
@iambali
Nov 19 2015 05:07
@Soulerik
Soulerik
@Soulerik
Nov 19 2015 05:07
@iambali ?
Vinamra
@iambali
Nov 19 2015 05:07
i am using image responsive class
Soulerik
@Soulerik
Nov 19 2015 05:07
<img class ="x"> x: {width: 100px;} @iambali
assign this class to <img>
Clear now? @iambali
Boris
@boris-in-london
Nov 19 2015 05:09
@iambali your code looks good, but the spacing is a bit off, notice how scr is red in your firt anchor element, but not the second, and the space inbetween your class attributes. Maybe that is the issue.
Pranav Doshi
@pranavdoshi
Nov 19 2015 05:10
can anyone help me on truncate string
function truncate(str, num) {
  // Clear out that junk in your trunk

    if(str.length>num)
    {
         return (str.slice(0,(num-3)) + "...");

    }
  else{
    return str;
  }  
}
truncate("A-tisket a-tasket A green and yellow basket", 11);
Vinamra
@iambali
Nov 19 2015 05:11
nope no such luck @boris-in-london i tried that
Pranav Doshi
@pranavdoshi
Nov 19 2015 05:11
cant get two test case pass
Peter W Ross
@PeterWRoss
Nov 19 2015 05:12
Took me forever, but i finally figured this one out..
  <div class="row">
        <div class="col-xs-6"><label><input type="radio" name="indoor-outdoor"> Indoor</label></div>
        <div class="col-xs-6"><label><input type="radio" name="indoor-outdoor"> Outdoor</label></div>
        <div class="col-xs-6"><label><input   type="checkbox" name="personality"> Loving</label></div>    
        <div class="col-xs-6"><label><input type="checkbox" name="personality"> Lazy</label></div>
        <div class="col-xs-6"><label><input type="checkbox" name="personality"> Crazy</label></div>
</div>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  </form></div>
Boris
@boris-in-london
Nov 19 2015 05:13
@iambali which waypoint is it? i'll give it a try.
Vinamra
@iambali
Nov 19 2015 05:14
@boris-in-london 2nd waypoint of responsive design
@boris-in-london i did it btw
Boris
@boris-in-london
Nov 19 2015 05:20
@iambali good job, seems only one anchor element is necessary yes?
isholatosin
@isholatosin
Nov 19 2015 05:24

Waypoint: Target the same element with multiple jQuery Selectors

<script>
$(document).ready(function() {
$("button").addClass(" animated");
$(".btn").addClass(" shake");
$("#target1").addClass(" btn-primary");
});
</script>

Hey guys I have a problem. this is the instruction & that's the code above: Using each of the above jQuery selectors and the addClass() function:

Add the animated class to all elements with type button.

Add the shake class to all the buttons with class .btn.

Add the btn-primary class to the button with id #target1

Here's my code:
$(document).ready(function() {
$("button").addClass(" animated");
$(".btn").addClass(" shake");
$("#target1").addClass(" btn-primary");
});
</script>
Alexander Køpke
@alexanderkopke
Nov 19 2015 05:30
dunno if important.. seems you have a space in front of the added classes " animated" " shake" etc.. can't imagine thats it but try to remove it
isholatosin
@isholatosin
Nov 19 2015 05:31
thanks, @alexanderkopke that worked
CamperBot
@camperbot
Nov 19 2015 05:31
isholatosin sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 245 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 19 2015 05:32
np
isholatosin
@isholatosin
Nov 19 2015 05:32
@alexanderkopke you started about a week ago. Are you a previous coder?
Vinamra
@iambali
Nov 19 2015 05:34
@boris-in-london yeah :P
Alexander Køpke
@alexanderkopke
Nov 19 2015 05:34
No, but trying to get there.
Boris
@boris-in-london
Nov 19 2015 05:35
@pranavdoshi code looks good, what error did you get?
Mason Shin
@minsooshin
Nov 19 2015 05:36
I think @pranavdoshi’s code doesn’t cover all the cases
Christine Cole
@netwerk19
Nov 19 2015 05:38
Hello, I'm having some trouble with the 'Label Bootstrap Wells' Way point
Mason Shin
@minsooshin
Nov 19 2015 05:38
it doesn’t cover "truncate("A-", 1) should return "A…”" case
Christine Cole
@netwerk19
Nov 19 2015 05:38

Here is my code:

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

<div class="well" id="left-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6"><h4 class="#right-well"></h4>

<div class="well" id="right-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
</div>
</div>

What am I doing wrong? Am I inserting the code in the wrong place?
Herman Fassett
@HermanFassett
Nov 19 2015 05:39
@netwerk19 you aren't supposed to add a class to the h4 elements, simply give them that text between the tags
Mason Shin
@minsooshin
Nov 19 2015 05:40
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6”>
      <h4 class="#left-well"></h4>
        <div class="well" id="left-well">
          <button class="btn btn-default target"></button>
          <button class="btn btn-default target"></button>
          <button class="btn btn-default target"></button>
        </div>
      </div>
      <div class="col-xs-6”>
        <h4 class="#right-well"></h4>
        <div class="well" id="right-well">
          <button class="btn btn-default target"></button>
          <button class="btn btn-default target"></button>
          <button class="btn btn-default target"></button>
        </div>
      </div>
   </div>
</div>
Herman Fassett
@HermanFassett
Nov 19 2015 05:40
For instance
<h4>#heres-a-well</h4>
Mason Shin
@minsooshin
Nov 19 2015 05:40
now I can see clearly
<h4> class is incorrect
@netwerk19
Herman Fassett
@HermanFassett
Nov 19 2015 05:40
As I said :P
Mason Shin
@minsooshin
Nov 19 2015 05:41
yes
Christine Cole
@netwerk19
Nov 19 2015 05:41
Thank you, let me try to fix it.
Mason Shin
@minsooshin
Nov 19 2015 05:41
as @HermanFassett said
hahaha
hello @HermanFassett
Herman Fassett
@HermanFassett
Nov 19 2015 05:41
Hey @minsooshin :)
Christine Cole
@netwerk19
Nov 19 2015 05:46

Still not working. Here's what I changed it to:

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

<div class="well" id="left-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
<div class="col-xs-6">
<h4 class="#right-well"></h4>

<div class="well" id="right-well">
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
<button class="btn btn-default target"></button>
</div>
</div>
</div>
</div>

Oh, wait....
Herman Fassett
@HermanFassett
Nov 19 2015 05:47
You shouldn't be adding class to h4...
<h4>texthere</h4>
Mason Shin
@minsooshin
Nov 19 2015 05:47
:)
Christine Cole
@netwerk19
Nov 19 2015 05:48
slaps forehead
Soulerik
@Soulerik
Nov 19 2015 05:48
Hey guys! I have just written the factorial function with JS!
Herman Fassett
@HermanFassett
Nov 19 2015 05:49
Good job @Soulerik :P
Soulerik
@Soulerik
Nov 19 2015 05:49
TY! @HermanFassett
Alexander Køpke
@alexanderkopke
Nov 19 2015 05:49
@Soulerik Excellent!
Mason Shin
@minsooshin
Nov 19 2015 05:50
kind of tired :) wanna get out of from the zipline asap :)
Christine Cole
@netwerk19
Nov 19 2015 05:50
Okay, that did it. Phew.
Herman Fassett
@HermanFassett
Nov 19 2015 05:50
shudders ziplines
Christine Cole
@netwerk19
Nov 19 2015 05:50
@HermanFassett thank you
CamperBot
@camperbot
Nov 19 2015 05:50
netwerk19 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 636 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Nov 19 2015 05:50
Yeah glad to help
Christine Cole
@netwerk19
Nov 19 2015 05:51
@minsooshin thank you
CamperBot
@camperbot
Nov 19 2015 05:51
netwerk19 sends brownie points to @minsooshin :sparkles: :thumbsup: :sparkles:
:star: 240 | @minsooshin | http://www.freecodecamp.com/minsooshin
Mason Shin
@minsooshin
Nov 19 2015 05:51
@netwerk19 my pleasure, but @HermanFassett helped all
:)
I didn’t do anything, tho
hehehe
Herman Fassett
@HermanFassett
Nov 19 2015 05:51
Aw we both did it :P
Christine Cole
@netwerk19
Nov 19 2015 05:51
Double thanks to @HermanFassett then
CamperBot
@camperbot
Nov 19 2015 05:51
netwerk19 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:warning: netwerk19 already gave hermanfassett points
Herman Fassett
@HermanFassett
Nov 19 2015 05:51
:P
camperbot is too smart
Mason Shin
@minsooshin
Nov 19 2015 05:52
;)
Christine Cole
@netwerk19
Nov 19 2015 05:52
Lol....yeah, no getting over on camperbot
Soulerik
@Soulerik
Nov 19 2015 05:52
How does he know about brownie points?
TheRealCoder
@TheRealCoder
Nov 19 2015 06:16
i need help
i need my image to have a src attribute that points
to my kitten
image
Patrick
@patleezy
Nov 19 2015 06:23
Javascript Waypoint #43: Add your JavaScript Slot Machine Slots, what's wrong with my code?
Screen Shot 2015-11-18 at 10.21.46 PM.png
Sydney Cook
@Sydney-Cook
Nov 19 2015 06:24
<img src="kitten.jpg"> is the very basic format depending on what the file is. I'm not sure what exercise you are on but you can point it to a folder too <img src="img/kitten.jpg"> or point to a server <img src="http://www.mywebsite/img/kitten.jpg">. It would help if you had a screen shot to show. I just started so I'm not sure what you are doing exactly so if I wasn't of any help I'm sorry. @TheRealCoder
Abdul Awali
@awalthefirst
Nov 19 2015 06:34
@patleezy you are returning null;
Patrick
@patleezy
Nov 19 2015 06:35
@awalthefirst oh got it - thank you. fixed it :)
CamperBot
@camperbot
Nov 19 2015 06:35
patleezy sends brownie points to @awalthefirst :sparkles: :thumbsup: :sparkles:
:star: 367 | @awalthefirst | http://www.freecodecamp.com/awalthefirst
Christine Cole
@netwerk19
Nov 19 2015 06:35
Ahhhh....finished bootstrap, on my way to jQuery....
Alexander Køpke
@alexanderkopke
Nov 19 2015 06:36
@netwerk19 :+1:
Patrick
@patleezy
Nov 19 2015 06:43
starting Object Oriented Programming :)
Sydney Cook
@Sydney-Cook
Nov 19 2015 06:45
@netwerk19 way to go!
Alexander Køpke
@alexanderkopke
Nov 19 2015 06:45
:)
Christine Cole
@netwerk19
Nov 19 2015 06:46
:)
Lalith
@Lalith-22
Nov 19 2015 06:49

can some one help me in suggesting how do we use below p element in HTML

Your p element should contain the first few words of the provided kitty ipsum text.

its basically fill in blank with placeholder Text .
Sydney Cook
@Sydney-Cook
Nov 19 2015 06:59
@Lalith-22 <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>
oops
<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>
take out the class="red-text"
I'm further along in the exercise
I love the encouraging phrases, my favorite was 'Thundercats, Hooo!'. I am a child of the 80's after all :sparkles:
Faizaan85
@Faizaan85
Nov 19 2015 07:18
hello everyone.
Sydney Cook
@Sydney-Cook
Nov 19 2015 07:18
@Faizaan85 hey there
Faizaan85
@Faizaan85
Nov 19 2015 07:19
can anyone help me with callback functions in javascript?
i tried reading on google but still cant understand it
Alexander Køpke
@alexanderkopke
Nov 19 2015 07:19
hello @Faizaan85
Vinamra
@iambali
Nov 19 2015 07:26
<div class="row">
<div class="col-xs-6">
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
</div>
  <div class="col-xs-6"><p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
    </ol>
</div>
</div>
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.
 Make sure each of your div elements has a closing tag
any help ??
Sydney Cook
@Sydney-Cook
Nov 19 2015 07:31

@iambali try <div class="col-xs-6">

<ul><li></li>...</ul></div> same with the unordered list <ol>

Alexander Køpke
@alexanderkopke
Nov 19 2015 07:32
I don't see any radio buttons
Sydney Cook
@Sydney-Cook
Nov 19 2015 07:35
I haven't gotten that far. Do you have to add radio buttons in html?
Alexander Køpke
@alexanderkopke
Nov 19 2015 07:36
so first create the radio buttons.. then you can put one div around all divs, then put one div around each of the divs.. then add the classes as instructed.
yes you add the radios in html
dwiaji
@dwiaji
Nov 19 2015 07:48
hi guys
D/S
@dantesolis
Nov 19 2015 07:48
hi @dwiaji
and hi peeps
dwiaji
@dwiaji
Nov 19 2015 07:49
could you help me solve the last waypoint in JavaScript??
its kinda confusing
D/S
@dantesolis
Nov 19 2015 07:49
can you post some of your code?
dwiaji
@dwiaji
Nov 19 2015 07:50
sure
D/S
@dantesolis
Nov 19 2015 07:50
just to see where you’re at :smile:
dwiaji
@dwiaji
Nov 19 2015 07:51
Screen Shot 2015-11-19 at 9.50.47 AM.png
is that the correct code for the first image?
D/S
@dantesolis
Nov 19 2015 07:55
@dwiaji that seems about right
why? are you getting an error?
dwiaji
@dwiaji
Nov 19 2015 07:56
the image isnt coming out in the slot machine
D/S
@dantesolis
Nov 19 2015 07:57
@dwiaji You have an space between the first $ and the (
maybe that’s it?
but your answer seems right: $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">’);
dwiaji
@dwiaji
Nov 19 2015 07:57
hmm let me try that :smile:
yeah i know
this one quote and double quote confuse me
D/S
@dantesolis
Nov 19 2015 08:01
In Rails one uses double quotes ”” if you are referencing and object, don’t know if it’s the same in Javascript, but I did find this SO link that might be of help?
@dwiaji my images never showed on my browser, but my tests were passing. Are yours?
dwiaji
@dwiaji
Nov 19 2015 08:02
nope
its not passing either
Allister
@AlyxMoon
Nov 19 2015 08:02
Weird, I never even used the images, just put the numbers. I feel like I messed up on that one now...
D/S
@dantesolis
Nov 19 2015 08:03
try writing for all the images
Fridox
@deniz946
Nov 19 2015 08:04
Hello, im having a trouble in this point
<i class="fa fa-thumbs-up"><button class="btn btn-block btn-primary fa fa-thumbs-up">Like</button></i>
Nest your i element within your button element.
_jn33
@jn33
Nov 19 2015 08:04
been silently lurking.. but executing the code doesn't actually pull in the images.. you need to go to the slot machine and press Go to "play" the slot machine for the images to show up. unless i'm misunderstanding what you're saying, then pls ignore :)
but re: passing the exercise, you'll need to do it 3 times for each of the slots
Fridox
@deniz946
Nov 19 2015 08:05
i did it this way but it says that its bad
D/S
@dantesolis
Nov 19 2015 08:05
@jn33 Oh My God thanks!!! I just realize that
CamperBot
@camperbot
Nov 19 2015 08:05
dantesolis sends brownie points to @jn33 :sparkles: :thumbsup: :sparkles:
D/S
@dantesolis
Nov 19 2015 08:05
lol
CamperBot
@camperbot
Nov 19 2015 08:05
:star: 203 | @jn33 | http://www.freecodecamp.com/jn33
_jn33
@jn33
Nov 19 2015 08:05
lol np!
yea, it gets confusing bcuz the earlier lessons pretty much auto update as you're coding but once you get to the slot machine, you actually need to "play" with the slot machine to confirm if your code is doing what it's supposed to be doing
@deniz946 your i element should be inside your button element. right now, your button element is inside the i element
dwiaji
@dwiaji
Nov 19 2015 08:09
@jn33 thankyou :+1:
_jn33
@jn33
Nov 19 2015 08:10
np! glad to help - i'm not that far ahead of you, so it's nice to know that what i learned is actually sticking
Soulerik
@Soulerik
Nov 19 2015 08:16
@jn33 Wait until JS will dare you :smile:
Vinamra
@iambali
Nov 19 2015 08:16
@alexanderkopke thanks mate it was too stupid of me
CamperBot
@camperbot
Nov 19 2015 08:16
iambali sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 247 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 19 2015 08:21
@iambali no, worries. It is all part of learning.
_jn33
@jn33
Nov 19 2015 08:29
@Soulerik JS is already kicking my ass - i'm taking a detour with codecademy & the book Eloquent JavaScript before going back to the bonfires
alright, i'm heading off to bed. night everyone!
Vinamra
@iambali
Nov 19 2015 08:41
<form class="form-control"action="/submit-cat-photo">
    <div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <input type="text" placeholder="cat photo URL" required>
    <button class="btn btn-primary"><i class ="fa fa-paper-plane"></i>Submit</button>
  </form>
</div>
This message was deleted
Give the submit button in your form the classes btn btn-primary.
Add a <i class="fa fa-paper-plane"></i> within your submit button element.
Give the text input in your form the class form-control.
 Make sure each of your i elements has a closing tag.
still not working guys any help
dwiaji
@dwiaji
Nov 19 2015 08:42
whats the problem @iambali ?
Vinamra
@iambali
Nov 19 2015 08:42
the first 3 objectives are not met
2nd msg is of objective
s
srinivas
@srinivasdasu
Nov 19 2015 08:43

Hi i am getting this error:
cannot set property '0' undefined

function largestOfFour(arr) {
// You can do this!
var newa;
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Vinamra
@iambali
Nov 19 2015 08:43
format
camperbot format
dwiaji
@dwiaji
Nov 19 2015 08:44
@iambali can you tell me which waypoint is that?
Vinamra
@iambali
Nov 19 2015 08:44
how to show format instructions :P
me ??
dwiaji
@dwiaji
Nov 19 2015 08:44
yes
srinivas
@srinivasdasu
Nov 19 2015 08:44

function largestOfFour(arr) {
// You can do this!
var newa;
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Vinamra
@iambali
Nov 19 2015 08:44
its bootstrap
17
dwiaji
@dwiaji
Nov 19 2015 08:46
@iambali you should add <i class=“fa fa-paper-plane”></i> to submit button which is at the last three line from the bottom
Vinamra
@iambali
Nov 19 2015 08:47
i have done that
see my code
above
last line
dwiaji
@dwiaji
Nov 19 2015 08:47
aah ok
i see now
Vinamra
@iambali
Nov 19 2015 08:52
any solutuons ??
@dwiaji
dwiaji
@dwiaji
Nov 19 2015 08:52
you see the last input element. you should put class=“form-control” into it
it should be like this
<input class= "form-control" type="text" placeholder="cat photo URL" required>
Vinamra
@iambali
Nov 19 2015 08:53
ihave put that in form element
see 1st line
as it was asked
Ibrahim
@1brahim97
Nov 19 2015 08:53
im stuck at resizing image anyone help
dwiaji
@dwiaji
Nov 19 2015 08:53
no it should be in the last input element
shridharlageri
@shridharlageri
Nov 19 2015 08:54

var randomNumberBetween0and19 = Math.floor(Math.random() * 20);

function myFunction() {

Vinamra
@iambali
Nov 19 2015 08:54
ohke let me try
shridharlageri
@shridharlageri
Nov 19 2015 08:54
can somebody help me with this?
Ibrahim
@1brahim97
Nov 19 2015 08:54
i created a pass ansd stye to smaller image to 100px but its not working
dwiaji
@dwiaji
Nov 19 2015 08:54
and delete that on the first line
shridharlageri
@shridharlageri
Nov 19 2015 08:54

var randomNumberBetween0and19 = Math.floor(Math.random() * 20);

function myFunction() {

Vinamra
@iambali
Nov 19 2015 08:54
@1brahim97 share ur code
Sean Brown
@SeanB99
Nov 19 2015 08:54
Stuck on Bonfire: checking for P
Stuck on Bonfire checking palindromes. Code.var palindrome = function(str) { var a = str.replace(/[.,-\/#!$%\^&*;:{}=-`~()@+\?><[]+]/gi, '' ).toLowerCase(); var b = str.replace(/[.,-\/#!$%\^&*;:{}=-`~()@+\?><[]+]/gi, '').toLowerCase().split("").reverse().join(""); if (a === b) {return true;
Richard Joe
@rjoe19
Nov 19 2015 08:55
having issues with lesson 50
Ibrahim
@1brahim97
Nov 19 2015 08:55
@iambali how can share it
Vinamra
@iambali
Nov 19 2015 08:56
just copy ur code
and place it b/w```
Sean Brown
@SeanB99
Nov 19 2015 08:56
Tired running /\s/g in it to ignore soaces but it doesn't seem to be helping. Returns all right answr besides the ones with finicky spacing
Vinamra
@iambali
Nov 19 2015 08:56
and end with```
Ibrahim
@1brahim97
Nov 19 2015 08:57

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

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

h2 {
font-family: Lobster, Monospace;
}

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

</style>
<style>
.smaller-image {

width: 100px;

}
</style>

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

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

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

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

Vinamra
@iambali
Nov 19 2015 08:57
well ` this is the key next to 1
Ibrahim
@1brahim97
Nov 19 2015 08:57
i did it
Vinamra
@iambali
Nov 19 2015 08:58
ur .smaller image is not in style
Ibrahim
@1brahim97
Nov 19 2015 08:58
it was a little stupid mistake
Vinamra
@iambali
Nov 19 2015 08:58
.smaller image class
Ibrahim
@1brahim97
Nov 19 2015 08:58
no i used pass instead of class
Vinamra
@iambali
Nov 19 2015 08:59
u have used two style classes too
u can make it 1
Richard Joe
@rjoe19
Nov 19 2015 08:59
issue with lesson 50
Vinamra
@iambali
Nov 19 2015 08:59
@dwiaji i did what u were telling me mate still no result
dwiaji
@dwiaji
Nov 19 2015 09:01
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input class= "form-control" type="text" placeholder="cat photo URL" required>
<button class="btn btn-primary"type="submit"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
</div>
i did this and its working
Robert Uivarosi
@URobert
Nov 19 2015 09:03
Could someone take a look at my approach with the above bonefire? I`m sure there is a more efficient approach (to generate only the exact nr of fibo nr needed). Could you rate this on a 1-10 scale? Thank you!
function sumFibs(num) {
  var i,j; 
  var sum = 0; 
  var arr = [];
  var a = 0, b = 1, f = 1;

  arr.push(f);
  for (i = 2; i <= num ; i++){ //Getting the Fibonaci numbers 
    f = a + b;
        a = b;
        b = f;
    arr.push(f);
  }


  for (j = 0; j < arr.length ;j++){ //Getting the final Sum
    if (arr[j] % 2 !== 0 && arr[j] <= num){
      sum = sum + arr[j];
    }
  }


  console.log(sum);
  return sum;
}

sumFibs(4);
below*
Vinamra
@iambali
Nov 19 2015 09:04
thanks @dwiaji
CamperBot
@camperbot
Nov 19 2015 09:04
iambali sends brownie points to @dwiaji :sparkles: :thumbsup: :sparkles:
:star: 174 | @dwiaji | http://www.freecodecamp.com/dwiaji
Ibrahim
@1brahim97
Nov 19 2015 09:07
@iambali im stuck at apply multiple classes to an element
dwiaji
@dwiaji
Nov 19 2015 09:08
ypure welcome @iambali dude
Fridox
@deniz946
Nov 19 2015 09:13
Hello, can someone help me with this part? "Give the well on the left the id of left-well. Give the well on the right the id of right-well."
im doing this but it says its wrong
<div class="well id="left-well">
dwiaji
@dwiaji
Nov 19 2015 09:14
This message was deleted
This message was deleted
srinivas
@srinivasdasu
Nov 19 2015 09:18
<div class="well" id ="left-well"> you should give id and class different@dwiaji

can anyone help me .I got stuck here
function largestOfFour(arr) {
// You can do this!
var newa;
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

dwiaji
@dwiaji
Nov 19 2015 09:19
@deniz946 can you post the real task?
Fridox
@deniz946
Nov 19 2015 09:25
@dwiaji got fixed it with the other friend's answer, i missed an ""
thanks you
srinivas
@srinivasdasu
Nov 19 2015 09:26
it's me @dwiaji
its me @deniz946
wrong message @dwiaji
Fridox
@deniz946
Nov 19 2015 09:30
@srinivasdasu thanks you
CamperBot
@camperbot
Nov 19 2015 09:30
deniz946 sends brownie points to @srinivasdasu :sparkles: :thumbsup: :sparkles:
:star: 273 | @srinivasdasu | http://www.freecodecamp.com/srinivasdasu
Elliott McNary
@bighitbiker3
Nov 19 2015 09:47
Hey guys...any ideas on how I can get this so it won't accept an operator as an input if the array is empty? unless the operator chosen is a '-' http://codepen.io/bighitbiker3/pen/ojJQLB
Fridox
@deniz946
Nov 19 2015 09:56
@bighitbiker3 hello, i've started this course some hours ago and i just finished boostrap lections, in which lections you start learning that you just did there? (I mean the calc)
Rohit
@rohit44x
Nov 19 2015 10:06
Hi Everyone..!!
what is meant by "Give the text 'input' in your form the class 'form-control.'
Nicol
@NicolNonga
Nov 19 2015 10:08
hi i have a problema
can somebody help me please
Richard Joe
@rjoe19
Nov 19 2015 10:12

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

// Only change code below this line.

var newArray = oldArray;

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

return val + 3;

});

my code not running can u please help?
this is lesson 51
David Hignett
@hignatious
Nov 19 2015 10:13
@rohit44x `<input class="form-control">
h4r1m4u
@h4r1m4u
Nov 19 2015 10:13
@rjoe19 i believe the waypoint expects the result of the map to be stored in newArray, not in addThree
Richard Joe
@rjoe19
Nov 19 2015 10:14
@h4r1m4u can you clarify plz , show me code plz
h4r1m4u
@h4r1m4u
Nov 19 2015 10:14
you store the result of the map method in variable called addThree
the waypoint tester function expects it in newArray
Richard Joe
@rjoe19
Nov 19 2015 10:15
i ran the code, thx for that
Aleksander Gębicki
@Takumar
Nov 19 2015 10:15
@rjoe19 when you write something you wrote:
var newArray = oldArray;
now oldArray and newArray are the same arrays!
When you use map() method on oldArray it returns NEW array and you can assign it to newArray
var newArray = oldArray.map(...
Richard Joe
@rjoe19
Nov 19 2015 10:15
gonna ponder of it to really understand why i did what i did
understand now
h4r1m4u
@h4r1m4u
Nov 19 2015 10:17
@rjoe19 technically your code was correct before, there was nothing wrong with it. it was just stored in an incorrect variable.
Richard Joe
@rjoe19
Nov 19 2015 10:18
@h4r1m4u thx
CamperBot
@camperbot
Nov 19 2015 10:18
rjoe19 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 707 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Elliott McNary
@bighitbiker3
Nov 19 2015 10:18
@deniz946 after you go through the waypoints you'll do some algorithms and learn some of JS methods you can use. From there you'll move onto the ziplines which include building the calculator. You will have virtually no idea how to do them to be honest...you'll have to constantly google and learn along the way
Aleksander Gębicki
@Takumar
Nov 19 2015 10:18
@rjoe19 I think you tried to copy old to new array. You can to this by using i.e. slice() method.
var newArray = oldArray.slice();
Elliott McNary
@bighitbiker3
Nov 19 2015 10:19
@Takumar you've helped me before :). any ideas on my calculator question above?
Aleksander Gębicki
@Takumar
Nov 19 2015 10:21
@bighitbiker3 but what are the question? I don't see any question mark :-) :point_up: 19 listopada 2015 11:18
Fridox
@deniz946
Nov 19 2015 10:21
@bighitbiker3 Oh :( I though that I would can do the calc with the seen here :(
Elliott McNary
@bighitbiker3
Nov 19 2015 10:22
@Takumar it was a bit further haha
Hey guys...any ideas on how I can get this so it won't accept an operator as an input if the array is empty? unless the operator chosen is a '-' http://codepen.io/bighitbiker3/pen/ojJQLB
srinivas
@srinivasdasu
Nov 19 2015 10:22
i got stuck here can anyone help
function largestOfFour(arr) {
// You can do this!
var newa;
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
h4r1m4u
@h4r1m4u
Nov 19 2015 10:22
@bighitbiker3 just add an an if statement into the operator click handler. check the length of the equation and which operator's been pressed
Elliott McNary
@bighitbiker3
Nov 19 2015 10:23
@deniz946 you can...FCC gives you a good overall base. But the point of the projects is to learn and really dig through information and documentation
or so I think...that's what i've been doing haha
@h4r1m4u the problem with associating it with the length of the array is that the array is empty until I click an operator. when I click an operator it pushes what's in the #screen to the array
h4r1m4u
@h4r1m4u
Nov 19 2015 10:25
@bighitbiker3 so you need to check if anything is in #screen? if there's no value, don't push the operator into the equation array unless it's -
Elliott McNary
@bighitbiker3
Nov 19 2015 10:27
@h4r1m4u hmmm okay...how can I check if something is in the #screen though
h4r1m4u
@h4r1m4u
Nov 19 2015 10:28
@bighitbiker3 something along the lines of if (document.getElementById('screen').innerHTML) ?
srinivas
@srinivasdasu
Nov 19 2015 10:28
@h4r1m4u can you help me on my issue?
h4r1m4u
@h4r1m4u
Nov 19 2015 10:29
@srinivasdasu what's not working?
Elliott McNary
@bighitbiker3
Nov 19 2015 10:29
@h4r1m4u I guess i'm confused with .innerHTML then...I thought that basically just pulled the contents within that id. does it also check if anything is in there?
an easy way out I guess would be to just create a BS array variable that pushes anytime a number is pressed and then have the operator click check to see if something is in there but I feel like there's a cleaner way
h4r1m4u
@h4r1m4u
Nov 19 2015 10:31
@bighitbiker3 no, it the if does. document.getElementById('screen').innerHTML gets the value of the #screen, so basically it's if (valueOfScreen). if #screen doesnt' have any value, the if statement will evaluate to false. if it has a value, it'll evaluate to true
@bighitbiker3 it's the same as:
var myVar = 5;
if (myVar) {
  // will run because myVar has as value, so the if evaluates to true
}

var myOtherVar;
if (myOtherVar) {
  // will not run because myOtherVar has no value, so the if evaluates to false
}
Elliott McNary
@bighitbiker3
Nov 19 2015 10:33
@h4r1m4u wowww thank you! always learning something i love it
CamperBot
@camperbot
Nov 19 2015 10:33
bighitbiker3 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 708 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 19 2015 10:34
@bighitbiker3 my pleasure
srinivas
@srinivasdasu
Nov 19 2015 10:43
@h4r1m4u
function largestOfFour(arr) {
// You can do this!
var newa;
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
cannot set property of '0' undefined it is throeing
throwing
h4r1m4u
@h4r1m4u
Nov 19 2015 10:47
@srinivasdasu it's because of var newa;. this line newa[j]=arr[j][k]; doesn't know that newa is supposed to be an array. declaring it's an array will fix it: var newa = [];
srinivas
@srinivasdasu
Nov 19 2015 10:50
@h4r1m4u
function largestOfFour(arr) {
// You can do this!
var newa=[];
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=j;k<j+1;k++)
{
newa[j]=arr[j][k];
}
}
return newa;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
it is giving 5 26 35 1
as result
instead of 5 26 35 1001
h4r1m4u
@h4r1m4u
Nov 19 2015 10:53
@srinivasdasu you need to have a second look at your forloops. i'll give you a hint:
for(var j=0;j<arr.length;j++) {
  for(var k=j;k<j+1;k++) {
   // all the sub-arrays in arr are now sorted in a descending order, meaning that the largest element in each array is the first element
  // do you need to iterate over the sub-arrays if you know it's the first element that's the largest? 
   newa[j]=arr[j][k];
  }
}
srinivas
@srinivasdasu
Nov 19 2015 10:56

@h4r1m4u
yeah i did that have a look on it.
function largestOfFour(arr) {
// You can do this!
var newa=[];
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=0;k<j+1;)
{
newa[j]=arr[j][k];
}
}
return newa;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

but after click on run-tests it throws
function largestOfFour(arr) {
// You can do this!
var newa=[];
for(var i=0;i<arr.length;i++)
{
arr[i].sort(function(a,b){
return b-a;
});
}
for(var j=0;j<arr.length;j++)
{
for(var k=0;k<j+1;)
{
newa[j]=arr[j][k];
}
}
return newa;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

your output will go here console.log()
h4r1m4u
@h4r1m4u
Nov 19 2015 10:58
let me ask you again - why do you need the inner for loop if you know that the largest number is the first element in each of the arr sub-arrays?
how can you get a first element of an array?
srinivas
@srinivasdasu
Nov 19 2015 10:59
yeah i got your point inner loop doesn't need
Alexander Køpke
@alexanderkopke
Nov 19 2015 11:03
Isn't push needed also? Or else the array will only have one entry, I think.
Ibrahim
@1brahim97
Nov 19 2015 11:12
anyone know how to "Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element"
h4r1m4u
@h4r1m4u
Nov 19 2015 11:13
what have you tried?
Ibrahim
@1brahim97
Nov 19 2015 11:18
Nest your text input element within a form element. how i can do that
h4r1m4u
@h4r1m4u
Nov 19 2015 11:19
again, what have you tried?
Ibrahim
@1brahim97
Nov 19 2015 11:20
Waypoint: Create a Form Element
i dont know how to nest
h4r1m4u
@h4r1m4u
Nov 19 2015 11:21
you've already covered nesting in waypoint 22. you could go back to it to remind yourself. nest means to put one element inside another, for example:
<div>
 <p> this p is nested in a div </p>
</div>
Ibrahim
@1brahim97
Nov 19 2015 11:22

<input type="text" placeholder="cat photo URL">

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

h4r1m4u
@h4r1m4u
Nov 19 2015 11:22
" nest means to put one element inside another"
your input is not inside the form
Ibrahim
@1brahim97
Nov 19 2015 11:23
its saying "Nest your text input element within a form element.
"
u mean i should put input into form
srinivas
@srinivasdasu
Nov 19 2015 11:24
@h4r1m4u how to check our solution in git hub gist?
h4r1m4u
@h4r1m4u
Nov 19 2015 11:24
yes. that's what "Nest your text input element within a form element" means
Ibrahim
@1brahim97
Nov 19 2015 11:25
thanks @h4r1m4u it works
CamperBot
@camperbot
Nov 19 2015 11:25
1brahim97 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 709 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 19 2015 11:25
@srinivasdasu i don't understand your question
@1brahim97 you figured it out? great!
Ibrahim
@1brahim97
Nov 19 2015 11:26
yes
Fridox
@deniz946
Nov 19 2015 11:26
@bighitbiker3 thanks you very my mate ^^
CamperBot
@camperbot
Nov 19 2015 11:26
deniz946 sends brownie points to @bighitbiker3 :sparkles: :thumbsup: :sparkles:
:star: 209 | @bighitbiker3 | http://www.freecodecamp.com/bighitbiker3
Rohit
@rohit44x
Nov 19 2015 11:27
@hignatious . Thanks..that worked..!!
srinivas
@srinivasdasu
Nov 19 2015 11:27
@h4r1m4u after completion of bonafire waypoint ,it will ask share your code as a github gist. I need to know how to look into our shared code in gist.github.com .
h4r1m4u
@h4r1m4u
Nov 19 2015 11:29
@srinivasdasu you can go to https://gist.github.com/srinivasdasu to see all your gists
Ibrahim
@1brahim97
Nov 19 2015 11:39
@h4r1m4u how to do this "Add to your form a set of three checkboxes. Each checkbox should be nested within its own label element. All three should share the name attribute of personality."
h4r1m4u
@h4r1m4u
Nov 19 2015 11:41
@1brahim97 show me what you've tried and i can help you figure out what you have wrong.
dhruvsharma144
@dhruvsharma144
Nov 19 2015 11:44
how to do this prioritize one style over another

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

</style>

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

this is what i did
where did i go wrong ?
Aleksander Gębicki
@Takumar
Nov 19 2015 11:47
@dhruvsharma144 don't put spaces between class and equal sign: <h1 class="pink-text">Hello World!</h1>
Bjorn Keyser
@bjornkeyser
Nov 19 2015 11:48
How do I do this lastName.length stuff???
dhruvsharma144
@dhruvsharma144
Nov 19 2015 11:48
tried that
not working
@Takumar
Bjorn Keyser
@bjornkeyser
Nov 19 2015 11:49
oh t @dhruvsharma144 you should like put .pink-text or #pink-text I think
srinivas
@srinivasdasu
Nov 19 2015 11:49
@h4r1m4u it is saying you dont have any gists
Bjorn Keyser
@bjornkeyser
Nov 19 2015 11:49
wait I'll check i have done that challenge a while ago
h4r1m4u
@h4r1m4u
Nov 19 2015 11:49
@srinivasdasu i guess you didn't create any
Aleksander Gębicki
@Takumar
Nov 19 2015 11:50
@dhruvsharma144 you didn't create class. In you style section 'pink-text' should have dot before it:
.pink-text {
    color: pink;
 }
dhruvsharma144
@dhruvsharma144
Nov 19 2015 11:50
i did, at the top
@Takumar
Bjorn Keyser
@bjornkeyser
Nov 19 2015 11:51
this is what I had @dhruvsharma144

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

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

dhruvsharma144
@dhruvsharma144
Nov 19 2015 11:51
thanks @bjornkeyser and @Takumar .. @bjornkeyser your solution worked
CamperBot
@camperbot
Nov 19 2015 11:51
dhruvsharma144 sends brownie points to @bjornkeyser and @takumar and @bjornkeyser :sparkles: :thumbsup: :sparkles:
dhruvsharma144
@dhruvsharma144
Nov 19 2015 11:51
:)
CamperBot
@camperbot
Nov 19 2015 11:51
:star: 802 | @takumar | http://www.freecodecamp.com/takumar
:star: 131 | @bjornkeyser | http://www.freecodecamp.com/bjornkeyser
:star: 131 | @bjornkeyser | http://www.freecodecamp.com/bjornkeyser
srinivas
@srinivasdasu
Nov 19 2015 11:52
after completing every bonafire i am sharing my code through option share your solution as a GIT-hub gist @h4r1m4u
Aleksander Gębicki
@Takumar
Nov 19 2015 11:53
@dhruvsharma144 when you define style for your elements you have to remember to put period before name of class, hash before ID, and when you don't put anything you create style for tag:
<style>
  p { color: blue; }
  .red-text { color: red;}
  #green-link { color: green; }
</style>
@srinivasdasu what it gives you when you share your bonfire as gist, is it saved on your GitHub account?
h4r1m4u
@h4r1m4u
Nov 19 2015 11:55
@srinivasdasu i've never tried it before. i just did and it seems it creates the gists as an anonymous user instead of linking them to one's account
srinivas
@srinivasdasu
Nov 19 2015 11:59
it is not saved on my github account
Elizabeth Hatleli
@TheHighPriestess
Nov 19 2015 12:04
Is Node necessary for the Basejumps?
I'm going through the tutorial on Cloud9 and it's pretty useless.
h4r1m4u
@h4r1m4u
Nov 19 2015 12:05
@srinivasdasu you can always create the gists manually under your account and simply copy the code from FCC into them
Elizabeth Hatleli
@TheHighPriestess
Nov 19 2015 12:05
Do I need to be looking at other tutorials out there...or is this something that's not really needed for the Basejumps? IOW..can I skip over it?
Aleksander Gębicki
@Takumar
Nov 19 2015 12:09
@srinivasdasu what for is this Gist? For making artificial intelligence by GitHub makers which learns to code every algorithm itself without need of employing coders?
Elizabeth Hatleli
@TheHighPriestess
Nov 19 2015 12:11
For example...the tutorial says:

To get started, write a program that simply contains:

 console.log(process.argv)  

Run it with node program.js and some numbers as arguments. e.g:

 $ node program.js 1 2 3  
Write a program.........
huh?
What am I missing here?
Ok...here's my question. Do I REALLY need any of this for the Basejumps? Do I NEED Angular, Node etc?
If yes...then I will spend some time on this. If not...I won't.
because this nodeschool tutorial really sucks
Peter S.
@yonson2
Nov 19 2015 12:22
@TheHighPriestess A basic understanding of node and angular is required for the basejumps.
there are lots of resources to learn the basics of node and angular though, you don't need to specifically learn them through nodeschool
Elizabeth Hatleli
@TheHighPriestess
Nov 19 2015 12:24
it seems that maybe PHP is also necessary
i learned the very basic of basics of Angular
I'm thinking that maybe I'm not that interested in the full stack stuff
I'm really more interested in design and front-end
but...as I understand it...I cannot participate on projects unless I complete the full-stack part of FCC
which seems a bit strange
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 12:56
Hello everyone, can someone help me with a bonfire where im supposed to title case
I have a problem because my function returns I'm A LiTle tea Pot
Dustin Frank
@DustInCompetent
Nov 19 2015 12:58
post your code
wiki format
CamperBot
@camperbot
Nov 19 2015 12:58

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 12:58
```
Woops
Mahfouzer
@Mahfouzer
Nov 19 2015 12:58
function titleCase(str) {
 str = str.split(' ');
  for(i=0;i<str.length; i++){

    str=str[i].charAt(i).toUpperCase();
    if (i>0){

   str=str[i].charAt(i).toLowerCase();
  } }

 str = str.join(' ');
  return str;


}

titleCase("I'm a little tea pot");
?
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 12:59
´´´

´´´
function titleCase(str) {
str = str.toLowerCase();
//Replacing 1 Character with uppercase character
str = str.replace(str.charAt(0), str.charAt(0).toUpperCase());
// if the character is = ' ' then the next characther should be uppercase
for (var i = 0; i < str.length; i++) {
if (str.charAt(i) === ' ') {
str = str.replace(str.charAt(i + 1), str.charAt(i + 1).toUpperCase());
}
}
return str;
}

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

Dustin Frank
@DustInCompetent
Nov 19 2015 12:59
wrong ticks up there
```, not ´´´
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 13:00
function titleCase(str) {
  str = str.toLowerCase();
  //Replacing 1 Character with uppercase character
  str = str.replace(str.charAt(0), str.charAt(0).toUpperCase());
  // if the character is = ' ' then the next characther should be uppercase 
  for (var i = 0; i < str.length; i++) {
    if (str.charAt(i) === ' ') {
      str = str.replace(str.charAt(i + 1), str.charAt(i + 1).toUpperCase());
    } 
  }
  return str;
}

titleCase("I'm a little tea pot");
I tried changing the i's to j's but that didnt help.
Dustin Frank
@DustInCompetent
Nov 19 2015 13:02
it replaces the first occrence of the letter you're targetting
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 13:02
Im sure by what you mean
Dustin Frank
@DustInCompetent
Nov 19 2015 13:03
so instead of capitalizing the t in tea, it capitalizes the one in little
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 13:03
I dont understand why
Dustin Frank
@DustInCompetent
Nov 19 2015 13:03
that's what the .replace method does
charAt(i) doesn't tell the replace method to replace the character at that index
str.charAt(i) first returns the character at index i, "t", for example and gives it to the replace method
Rune Bak Jacobsen
@runebakjacobsen
Nov 19 2015 13:05
Then what does it do?
Dustin Frank
@DustInCompetent
Nov 19 2015 13:06
str.replace("t", ...) then replaces the first occurence of "t" in your str
if you want to change the character at index i, target it with str[i]
str[i] = str[i].toUpperCase();
Ibrahim
@1brahim97
Nov 19 2015 13:07
@ArielLeslie can u help with this "Make sure your new img element has a closing angle bracket."
Dustin Frank
@DustInCompetent
Nov 19 2015 13:08
@rune-jacobsen remember that .replace()is not for replacing characters at a specific index, it's for replacing text with other text
@1brahim97 what does your code look like?
CaffeineQueen
@CaffeineQueen
Nov 19 2015 13:10
What is wrong with this?
  for (var a =0; a <arr1.length; a++){
    if (arr1[a].indexOf(arr2) > -1) {
      newArr.push();
    }
Ibrahim
@1brahim97
Nov 19 2015 13:11
i added new img correctly but its saying Make sure your new img element has a closing angle bracket @DustInCompetent
mansellb55
@mansellb55
Nov 19 2015 13:11
morning @CaffeineQueen
CaffeineQueen
@CaffeineQueen
Nov 19 2015 13:11
morning @mansellb55
it says arr1[a].indexOf is not a function
I need to search each item of arr1 and push all true values to newArr. or something like that
Dustin Frank
@DustInCompetent
Nov 19 2015 13:14
@1brahim97 copy and paste your code here
Ibrahim
@1brahim97
Nov 19 2015 13:14

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

              ></a> 

<img class="img-responsive" src="http://bit.ly/fcc-running-cats">

Dustin Frank
@DustInCompetent
Nov 19 2015 13:15
<a href="#"><img class="smaller-image thick-green-border" src="http://bit.ly/fcc-relaxing-cat"></a> 

<img class="img-responsive" src="http://bit.ly/fcc-running-cats">
try this
FCC doesn't like line breaks in situations like these
MD Alsaffar
@Cyberistic
Nov 19 2015 13:17
Hey! Kinda having a bit of a problem here, would anyone mind to help?
The "tasks" disappeared and now the 'run tests' button isn't working and neither is ctrl + enter.
I'm on the first jQuery waypoint if that helps.
Ibrahim
@1brahim97
Nov 19 2015 13:17
it works @DustInCompetent thank what did u change
CamperBot
@camperbot
Nov 19 2015 13:17
1brahim97 sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
:star: 196 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
Dustin Frank
@DustInCompetent
Nov 19 2015 13:17
@1brahim97 nothing, just put the angle bracket where it belongs
I think your code was technically correct but FCC's test aren't good with line breaks in some places
MD Alsaffar
@Cyberistic
Nov 19 2015 13:17
And yes, I tried restarting my browser/trying other challenges and they work just fine
Dustin Frank
@DustInCompetent
Nov 19 2015 13:18
@Cyberistic tried another browser?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:19
Nope :/
Dustin Frank
@DustInCompetent
Nov 19 2015 13:19
Did you maybe mess up with AdBlocker or something?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:19
It seems to disappear whenever i add <script>
Will try that, thanks.
Dustin Frank
@DustInCompetent
Nov 19 2015 13:20
did you close your script tag?
Veacheslav
@Slavi4ek
Nov 19 2015 13:20
Hi need yours help myFunction should return heads when flip equals 0 and tails when flip equals 1.
Dustin Frank
@DustInCompetent
Nov 19 2015 13:20
["heads","tails"][flip]
Mr. Kunda
@SudhakarKunda
Nov 19 2015 13:21
Hi all
I am new to JS, so please suggest me what i have to follow to learn JS
MD Alsaffar
@Cyberistic
Nov 19 2015 13:22
Tried turning off Adblocker
still nothing
Dustin Frank
@DustInCompetent
Nov 19 2015 13:22
@Cyberistic closed your script tag correctly?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:22
Yup
Dustin Frank
@DustInCompetent
Nov 19 2015 13:22
hmm
can you send a screenshot?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:22
Even if i didn't, pretty sure the tasks shouldn't just 'disappear'
Dustin Frank
@DustInCompetent
Nov 19 2015 13:23
hm
idk. contact FCC, maybe
Dustin Frank
@DustInCompetent
Nov 19 2015 13:24
@Cyberistic they were there before you changed anything, right?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:25
Yes
Dustin Frank
@DustInCompetent
Nov 19 2015 13:25
do they appear again when you reset your code?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:25
Yup
Dustin Frank
@DustInCompetent
Nov 19 2015 13:26
then something's wrong with it...
MD Alsaffar
@Cyberistic
Nov 19 2015 13:26
with?
Dustin Frank
@DustInCompetent
Nov 19 2015 13:26
your code
the app on the right isn't showing up either
MD Alsaffar
@Cyberistic
Nov 19 2015 13:26
wouldn't it just put red x's next to the tasks if there is something wrong with my code?
Dustin Frank
@DustInCompetent
Nov 19 2015 13:27
your code might be breaking the waypoint page
MD Alsaffar
@Cyberistic
Nov 19 2015 13:27
weird
Dustin Frank
@DustInCompetent
Nov 19 2015 13:28
can you paste your whole code here?
MD Alsaffar
@Cyberistic
Nov 19 2015 13:28
the app also disappeared when i added <script>
This message was deleted
Any way to post the code without messing the whole chat up?
Aleksander Gębicki
@Takumar
Nov 19 2015 13:29
@Cyberistic if you format it as code it is easier to read.
wiki format
CamperBot
@camperbot
Nov 19 2015 13:29

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Dustin Frank
@DustInCompetent
Nov 19 2015 13:29
<script>
$(document).ready(function(){

});
</script>
<!-- Only change code above this line. -->

<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>
hmm
MD Alsaffar
@Cyberistic
Nov 19 2015 13:30
@Takumar Thanks!
CamperBot
@camperbot
Nov 19 2015 13:30
cyberistic sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 804 | @takumar | http://www.freecodecamp.com/takumar
Dustin Frank
@DustInCompetent
Nov 19 2015 13:31
what browser are you using
this is Waypoint: Learn how Script Tags and Document Ready Work, right?
That code works for me
MD Alsaffar
@Cyberistic
Nov 19 2015 13:31
Google chrome, and yes
Dustin Frank
@DustInCompetent
Nov 19 2015 13:34
Well, the code up there works for me so I don't know what's wrong
try to use another browser, maybe
MD Alsaffar
@Cyberistic
Nov 19 2015 13:36
A'ight , will look into it later.
Thanks anyways
@DustInCompetent
CamperBot
@camperbot
Nov 19 2015 13:36
cyberistic sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
:star: 198 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
Alexander Køpke
@alexanderkopke
Nov 19 2015 13:41
sometimes it helps to clear the browser cache... worked for me once
gleidston
@gleidston
Nov 19 2015 13:47
blob
what error here
mansellb55
@mansellb55
Nov 19 2015 14:05
ok i need some help... i am completly lost
Daniel Wu
@mejorna
Nov 19 2015 14:05
@gleidston I think you've to use a number
mansellb55
@mansellb55
Nov 19 2015 14:05
im trying to figure out the if else statement on javascript
the coin flip game
Mahadevan
@karthic2914
Nov 19 2015 14:06
storeDate['storedValue2'] = $('input[id=ab]:checked','input[id=bc]:checked').val();
is this correct i am working on json
iam trying something new
Daniel Wu
@mejorna
Nov 19 2015 14:06
@gleidston or you've to use another function that appends and copies to removedfrommyarray
mansellb55
@mansellb55
Nov 19 2015 14:07

if (myFunction === 1) {

return tails;

} else {

return heads;

}

Daniel Wu
@mejorna
Nov 19 2015 14:08
I've a question on using the return function, specifically in the example used in the "43. Waypoint: Add your JavaScript Slot Machine Slots." When do we use "return null" vs "return [slotOne, slotTwo, slotThree]?"
Jason Wood
@catapixel
Nov 19 2015 14:08
@mansellb55 that's the sample code but the comment says what you need to do. Your comparison needs to be with flip and 0
Daniel Wu
@mejorna
Nov 19 2015 14:08
Why isn't it just return null for both cases?
mansellb55
@mansellb55
Nov 19 2015 14:12
@catapixel is this what you mean?

if (flip === 0) {

return heads;

} else {

return tails;

}

odiakaose
@odiakaose
Nov 19 2015 14:13
please fellow campers, i am trying to add Responsively Style Radio Buttons here in the exercise from the web but i keep getting an error like this $ is not defined. Pls what do i do?
gleidston
@gleidston
Nov 19 2015 14:14
ok work witch number thanks @mejorna
CamperBot
@camperbot
Nov 19 2015 14:14
gleidston sends brownie points to @mejorna :sparkles: :thumbsup: :sparkles:
:star: 171 | @mejorna | http://www.freecodecamp.com/mejorna
Jason Wood
@catapixel
Nov 19 2015 14:15
@mansellb55 based on my memory yes that is what you need...
if you remind me of the name of the waypoint I can double check
Daniel Wu
@mejorna
Nov 19 2015 14:16
@gleidston sorry, i corrected my answer. I think you've to use the array that copy and appends
mansellb55
@mansellb55
Nov 19 2015 14:18
@catapixel Waypoint: Use Conditional Logic with If and Else Statements
Daniel Wu
@mejorna
Nov 19 2015 14:19
@gleidston "var removedFromMyArray = myArray.shift();"
Jason Wood
@catapixel
Nov 19 2015 14:20
@mansellb55 heads and tails need to be in quotes because you are returning a string and not a variable but other than that your code is now correct
mansellb55
@mansellb55
Nov 19 2015 14:20
Ok cool. Thank you @catapixel
CamperBot
@camperbot
Nov 19 2015 14:20
mansellb55 sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 587 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Nov 19 2015 14:21
you're welcome
MIN
@una720302
Nov 19 2015 14:21
Question:1.Give your body element the color property of green. 2.Your h1 element should inherit the color green from your body element. I could not figure these two please help me. Thank you.
Mahadevan
@karthic2914
Nov 19 2015 14:24
can i store the data like this
        storeDate['storedValue2'] = $('#ab:checked'),$('#ac:checked').val();
Daniel Wu
@mejorna
Nov 19 2015 14:25
Under basic javascript section, why does waypoint 45 example have the plus sign before and after the images[slotOne-1] --> ' + images[slotOne-1] + '
Mateo Pool
@IAmMyself
Nov 19 2015 14:38
Can I style a popup box in JS?
Dustin Frank
@DustInCompetent
Nov 19 2015 14:42
@IAmMyself do you mean alert() and prompt() ?
The style of those pop-ups is browser specific
Mateo Pool
@IAmMyself
Nov 19 2015 14:43
@DustInCompetent I want a popup for the Tic-tac-toe zipline asking X or O
Dustin Frank
@DustInCompetent
Nov 19 2015 14:44
@mejorna Because images[slotOne-1] is only a part of the argument to the html() method
it is "added" to the string '<img src = "' an then the string '">' is added to that
@IAmMyself yeah, what kind of popup?
Daniel Wu
@mejorna
Nov 19 2015 14:46
@DustInCompetent Thanks! It's really picky about the spaces before and after the + too. I guess it's purpose is like the "&" in Excel formulas
CamperBot
@camperbot
Nov 19 2015 14:46
mejorna sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
Mateo Pool
@IAmMyself
Nov 19 2015 14:46
@DustInCompetent One that I can have an "X" button and a "O" button
CamperBot
@camperbot
Nov 19 2015 14:46
:star: 199 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
Dustin Frank
@DustInCompetent
Nov 19 2015 14:48
@IAmMyself Can't do that with popups
you can add buttons to your app though
Mateo Pool
@IAmMyself
Nov 19 2015 14:49
Ok, thanks @DustInCompetent
CamperBot
@camperbot
Nov 19 2015 14:49
iammyself sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
:star: 200 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
MIN
@una720302
Nov 19 2015 14:50
Question:1.Give your body element the color property of green. 2.Your h1 element should inherit the color green from your body element. I could not figure these two please help me. Thank you.
Mr. Williams
@TeamBLAM
Nov 19 2015 14:51
Peace and Great Day Everyone! Keep Up the Great Works! BLAM!
MD Alsaffar
@Cyberistic
Nov 19 2015 14:53
How do i contact FCC? This problem is frustrating.
Dustin Frank
@DustInCompetent
Nov 19 2015 14:54
@una720302 at what waypoint are you?
MD Alsaffar
@Cyberistic
Nov 19 2015 14:55
@DustInCompetent How do i contact FCC? is there a support section?
Dustin Frank
@DustInCompetent
Nov 19 2015 14:56
@Cyberistic dunno, sry
MD Alsaffar
@Cyberistic
Nov 19 2015 14:56
;v
I want to get back to learning and doing challenges and this is stopping me
Dustin Frank
@DustInCompetent
Nov 19 2015 14:57
just skip that one?
MIN
@una720302
Nov 19 2015 14:58
@DustInCompetent Waypoint: Inherit Styles from the Body Element
Dustin Frank
@DustInCompetent
Nov 19 2015 14:58
@una720302 ok, paste your code here.
@una720302 basically, CSS code looks like this:
selector {
  property: value;
}
and the task is asking you to give the body element a property color with the value green
The info text on the left literally tells you,
  • Then, let's give all elements on your page the color of green by adding color: green; to your body element's style declaration.
mansellb55
@mansellb55
Nov 19 2015 15:14
how do i go about adding a "random" function to a specific var?
CaffeineQueen
@CaffeineQueen
Nov 19 2015 15:14
Math.random?
mansellb55
@mansellb55
Nov 19 2015 15:15
yes @CaffeineQueen im doing the slot machine
Dustin Frank
@DustInCompetent
Nov 19 2015 15:17
specificVar = Math.floor(Math.random() * n);
gives you an integer >= 0 and <= n-1
mansellb55
@mansellb55
Nov 19 2015 15:19
sweet thanks @DustInCompetent
CamperBot
@camperbot
Nov 19 2015 15:19
mansellb55 sends brownie points to @dustincompetent :sparkles: :thumbsup: :sparkles:
:star: 201 | @dustincompetent | http://www.freecodecamp.com/dustincompetent
Shorty
@ShortyB
Nov 19 2015 15:22
hey guys
i dont understand this
var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;

function myFunction() {

  // Only change code below this line.
if (1 === 0) {

  return true;
}

  else {
    return false;
  }

  // Only change code above this line.

}

var result = myFunction();if(typeof(flip) !== "undefined" && typeof(flip) === "number" && typeof(result) !== "undefined" && typeof(result) === "string"){(function(y,z){return 'flip = ' + y.toString() + ', text = ' + z;})(flip, result);}
i created a now if and else statement but i dont know what else to do
MIN
@una720302
Nov 19 2015 15:29

@DustInCompetent this is my code--> <style>
body {
background-color: green;
font-family: Monospace;
}

h1{
background-color: green;
}
</style>

<body>
<h1>Hello World.</h1>

</body>

and it still not right.
Josep
@Josepdal
Nov 19 2015 15:30
@ShortyB reindent your code to read it easily xD
@una720302 what you have to do?
Shorty
@ShortyB
Nov 19 2015 15:32
OK @Josepdal
MIN
@una720302
Nov 19 2015 15:33
Create an h1 element.
Your h1 element should have the text Hello World.
Make sure your h1 element has a closing tag.
Give your body element the color property of green.
Give your body element the font-family property of Monospace.
Your h1 element should inherit the font Monospace from your body element.
Your h1 element should inherit the color green from your body element. @Josepdal
Le Duy Ha
@duyha1309
Nov 19 2015 15:34
hey guys
i don't understand the first suggest is the this mean ?
Josep
@Josepdal
Nov 19 2015 15:35
@una720302 h1{
color: green;
}
Le Duy Ha
@duyha1309
Nov 19 2015 15:35
blob
Please explain help me !
blob
I think so, but it's not true
Josep
@Josepdal
Nov 19 2015 15:39
seems fine :confounded:
MIN
@una720302
Nov 19 2015 15:41
@Josepdal got it. thank you.
CamperBot
@camperbot
Nov 19 2015 15:41
una720302 sends brownie points to @josepdal :sparkles: :thumbsup: :sparkles:
:star: 92 | @josepdal | http://www.freecodecamp.com/josepdal
Josep
@Josepdal
Nov 19 2015 15:43
@duyha1309 look at <img "<"
is not set
Dustin Frank
@DustInCompetent
Nov 19 2015 15:45
@una720302 @Josepdal You were supposed to give the body, not h1 element the color, not background-color of green
<style>
body {
  background-color: black; /*don't touch this*/
  color: green;
  font-family: Monospace;
}
</style>

<body>
  <h1>Hello World</h1>
</body>
Josep
@Josepdal
Nov 19 2015 15:46
True