These are chat archives for FreeCodeCamp/Help

20th
Nov 2015
Nathan Kipsang Tum
@nathantum
Nov 20 2015 00:02
is there a way you can finish all the content in less that 800 hrs?
m-farooqui
@m-farooqui
Nov 20 2015 00:04
hi i am in waypoint 141 and i am trying to use the .shift() function i am having hard time finding a start point
this is the code given

var ourArray = ["Stimpson", "J", ["cat"]];

removedFromOurArray = ourArray.shift(); // removedFromOurArray now equals "Stimpson" and ourArray now equals ["J", ["cat"]].

var myArray = ["John", 23, ["dog", 3]];

// Only change code below this line.

var removedFromMyArray;

// Only change code above this line.

(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);

Aleksander Gębicki
@Takumar
Nov 20 2015 00:08
@m-farooqui you have example in your code, how they removed first element from ourArray by using shift() method on that array. Make the same to 'myArray' to fullfil expectations.
Nathan Kipsang Tum
@nathantum
Nov 20 2015 00:10
var removedFromMyArray=myArray.shift();
Zone2345
@Zone2345
Nov 20 2015 00:17
hello i need help by the number 141 "Only add one class with each of your three selectors."
i wrote this but it still don't work
$("button").addClass("animated")
$(".btn").addClass("shake")
$("#target1").addClass("animated shake btn-primary")
Alexander Estupinan
@Stupkid1025
Nov 20 2015 00:17
for applying border-radius do i need to create a class as well as putting it inside the style tags
Shorty
@ShortyB
Nov 20 2015 00:17
hey guess i need help with number 167
Zone2345
@Zone2345
Nov 20 2015 00:18
can somebody help pls
Shorty
@ShortyB
Nov 20 2015 00:18
this is the code
 function runSlots() {
    var slotOne;
    var slotTwo;
    var slotThree;

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

    // Only change code below this line.



    // Only change code above this line.


    if (slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined) {
      $(".logger").html(slotOne + " " + slotTwo + " " + slotThree);
    }
i dont know what in the world i am suppose to do to be honest i just had a brainfart so im completely lost right now
Alexander Estupinan
@Stupkid1025
Nov 20 2015 00:20
i need help applying border-radius
Zone2345
@Zone2345
Nov 20 2015 00:22
<style>
h2 {
border-radius = ....,
}
</style>
Connor Yanz
@cmy235
Nov 20 2015 00:22

can anybody tell me how exactly the text field here is nested in the form element?:

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

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

The code is correct ... but to me it doesn't really look like my text field is nested inside the "form" element...
Bill
@kirah1314
Nov 20 2015 00:24
@cmy235 you forgot to close the <form> element, missing >
@cmy235 and nothing is nested in the form element based on your above codes
RoadtoMastery
@RoadtoMastery
Nov 20 2015 00:29
Hi all! I need help removing an HTML element: I tried $("#target4").remove("target4"); What am I missing? thanks
Aleksander Gębicki
@Takumar
Nov 20 2015 00:31
@RoadtoMastery you have to much code. When you remove something you just have to find that element and run remove() on it.
Jess
@jms6147
Nov 20 2015 00:32
Hi everyone! I see that this was addressed earlier, bit still havent figured it out. It's using Math.floor using java. I'm still getting a decimal. This is what I have:

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

function myFunction() {

// Only change code below this line.

Math.floor(Math.random() * 10);

return Math.random();

I'd appreciate any help. Thanks!
Aleksander Gębicki
@Takumar
Nov 20 2015 00:32
@jms6147 now you return decimal because of that line: return Math.random();
You have to put in return statement another value (multiplied by 10 and rounded down just like you did in the upper line).
return Math.floor(Math.random() * 10);
MIN
@una720302
Nov 20 2015 00:32
question:Add an i element with the classes fa and fa-thumbs-up. my code--> <button class="btn btn-block btn-primary"><i class= "fa fa-thunbs-up">Like</i></button> ---->can anyone help me? I don't know what i did wrong?
Connor Yanz
@cmy235
Nov 20 2015 00:33
@kirah1314 yea exactly, which is odd that it is letting me complete the "test" and go to the next one (with that code!) maybe a bug?
RoadtoMastery
@RoadtoMastery
Nov 20 2015 00:33
@Takumar thanks :smile:
CamperBot
@camperbot
Nov 20 2015 00:33
roadtomastery sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 811 | @takumar | http://www.freecodecamp.com/takumar
Zone2345
@Zone2345
Nov 20 2015 00:34
una720302
its thumbs-up
not thunbs-up
Aleksander Gębicki
@Takumar
Nov 20 2015 00:35
@una720302 the 'm' and 'n' keys are too close on keyboard :-)
Jess
@jms6147
Nov 20 2015 00:35
@Takumar Thank you! Makes sense now.
CamperBot
@camperbot
Nov 20 2015 00:35
jms6147 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 812 | @takumar | http://www.freecodecamp.com/takumar
Zone2345
@Zone2345
Nov 20 2015 00:35
:) I
still hanging on number 114
"Only add one class with each of your three selectors."
MIN
@una720302
Nov 20 2015 00:37
@Takumar lol lol lol lol lol lol thank you.
CamperBot
@camperbot
Nov 20 2015 00:37
una720302 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 813 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 20 2015 00:38
@Zone2345 so select your element using button, class and id and add one class at the time.
Connor Yanz
@cmy235
Nov 20 2015 00:38

@kirah1314 so if I nest a text field in a form element, would it look like this:

<form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL"> </form>

?

Aleksander Gębicki
@Takumar
Nov 20 2015 00:39
@cmy235 remember about closing brackets. form action="/submit-cat-photo">
Zone2345
@Zone2345
Nov 20 2015 00:41
i made it like this
<script>
$(document).ready(function() {
$("button").addClass("animated")
$(".btn").addClass("shake")
$("#target1").addClass("animated shake btn-primary")
});
</script>
or my brain sleeps and i don't get it
Aleksander Gębicki
@Takumar
Nov 20 2015 00:42
@Zone2345 $("#target1").addClass("animated shake btn-primary") here you add 3 classes.
Remember - one at a time.
Zone2345
@Zone2345
Nov 20 2015 00:44
oh man thx :)
Connor Yanz
@cmy235
Nov 20 2015 00:47
Ok thanks @Takumar !! So would this be the correct code?? (This also runs, but I'm skeptical because my bad code earlier also completed the test)
CamperBot
@camperbot
Nov 20 2015 00:47
cmy235 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 814 | @takumar | http://www.freecodecamp.com/takumar
Connor Yanz
@cmy235
Nov 20 2015 00:47
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL"> </form>
and thanks again @kirah1314 !
CamperBot
@camperbot
Nov 20 2015 00:47
cmy235 sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 356 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Aleksander Gębicki
@Takumar
Nov 20 2015 00:48
@cmy235 for me, it's ok.
Connor Yanz
@cmy235
Nov 20 2015 00:48
great, thank you
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:53
Waypoint: Use a CSS Class to Style an Element
what i´m doing wrong, guys?

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

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

Matt Leonard
@matty22
Nov 20 2015 00:54
Looks good to me
What are the instructions?
AayushGarg
@AayushGarg
Nov 20 2015 00:55
@ricardobortoti Wht are the instructions?
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:55
well, Create a CSS class called red-text and apply it to your h2 element.
despinam
@despinam
Nov 20 2015 00:55
hello to all again. I have an issue with the slot machine in JavaScript "Bring your JavaScript Slot Machine to Life". My code is the following:
$($(".slot") [0]).html(slotOne);
$($(".slot") [1]).html(slotTwo);
$($(".slot") [2]).html(slotThree);
The "you should be displaying the result of the slot numbers in the corresponding slots" is checked, but the "you should have used the selector given in the description to select each slot and assign it the value of slotOne, slotTwo and slotThree respectively" is not checked. What is wrong?
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:55
but he keeps sayng : "Your stylesheet should declare a red-text class and have its color set to red."
Chris
@Aoxom
Nov 20 2015 00:55
@ricardobortoti maybe it doesnt like the space between "color" and ":"? idk
Matt Leonard
@matty22
Nov 20 2015 00:56
Ahh...I bet that space is the issue
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:56
well, let´s see
make your bets :]
Matt Leonard
@matty22
Nov 20 2015 00:56
My money is on @Aoxom
Chris
@Aoxom
Nov 20 2015 00:56
i'm all in (one dollar)
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:57
@Aoxom takes all!
Matt Leonard
@matty22
Nov 20 2015 00:57
Woop woop!
Chris
@Aoxom
Nov 20 2015 00:57
woohoo. lol
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 00:57
thank you guys
Chris
@Aoxom
Nov 20 2015 00:58
happy to help when i can
appreciatethesunrise
@appreciatethesunrise
Nov 20 2015 01:02
Hello World!
CamperBot
@camperbot
Nov 20 2015 01:02

welcome to FreeCodeCamp @appreciatethesunrise!

Matt Leonard
@matty22
Nov 20 2015 01:02
Whoa! Welcome @appreciatethesunrise
appreciatethesunrise
@appreciatethesunrise
Nov 20 2015 01:02
Thank you @matty22 !
CamperBot
@camperbot
Nov 20 2015 01:02
appreciatethesunrise sends brownie points to @matty22 :sparkles: :thumbsup: :sparkles:
:star: 241 | @matty22 | http://www.freecodecamp.com/matty22
Matt Leonard
@matty22
Nov 20 2015 01:02
Ohh I like brownies!
Aleksander Gębicki
@Takumar
Nov 20 2015 01:03
@appreciatethesunrise hello. Enjoy coding on FCC and ask questions when you have problem with anything.
appreciatethesunrise
@appreciatethesunrise
Nov 20 2015 01:04
Looks like a really warm community going on here! Thanks @Takumar !
CamperBot
@camperbot
Nov 20 2015 01:04
appreciatethesunrise sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 815 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 20 2015 01:04
@appreciatethesunrise yes it is, you don't find anywhere place where you will get answers so fast.
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:05
thanks @Aoxom
CamperBot
@camperbot
Nov 20 2015 01:05
ricardobortoti sends brownie points to @aoxom :sparkles: :thumbsup: :sparkles:
:star: 237 | @aoxom | http://www.freecodecamp.com/aoxom
despinam
@despinam
Nov 20 2015 01:06
hello to all again. I have an issue with the slot machine in JavaScript "Bring your JavaScript Slot Machine to Life". My code is the following:
$($(".slot") [0]).html(slotOne);
$($(".slot") 1).html(slotTwo);
$($(".slot") [2]).html(slotThree);
The "you should be displaying the result of the slot numbers in the corresponding slots" is checked, but the "you should have used the selector given in the description to select each slot and assign it the value of slotOne, slotTwo and slotThree respectively" is not checked. What is wrong?
Chris
@Aoxom
Nov 20 2015 01:07
looks like you forgot brackets for that "1"
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:07
@despinam "you should have used the selector given in the description" what is the selector given in the description??
despinam
@despinam
Nov 20 2015 01:08
$(".slot")
@Aoxom I already have brackets for [1], thank you
CamperBot
@camperbot
Nov 20 2015 01:09
despinam sends brownie points to @aoxom :sparkles: :thumbsup: :sparkles:
:star: 238 | @aoxom | http://www.freecodecamp.com/aoxom
despinam
@despinam
Nov 20 2015 01:10
the slot machine works correct but I don't know what else I should do
Chris
@Aoxom
Nov 20 2015 01:10
@despinam you need to remove the spaces between your closing parenthesis for (".slot") and your brackets [0]
despinam
@despinam
Nov 20 2015 01:11
@Aoxom I cannot believe it!!!! Thank you so much!!!!!!!
CamperBot
@camperbot
Nov 20 2015 01:11
despinam sends brownie points to @aoxom :sparkles: :thumbsup: :sparkles:
:warning: despinam already gave aoxom points
Chris
@Aoxom
Nov 20 2015 01:11
@despinam youre welcome :)
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:12
@Aoxom is the "space issues killer"
lol
Chris
@Aoxom
Nov 20 2015 01:12
lol i was just thinking that too
despinam
@despinam
Nov 20 2015 01:12
lol I will always check the spaces from now on
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:14
well, we all learned that freecodecampo doesn´t like spaces
RoadtoMastery
@RoadtoMastery
Nov 20 2015 01:17
can someone reword this without giving me the answer: Create a variable called myData and set it to equal the first value of myArray. var myArray = [1,2,3] thanks
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:18
just call the myArray with the starting index
remember that arrays start in 0 position
RoadtoMastery
@RoadtoMastery
Nov 20 2015 01:18
@ricardobortoti thanks :+1:
CamperBot
@camperbot
Nov 20 2015 01:18
roadtomastery sends brownie points to @ricardobortoti :sparkles: :thumbsup: :sparkles:
:star: 21 | @ricardobortoti | http://www.freecodecamp.com/ricardobortoti
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:19
yeah!
Naomi
@NaomiLea
Nov 20 2015 01:21
I'm a bit stuck. I'm suppose to add one class with 3 selectors in jQuery. How do I do that?
Aleksander Gębicki
@Takumar
Nov 20 2015 01:21
@NaomiLea simple answer - with 3 lines of code :-) Add only one class in each line.
Naomi
@NaomiLea
Nov 20 2015 01:22

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

});

I've done that but it's not right
Aleksander Gębicki
@Takumar
Nov 20 2015 01:22
@NaomiLea you've added 3 classes in last case. Add only 'btn-primary' in last case.
Bill
@kirah1314
Nov 20 2015 01:23
@NaomiLea missing a ; on #target1
Naomi
@NaomiLea
Nov 20 2015 01:23

So could I do it like this $(document).ready(function("#target1) {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary")

});

would that work
@kirah1314 thanks
CamperBot
@camperbot
Nov 20 2015 01:23
naomilea sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 357 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Aleksander Gębicki
@Takumar
Nov 20 2015 01:23
@NaomiLea yes, that will work.
Naomi
@NaomiLea
Nov 20 2015 01:23
thank you! :D
Bill
@kirah1314
Nov 20 2015 01:23
@NaomiLea remove #target1 from $(document).ready(function("#target1)
Aleksander Gębicki
@Takumar
Nov 20 2015 01:24
@kirah1314 oh, that wasn't in first version. :point_up: 20 listopada 2015 02:22
Bill
@kirah1314
Nov 20 2015 01:24
it works with #target1 in there?
yeah she just pasted it like that
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:25
Hi
Naomi
@NaomiLea
Nov 20 2015 01:25
nope it didn't work with #target1 in there but it works now. Thanks everyone
Bill
@kirah1314
Nov 20 2015 01:26
taking credit for @Takumar 's work lol :)
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:26
f
How can I send my code here?
Bill
@kirah1314
Nov 20 2015 01:27
@hmouhtar copy/paste it just like how you're chatting
Ryan Webb
@mcnuggz
Nov 20 2015 01:28
<div class="row">
<h2 class="text-primary text-center col-xs-8">CatPhotoApp</h2>

<a href="#"><img class="img-responsive col-xs-4" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
Pretty sure this is correct yet I'm still getting two errors for Creating Custom Heading in the Bootstrap section
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:29

function titleCase(str) {

words = str.split(" ");

for (var i = 0; i < words.length; i++){

}

}

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

I'm trying to make a for loop that give me the content of the variable words in the respective i possition
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:30
well, inside the for loop just call words[i] to access each element
Aleksander Gębicki
@Takumar
Nov 20 2015 01:30
@mcnuggz I think you should add additional DIVs with class "col-xs-8" and "col-xs-4" containing <h2> and <img> elements.
Which waypoints it is?
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:30
@hmouhtar well, inside the for loop just call words[i] to access each element
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:31
With a empty array, but everytime that my for loop repeats, the content of my array erases and i just get the content of the last word of the variable words
So I'm a little confused
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:32
@hmouhtar can you post your full code?
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:33
@ricardobortoti ok, give me a moment please

function titleCase(str) {

words = str.split(" ");

for (var i = 0; i < words.length; i++){

ar = words[i];

}
return ar;
}

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

Ryan Webb
@mcnuggz
Nov 20 2015 01:34
@Takumar worked, thanks a bunch
Mason Shin
@minsooshin
Nov 20 2015 01:34
@hmouhtar you need to convert the sentense to lower case
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:35
@hmouhtar put the return ar; before the }
Mason Shin
@minsooshin
Nov 20 2015 01:35
also you are returing only first letter of each word
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:35
@ricardobortoti If i do it, i just get the first word of the sentence
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:36
with return, yes
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:36
I'm trying to get an array with each word of the sentence
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:36
but what exacly you need to do with this sentence?
put it in an array?
Alem
@alemneh
Nov 20 2015 01:37
blob
can someone please help me understand why line 165 is logging undefiened?
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:37
Return the provided string with the first letter of each word capitalized
Mason Shin
@minsooshin
Nov 20 2015 01:37
function titleCase(str) {
  var words = str.toLowerCase().split(‘ ‘);
  for (var i = 0; i < words.length; i++) {
    words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1)
  }
  return words.join(‘ ‘);
}
@hmouhtar
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:38
I think that i know how to do it, but the first step for me is put every word into an array
Mason Shin
@minsooshin
Nov 20 2015 01:38
yes
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:38
@minsooshin killed the problem
Mason Shin
@minsooshin
Nov 20 2015 01:38
then you need to change only first letter to uppercase
and append rest of word to it
and the words array will have all the words with first letter uppercase
then you need to join them again with one space
to make a sentence
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:39
What is the function of words[i].slice(1)?
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:40
return the word from the provided number
that is 'foo'.slice(1) = 'oo'
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:41
But why (1) instead (0)?
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 01:41
well... maybe is not index based... or i´m getting wrong lol
Aleksander Gębicki
@Takumar
Nov 20 2015 01:42
@hmouhtar you want to upper case first letter and then add the rest of word, that's why you slice word from second letter to the end - slice(1)
slice(0) would give you entire word.
Himad Mouhtar
@hmouhtar
Nov 20 2015 01:47
Okay, thanks!!
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:02
Got one here that has me scratching my head. The code looks right and compaired to other solutions it should work. Or at least I am missing why it breaks. As it sits here it is out putting 5960001
This message was deleted
CamperBot
@camperbot
Nov 20 2015 02:02
:bulb: to format code use backticks! ``` more info
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:03
This message was deleted
Jelmer Scholte
@knelbert
Nov 20 2015 02:04
In the last basic javascript waypoint, everything works but it still displays Use the provided code three times. one for each slot. Is this a bug?
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:05
function sumFibs(num) {
//Junk out
  if (num === 1){return 1;}
if (num<= 0){return "Invalid input";}
  //end de-junking
  var oldestNum=1;
  var oldNum = 1;
  var currentNum = 2;
  var sumTotal = 0;
  //started at 2
while (currentNum <= num) {
if (oldestNum % 2 !== 0){sumTotal = sumTotal+oldestNum;}
  oldestNum = oldNum;
 oldNum = currentNum;
 currentNum =  oldestNum + oldNum;
 } 
if (2 % oldNum !== 0){sumTotal = sumTotal+oldNum;}
//if (2 % currentNum !== 0){sumTotal = sumTotal+currentNum;}


  return sumTotal;
}

sumFibs(4000000);
The big reason I am scratching my head is that the test has 3 that are right and 2 that are wrong. So I am scratching my head.
Ricardo Bortoti
@ricardobortoti
Nov 20 2015 02:08
@TheDukeOfAwesome this is supposed to sum all fibonacci numbers?
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:08
@ricardobortoti All odd one's
@knelbert Yes the same code but make sure they are driving the correct slots
@ricardobortoti that is why the
if (oldestNum % 2 !== 0){sumTotal = sumTotal+oldestNum;}
Keri Gannon
@kerianngannon
Nov 20 2015 02:10
Can anyone help with adding a div to radio buttons?
Or can someone check what's wrong with my code?
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:10
This message was deleted
Keri Gannon
@kerianngannon
Nov 20 2015 02:11
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:11
This message was deleted
CamperBot
@camperbot
Nov 20 2015 02:11
:bulb: to format code use backticks! ``` more info
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:11
@kerianngannon Post it up. Generally the button code is inside the dive code eg:
<div>
<button name="Button-Burt"></button>
</div>
Jelmer Scholte
@knelbert
Nov 20 2015 02:12
Duke of awesome which numbers don't work in the bonfire?
Keri Gannon
@kerianngannon
Nov 20 2015 02:12
@TheDukeOfAwesome Thanks. Wasn't sure how to format properly.

  <div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
CamperBot
@camperbot
Nov 20 2015 02:12
kerianngannon sends brownie points to @thedukeofawesome :sparkles: :thumbsup: :sparkles:
:star: 239 | @thedukeofawesome | http://www.freecodecamp.com/thedukeofawesome
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:13
@knelbert 75024 and 4000000 don't test out right (Bonfire: Sum All Odd Fibonacci Numbers)
Keri Gannon
@kerianngannon
Nov 20 2015 02:13
These are the instructions :
  • 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.
Jelmer Scholte
@knelbert
Nov 20 2015 02:14
@TheDukeOfAwesome And what is the logged as the outcome if you use 75024
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:14
@knelbert 78407
@knelbert 5960001 respectivly
Keri Gannon
@kerianngannon
Nov 20 2015 02:16
Yikes. I was putting the code around the wrong button. I figured it out.
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:17
@kerianngannon That is how she goes some days. I have had single characters stop progress for a few mins on more than a few occassions so it is part of learning.
Keri Gannon
@kerianngannon
Nov 20 2015 02:19
@TheDukeOfAwesome Thank you for the reminder. I took a couple days off of learning code and I found myself already forgetting what a radio button was.
CamperBot
@camperbot
Nov 20 2015 02:19
kerianngannon sends brownie points to @thedukeofawesome :sparkles: :thumbsup: :sparkles:
:warning: kerianngannon already gave thedukeofawesome points
Joseph
@revisualize
Nov 20 2015 02:21
Help.
CamperBot
@camperbot
Nov 20 2015 02:21

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

Joseph
@revisualize
Nov 20 2015 02:21
Thanks.
Rex Schrader
@SaintPeter
Nov 20 2015 02:21
@revisualize That's not human . . .
@revisualize There are actual humans here to help!
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:21
@kerianngannon I was a programmer in my last job and this time around I want a different kind of programming job. So I am learning and rebuilding a current modern web portfolio. I try and answer 5-7 questions for every one I ask. Just good Karma that way. So sometimes we just talk through something and we figure it out.
SaintPeter @SaintPeter stands at attention
Rex Schrader
@SaintPeter
Nov 20 2015 02:22
@TheDukeOfAwesome Will that make you the Duke Of URL?
Joseph
@revisualize
Nov 20 2015 02:23
@SaintPeter Clearly. Thank you.
CamperBot
@camperbot
Nov 20 2015 02:23
revisualize sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1597 | @saintpeter | http://www.freecodecamp.com/saintpeter
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:23
@SaintPeter I needed something a little more edgy and progressive and that was the first idea. Hey, I got one stumping me about 3-4 scrolls up if you have any ideas.
Rex Schrader
@SaintPeter
Nov 20 2015 02:23
@TheDukeOfAwesome If you alt-click the timestamp it takes me right to it
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:24
@SaintPeter Thanks :point_up: November 19, 2015 9:05 PM
CamperBot
@camperbot
Nov 20 2015 02:24
thedukeofawesome sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1598 | @saintpeter | http://www.freecodecamp.com/saintpeter
Alexander Estupinan
@Stupkid1025
Nov 20 2015 02:25
absolutely been stuck on this

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

<img class="smaller-image thick-green-border border-radius" 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>

apply border-radius
to 10 px
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:25
@Stupkid1025 What are you attempting to do?
Alexander Estupinan
@Stupkid1025
Nov 20 2015 02:26
just give the photo
a border-radius
of 10 px
Jelmer Scholte
@knelbert
Nov 20 2015 02:27
@TheDukeOfAwesome I have the array of sumfibs(75024) here [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368]. The error is that 17711 is added twice. In the array of sumfibs(4000000) the same happens that the third from last gets added twice.
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:27

What you have

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

Should be

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
`
err
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
     border-radius: 10px;};
Alexander Estupinan
@Stupkid1025
Nov 20 2015 02:29
@TheDukeOfAwesome thank you
CamperBot
@camperbot
Nov 20 2015 02:29
stupkid1025 sends brownie points to @thedukeofawesome :sparkles: :thumbsup: :sparkles:
:star: 240 | @thedukeofawesome | http://www.freecodecamp.com/thedukeofawesome
Rex Schrader
@SaintPeter
Nov 20 2015 02:29
@TheDukeOfAwesome Digging
Jenny Jones
@spinningjenny07
Nov 20 2015 02:31
I'm working on the Create a Form Element. And I can't figure out why my form element doesn't show up with the action attibute. <form>
<input type="text" placeholder="cat photo URL" action="/submit-cat-photo">
</form>
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:31
@knelbert Thanks that makes sense now
CamperBot
@camperbot
Nov 20 2015 02:31
thedukeofawesome sends brownie points to @knelbert :sparkles: :thumbsup: :sparkles:
:star: 238 | @knelbert | http://www.freecodecamp.com/knelbert
Corey
@CoreA4
Nov 20 2015 02:31
Stuck on bootstraps can anyone assist me?
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:32
@CoreA4 which waypoint?
Jelmer Scholte
@knelbert
Nov 20 2015 02:32
@TheDukeOfAwesome Np
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:32
@SaintPeter Found it it is the add after the exit. It is doing something I didn't expect
Rex Schrader
@SaintPeter
Nov 20 2015 02:32
@TheDukeOfAwesome I was wondering what was going on there
Corey
@CoreA4
Nov 20 2015 02:33
@RoadtoMastery Use Responsive Design with Bootstrap Fluid Containers
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:33
It made sense to only add the oldest and take care of the rest out of the loop.
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:33
@CoreA4 which part are you stuck on. post your code so that I or someone else can better assist you :smile:
Corey
@CoreA4
Nov 20 2015 02:34
<div class="container-fluid"> </div> I added this but I think there’s one part that I’m still missing
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:37
@CoreA4 nest the HTML elements inside the <div class ="container-fluid"> and end with a </div> at the very end of the next line of HTML
Jelmer Scholte
@knelbert
Nov 20 2015 02:38
@CoreA4 Is it the waypoint: House our page within a Bootstrap Container Fluid Div? did you close the div with </div> after the <h3 class="text-primary text-center">jQuery Playground</h3>. The idea is that they want the h3 text in the div.
Corey
@CoreA4
Nov 20 2015 02:41
The provided HTML?
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:41
@CoreA4 yes
<div class="container-fluid"> should be above any other HTML elements
Molly Eichar
@terra-bites
Nov 20 2015 02:44
I give up: "The property nickname of myCar should be a string." HOW???? It should be dead simple but I'm not there somehow.
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:44
@SaintPeter @knelbert
if (2 % oldNum !== 0){sumTotal = sumTotal+oldNum;}
//Should of been
if(oldNum % 2 !== 0){sumTotal=sumTotal+oldNum;}
Corey
@CoreA4
Nov 20 2015 02:44
I don’t need to add this line<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css”/>;, do I?
Molly Eichar
@terra-bites
Nov 20 2015 02:45
Feeling so-o-o stoopid
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:45
@terra-bites strings are in this format "this is a string"
Jelmer Scholte
@knelbert
Nov 20 2015 02:45
@terra-bites First call the constructor Car on the your variable myCar, like this. var myCar = new Car()
Molly Eichar
@terra-bites
Nov 20 2015 02:45
That I'm okay with. It's the nickname that eludes me.
Jelmer Scholte
@knelbert
Nov 20 2015 02:46
@terra-bites Then afer that just simply give the car a nickname by myCar.nickname = "stringhere";
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:46
@CoreA4 no. that is part of the styles.
e-lion
@e-lion
Nov 20 2015 02:46
hi guys im a bit stuck
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:46
@e-lion That's what we do here. That and look awesome.
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:47
@e-lion hi. Please post your waypoint and what you have so far :smile:
Corey
@CoreA4
Nov 20 2015 02:47
I’m not sure what the next step is then
e-lion
@e-lion
Nov 20 2015 02:47
hey thanks guys :D
Molly Eichar
@terra-bites
Nov 20 2015 02:47
@knelbert I had tried that more than once, but somehow I must have mis-typed because with your magic ... it worked. Thank you!
CamperBot
@camperbot
Nov 20 2015 02:47
terra-bites sends brownie points to @knelbert :sparkles: :thumbsup: :sparkles:
:star: 240 | @knelbert | http://www.freecodecamp.com/knelbert
e-lion
@e-lion
Nov 20 2015 02:47
im stuck here: Waypoint: Add Font Awesome Icons to our Buttons
mariocatch
@mariocatch
Nov 20 2015 02:47
@e-lion what are you stuck on?
e-lion
@e-lion
Nov 20 2015 02:48
where do i put the i tag?
Molly Eichar
@terra-bites
Nov 20 2015 02:48
PS I knew it should be easy
Jelmer Scholte
@knelbert
Nov 20 2015 02:48
@terra-bites Yeah, guessed something like that, happens to the best.
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:48
@e-lion under the class add
class="whatever awesome-font"
mariocatch
@mariocatch
Nov 20 2015 02:48

@e-lion check the instructions

You should add a <i class="fa fa-info-circle"></i> within your info button element.

RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:48
@CoreA4 this is the format <div class="container-fluid><Lots of lines of HTML>.....</div>
e-lion
@e-lion
Nov 20 2015 02:49
@mariocatch were do i close ti ei tag?
mariocatch
@mariocatch
Nov 20 2015 02:49

@e-lion not to repeat, but - we'd be telling you exactly what the instructions say:

You should add a <i class="fa fa-trash"></i> within your delete button element.
You should add a <i class="fa fa-info-circle"></i> within your info button element.
Make sure each of your i elements has a closing tag and <i class="fa fa-thumbs-up"></i> is in your like button element.

@e-lion the opening and closing are given to you there
Corey
@CoreA4
Nov 20 2015 02:50
@RoadtoMastery I’m still not sure why its not working, I keep gettingMake sure you have nested all HTML elements in .container-fluid.
e-lion
@e-lion
Nov 20 2015 02:51
@mariocatch do i create a new div on the button?
mariocatch
@mariocatch
Nov 20 2015 02:51
nope
Corey
@CoreA4
Nov 20 2015 02:51
@RoadtoMastery Nevermind, got it. Thanks A LOT
CamperBot
@camperbot
Nov 20 2015 02:51
corea4 sends brownie points to @roadtomastery :sparkles: :thumbsup: :sparkles:
:star: 165 | @roadtomastery | http://www.freecodecamp.com/roadtomastery
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:52
@CoreA4 no problem. second day here lol
Corey
@CoreA4
Nov 20 2015 02:52
This is my third but I still feel like I don’t know too much @RoadtoMastery
Rex Schrader
@SaintPeter
Nov 20 2015 02:53
@TheDukeOfAwesome BTW, += is our friend
mariocatch
@mariocatch
Nov 20 2015 02:53
@e-lion the <i> tag you can consider like an icon, or placeholder for something. so when you use it within a button element, you're basically saying "Something is going to go right here."
@e-lion and when you apply the fontsawesome classes to the <i> element, you're applying an actual icon/image right there in that spot
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:54
@CoreA4 I can barely remember bootstrap and CSS formats. trying to understand why my code works for a function right now before i move on to the next one
mariocatch
@mariocatch
Nov 20 2015 02:54
@e-lion meaning your button will have an icon right before its text
Carl J. Kashnier
@CarlJKashnier
Nov 20 2015 02:55
@SaintPeter That's a new one, I have some bad VB habits I am still working through. but I should add that one to the bag of tricks.
mariocatch
@mariocatch
Nov 20 2015 02:55

take a look at this example they give you:
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>

this is:

  • Creating a button
  • Applying some bootstrap classes to it (btn btn-primary)
  • Adding a thumbs up icon in it
  • Adding the text Like in it
@e-lion: it may be more easily read as:
<!-- this is identical to the line below -->
<button class="btn btn-block btn-primary">
    <i class="fa fa-thumbs-up"></i> 
    Like
</button>

<!-- this is identical to the line above -->
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
Corey
@CoreA4
Nov 20 2015 02:56
@RoadtoMastery I think I need to slow down. I may be going so fast that I may forget all that I’ve learned by Monday
RoadtoMastery
@RoadtoMastery
Nov 20 2015 02:57
@CoreA4 I agree. At least you can go back and relearn the things you have forgotten
Eude Lesperance
@lkeude96
Nov 20 2015 02:57
This great guys :)
is^
e-lion
@e-lion
Nov 20 2015 02:58
@mariocatch Thanks!it worked, was using the tag outside the button, and was closing it outside the button. :+1:
mariocatch
@mariocatch
Nov 20 2015 02:59
@e-lion no problem. sometimes it helps to see code written a different way. you don't always need to write it all on one line if it's unreadable.
readability trumps all in coding :) designing clean code is an art
96street
@96street
Nov 20 2015 02:59
Waypoint: Make Object Properties Private
e-lion
@e-lion
Nov 20 2015 02:59
ture
96street
@96street
Nov 20 2015 02:59
Now try it yourself! Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value.
e-lion
@e-lion
Nov 20 2015 02:59
true
96street
@96street
Nov 20 2015 02:59

var Bike = function() {

// Only change code below this line.
var gear = 5;

this.getGear = function() {
gear += 2;
};

this.setGear = function()
gear -= 2;
};

whats wrong with my code?
mariocatch
@mariocatch
Nov 20 2015 03:00
your gear isn't private
Rex Schrader
@SaintPeter
Nov 20 2015 03:00
@96street getGear needs to return a value
@mariocatch Yes it is
mariocatch
@mariocatch
Nov 20 2015 03:00
oops misread it
it's not formatted so hard to read
help format
CamperBot
@camperbot
Nov 20 2015 03:00

: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

96street
@96street
Nov 20 2015 03:00
hmm
Rex Schrader
@SaintPeter
Nov 20 2015 03:00
@96street Also, setGear needs to accept a parameter and assign it to gear
96street
@96street
Nov 20 2015 03:01
var Bike = function() {

  // Only change code below this line.
var gear = 5;

this.getGear = function() {
  gear += 2;
};

this.setGear = function()
  gear -= 2;
};
mariocatch
@mariocatch
Nov 20 2015 03:01
thanks @96street :)
CamperBot
@camperbot
Nov 20 2015 03:01
mariocatch sends brownie points to @96street :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for 96street
96street
@96street
Nov 20 2015 03:01
ok thanks ill try
still not sure exactly what to return
mariocatch
@mariocatch
Nov 20 2015 03:04
@96street take a look at the example code in that waypoint:
  this.getSpeed = function() {
    return speed;
  };
this is a public method that returns a private variable, speed.
so you could apply that same concept to your public method of getGear, to retrieve your private gear variable
96street
@96street
Nov 20 2015 03:05

var Bike = function() {

  // Only change code below this line.
var gear = 5;


this.setGear = function()
  gear = +=;
};

this.getGear = function() {
  return gear;
};
that doesnt work either
+= 5**
mariocatch
@mariocatch
Nov 20 2015 03:07
that does work for me
post your code again, without syntax errors
such as, you're missing an opening brace on setGear
96street
@96street
Nov 20 2015 03:09
var Bike = function() {

  // Only change code below this line.
var gear = 5;


this.setGear = function() {
  gear = += 5;
};

this.getGear = function() {
  return gear;
};




  // Only change code above this line.
};
mariocatch
@mariocatch
Nov 20 2015 03:09
ah
check out your setGear method
read out loud this statement: gear = += 5;
96street
@96street
Nov 20 2015 03:09
ahh yeah just saw it
haha thanks
mariocatch
@mariocatch
Nov 20 2015 03:09
:)
Ryan Webb
@mcnuggz
Nov 20 2015 04:08
<script>
$(document).ready(function() {
$("button, .btn #target1").addClass("animated shake btn-primary");
});
</script>
target same element with multiple jquery selectors.
Bill
@kirah1314
Nov 20 2015 04:10
@mcnuggz you should have 3 selectors and each with an addClass
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:12
Guys need help on chunky munky bonfire
CamperBot
@camperbot
Nov 20 2015 04:12
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:12
got stucked on it
Bill
@kirah1314
Nov 20 2015 04:12
@pranavdoshi post your codes?
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:12
i applied the join function but how should i split meaning what delimiter should i use that i am tcuked
@kirah1314
Bill
@kirah1314
Nov 20 2015 04:13
@pranavdoshi ok care to show what you have now...?
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:13

function chunk(arr, size) {
// Break it up.
alert( arr.join(""));

return arr;
}

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

function chunk(arr, size) {
  // Break it up.
  alert( arr.join(""));

  return arr;
}

chunk(["a", "b", "c", "d"], 2);
so i got the string abcd but how can i split now delimiter to use.
@kirah1314
Bill
@kirah1314
Nov 20 2015 04:14
@pranavdoshi you need a for loop to loop through arr, you also need to use slice() and an empty array to save the new arrays
@pranavdoshi why do you convert to string? you still need to slice it string or array
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:16
@kirah1314 maybe thought of converting to string then spliting and pushing to array but that will not work.
Bill
@kirah1314
Nov 20 2015 04:17
@pranavdoshi why not just split (slice) and push while it's already an array? There's really no need to convert it to a string
@pranavdoshi i gave you many hints :) for loop, slice() and an empty array to save the outcome
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:18
yeah need get info on slice will do that and den getback to u
@kirah1314 yeah let me now try to do it
:)
Pranav Doshi
@pranavdoshi
Nov 20 2015 04:42
@kirah1314 dude not getting the for loop under slice method
Abby
@s0uth
Nov 20 2015 04:53
This message was deleted
Hello, everyone! I need help in #219. I get the correct output on the left but I don't get the heads up to continue to the next waypoint. Is there a bug at this waypoint? Thanks! Here's my code
var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val) {

  return val > 5;

});

// Only change code above this line.

(function() { return newArray; })();
Hans van Riet
@hansinla
Nov 20 2015 04:58
@s0uth I don’t think you get the correct output. You’re keeping everything >5 You need the keep everything <=5
Mo Battah
@MoBattah
Nov 20 2015 05:02
Hey guys, having a small issue over here on a HTML challenge in regards to forms
Hans van Riet
@hansinla
Nov 20 2015 05:03
@MoBattah okay...
Mo Battah
@MoBattah
Nov 20 2015 05:03
It's for the lesson named: Waypoint: Create a Form Element and here's my code
<form>
<form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL">
I tried adding </form> but that doesn't help
This works <form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL"> </form> but it doesn't satisfy the requirement "Nest your text input element within a form element."
Abby
@s0uth
Nov 20 2015 05:05
ahhhh right, right! Thanks @hansinla
CamperBot
@camperbot
Nov 20 2015 05:05
s0uth sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 605 | @hansinla | http://www.freecodecamp.com/hansinla
Mo Battah
@MoBattah
Nov 20 2015 05:06
Woops! I GOT IT!
Hans van Riet
@hansinla
Nov 20 2015 05:06
@MoBattah well this </form> is a closing tag, so it would have to be preceded by a <form> tag
Mo Battah
@MoBattah
Nov 20 2015 05:06
Stupid mistake
Thank you @hansinla
CamperBot
@camperbot
Nov 20 2015 05:07
mobattah sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 606 | @hansinla | http://www.freecodecamp.com/hansinla
Mo Battah
@MoBattah
Nov 20 2015 05:07
@hansinla How long til I'm done with HTML & CSS and I get started on a real programming language and not markup?
Hans van Riet
@hansinla
Nov 20 2015 05:07
@MoBattah Soon enough
Mo Battah
@MoBattah
Nov 20 2015 05:08
@hansinla haha! Thank you for the answer! :)
CamperBot
@camperbot
Nov 20 2015 05:08
mobattah sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:warning: mobattah already gave hansinla points
Jason
@Jauble
Nov 20 2015 05:19
anyone good with bootstrap?
Darwin RC
@darwinrc
Nov 20 2015 05:19
@Jauble what's your issue?
Jason
@Jauble
Nov 20 2015 05:22
On my random quote generator, in the text area where it puts the quote, it gets really small when minimized. I have it in a col-xs-6 and two col-xs3's surrounding it. I basically want to remove the col-xs-3's and make the col-xs-6 a col-xs-12 when it gets down to the phone size
  <div class="row">
   <div class="col-xs-3"></div>
    <div class="col-xs-6">
      <div id="textArea" class="text-center">
        <p>Welcome :)</p>
      </div>
    </div>
   <div class="col-xs-3"></div>
  </div>
Darwin RC
@darwinrc
Nov 20 2015 05:24
well, I'm not familiar with the quote generator yet... just arrived to freecodecamp.... but I guess what you can do is us both classes: col-xs-12 and col-md-6
Jason
@Jauble
Nov 20 2015 05:25
so the 12 will work when its small and md will work otherwise?
Darwin RC
@darwinrc
Nov 20 2015 05:25
in the Mixed: mobile and desktop section they explain it
anyhow, you have to be sure you always keep the 12 cols ratio in all cases
Jason
@Jauble
Nov 20 2015 05:26
Thanks I'll check that out
Darwin RC
@darwinrc
Nov 20 2015 05:27
welcome
MIN
@una720302
Nov 20 2015 05:27
question:Nest your form submission button and text input in a div with class row.
Nest your form text input in a div with the class col-xs-7.
Nest your form submission button in a div with the class col-xs-5.
Make sure each of your div elements has a closing tag. i have been stuck in this one for at least 40 minutes and have no idea what i should do. Help please.
Darwin RC
@darwinrc
Nov 20 2015 05:30
@una720302 I assume is something like this:
<div class="col-xs-7"> <input type="text"...> </div> <div class="col-xs-5"><button></button></div>
srinivas
@srinivasdasu
Nov 20 2015 05:35

@una720302

<form ><div class="row"><div class="col-xs-7"><input type="text"..></div><div class="col-xs-5"><button type="submit"></button></div></div></form>

MIN
@una720302
Nov 20 2015 05:39
@srinivasdasu thank you
CamperBot
@camperbot
Nov 20 2015 05:39
una720302 sends brownie points to @srinivasdasu :sparkles: :thumbsup: :sparkles:
:star: 276 | @srinivasdasu | http://www.freecodecamp.com/srinivasdasu
MIN
@una720302
Nov 20 2015 05:39
@darwinrc thx
Darwin RC
@darwinrc
Nov 20 2015 05:40
welcome
Pranav Doshi
@pranavdoshi
Nov 20 2015 05:46
guys stuck on bonfire chunky munky need help having some doubts.
Robert Richey
@0x0936
Nov 20 2015 05:51
@pranavdoshi show your code please
unless you have a general question
Pranav Doshi
@pranavdoshi
Nov 20 2015 05:51
@0x0936 one sec
function chunk(arr, size) {
  // Break it up.
    var newarr = [];
 for(var i=0;i<arr.length;i++)
 {

     alert(arr.slice(0,num));

 }   
  return arr;
}

chunk(["a", "b", "c", "d"], 2);
@0x0936
first i thought of using join and split cant figure out the way to split as which delimiter to use
den someone suggested to use slice
within for loop
but how to make forloop start from next index after first part is sliced out.
@0x0936
Robert Richey
@0x0936
Nov 20 2015 05:54
@pranavdoshi increment i by size, not by 1. also, num is undefined. I think you wanted size there.
Jagadeeswara Reddy Yaramala
@yjags03
Nov 20 2015 05:54
@0x0936 what is num in your code?
Hans van Riet
@hansinla
Nov 20 2015 05:54
@pranavdoshi instead of i++ use i+=size
Pranav Doshi
@pranavdoshi
Nov 20 2015 05:55
ohh
i+=size
i didnt understand
ohh understood
it will start from 2
and @0x0936 and @hansinla the first method i suggested is it possible
Hans van Riet
@hansinla
Nov 20 2015 05:56
@pranavdoshi no, i will start at 0 but will increment with size
Pranav Doshi
@pranavdoshi
Nov 20 2015 05:56
join den split
dat i understood @hansinla
Robert Richey
@0x0936
Nov 20 2015 05:57
you don't need to use join or split
Pranav Doshi
@pranavdoshi
Nov 20 2015 05:59
@0x0936 not getting desired output
function chunk(arr, size) {
  // Break it up.
    var newarr = [];
 for(var i=0;i<arr.length;i=i+size)
 {

     alert(arr.slice(arr[i],size));

 }   
  return arr;
}

chunk(["a", "b", "c", "d"], 2);
Hans van Riet
@hansinla
Nov 20 2015 06:01
@pranavdoshi you want arr.splice(0, size)
Robert Richey
@0x0936
Nov 20 2015 06:02
@pranavdoshi notice that your code still uses alert instead of pushing the result from slicing to newarr
using slice, the arguments should be i and size
don't use splice inside a for loop when testing against the size of arr, because arr will reduce with each call to splice
arguments to slice should be i and i + size, sorry
.slice(startIndex, endIndex)
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:04
why i+size as end index?
Robert Richey
@0x0936
Nov 20 2015 06:05
because as i increases, you want the endIndex to be size away from i
it's different from splice
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:06
@0x0936 i ma not getting
function chunk(arr, size) {
  // Break it up.
    var newarr = [];
 for(var i=0;i<arr.length;i=i+size)
 {

     newarr= arr.slice(i,i+size).push();
     alert(newarr[0]);
 }   
  return arr;
}

chunk(["a", "b", "c", "d"], 2);
Robert Richey
@0x0936
Nov 20 2015 06:07
to push a value to an array, the syntax is array.push(value)
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:07
ohh now i understood why i+size.
Jon
@jgtwo1
Nov 20 2015 06:08
How do I make my link "dead"
Robert Richey
@0x0936
Nov 20 2015 06:08
@jgtwo1 <a href="#"></a>
Jon
@jgtwo1
Nov 20 2015 06:08
Thanks
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:09
@0x0936 now is it proper?

function chunk(arr, size) {
// Break it up.
var newarr = [];
for(var i=0;i<arr.length;i=i+size)
{

 newarr.push(arr.slice(i,i+size));

}
return arr;
}

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

Robert Richey
@0x0936
Nov 20 2015 06:10
what are you trying to return?
Hans van Riet
@hansinla
Nov 20 2015 06:10
@pranavdoshi no, you’re returning arr, which was the original argument
Robert Richey
@0x0936
Nov 20 2015 06:11
@pranavdoshi also, may have to modify the condition in the for loop to be i < arr.length - size because you don't want to be slicing out of the array's bounds as i reaches the final elements
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:13
haaan that i know . but modifying the cond can u explain in detail
@0x0936
Robert Richey
@0x0936
Nov 20 2015 06:13
I'm wrong on that last part
don't modify the for loop's condition
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:13
becoz without modifying it is working
Robert Richey
@0x0936
Nov 20 2015 06:13
yep
Hans van Riet
@hansinla
Nov 20 2015 06:13
@pranavdoshi I will give you this in consideration; in this case a while loop may be more appropriate, while (arr. length) and then use splice in the loop
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:14
and i wanted to ask u
@0x0936
can u tell if i use join method on arr and den split and lastly push to new arr wud dat be possible as another way?
Robert Richey
@0x0936
Nov 20 2015 06:15
why would you want to do that?
join combines the elements of an array into a string
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:15
bcoz join will convert to string and we can split the string
Victor Tang
@vtange
Nov 20 2015 06:16
splitting the string will require a breaking point
Robert Richey
@0x0936
Nov 20 2015 06:16
slice gives you an array. you need to return an array of arrays.
Victor Tang
@vtange
Nov 20 2015 06:16
which join makes a ton of and you have no way of saying,
'split on the 2nd, or 3rd breaking point'
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:16
becoz while first i did not got thought of using slice
Victor Tang
@vtange
Nov 20 2015 06:16
without using some sort of fancy regex or string manipulation
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:17
ohh
thanks @0x0936 @hansinla
CamperBot
@camperbot
Nov 20 2015 06:17
pranavdoshi sends brownie points to @0x0936 and @hansinla :sparkles: :thumbsup: :sparkles:
Robert Richey
@0x0936
Nov 20 2015 06:17
I've completed this bonfire using slice, splice, shift and pop. never did I use join or split
CamperBot
@camperbot
Nov 20 2015 06:17
:star: 355 | @0x0936 | http://www.freecodecamp.com/0x0936
:star: 607 | @hansinla | http://www.freecodecamp.com/hansinla
Robert Richey
@0x0936
Nov 20 2015 06:18
you're welcome! :)
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:18
cool will try using other methods
dude also thought of getting the particular method of index within for loop and popping them out though that will reuqire a if condition within for loop
@0x0936 above method
thats what using pop right?
particular method i meant value
typo error
Robert Richey
@0x0936
Nov 20 2015 06:19
pop removes the last element of an array
it's quite a bit harder solving this with shift and pop - I don't recommend it
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:20
cool
but if we use to remove element from starting index i guess unshift method den?
Robert Richey
@0x0936
Nov 20 2015 06:21
shift removes first element
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:21
ohhh
MIN
@una720302
Nov 20 2015 06:21
how do you do this?===>Nest three button elements within each of your div elements with class well.<===? please and thank you.
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:21
these methods always confuse me
@0x0936 do u remember all methods?
at wat time wic method to use?
Robert Richey
@0x0936
Nov 20 2015 06:22
@pranavdoshi no. but I've used a lot of them enough and read the documentation a lot
there's still a lot I don't know
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:22
u working only on fcc?
or learning from outside also?
@0x0936
and @una720302
wat happen @una720302
Robert Richey
@0x0936
Nov 20 2015 06:23
Treehouse, Codeschool, edX, Coursera, Codecademy, Khan Academy
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:23
paid ones dey are
Robert Richey
@0x0936
Nov 20 2015 06:23
only first 2
@una720302 can you post a link to that waypoint?
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:24
are dey worth trying i am also on beginner track cud u suggest me some path or only fcc ?
@0x0936
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:25
@una720302 sixth well wat do u mean by dat?
Robert Richey
@0x0936
Nov 20 2015 06:26
Treehouse and Codeschool are great. If you prefer free, Codecademy and Khan Academy may be good for you.
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:26
khan academy has js course?
MIN
@una720302
Nov 20 2015 06:27
@pranavdoshi sorry i meant 3rd well
and make 6 total button
Robert Richey
@0x0936
Nov 20 2015 06:27
there are only 2 wells. 3 buttons in each
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well">

        <!-- add 3 buttons here -->

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

        <!-- add 3 buttons here -->

      </div>
    </div>
  </div>
</div>
MIN
@una720302
Nov 20 2015 06:29
@0x0936 oh......... thank you and can i use this code to add whatever like <!-- add 3 rows here-->?
CamperBot
@camperbot
Nov 20 2015 06:29
una720302 sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 356 | @0x0936 | http://www.freecodecamp.com/0x0936
Robert Richey
@0x0936
Nov 20 2015 06:30
those are html comments. <!-- the browser will not render this -->
MIN
@una720302
Nov 20 2015 06:30
@0x0936 thank you so much
CamperBot
@camperbot
Nov 20 2015 06:30
una720302 sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:warning: una720302 already gave 0x0936 points
Robert Richey
@0x0936
Nov 20 2015 06:30
you're welcome! :)
MIN
@una720302
Nov 20 2015 06:31
@0x0936 it didn't work.
Robert Richey
@0x0936
Nov 20 2015 06:32
let's see your code
MIN
@una720302
Nov 20 2015 06:34
@0x0936 i got it. i typed what you show on the screen..... lol this was what i type==><button type="button"></button> times 3
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:34
yes i also didnt get the first teest case
i am also trying
Robert Richey
@0x0936
Nov 20 2015 06:35
@una720302 cool :)
@pranavdoshi still having trouble with chunky? post your code
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:37
no
thanks @0x0936
CamperBot
@camperbot
Nov 20 2015 06:37
pranavdoshi sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:warning: pranavdoshi already gave 0x0936 points
Robert Richey
@0x0936
Nov 20 2015 06:37
alright, cool :)
Pranav Doshi
@pranavdoshi
Nov 20 2015 06:37
@una720302 did u get the soltn??
Vinamra
@iambali
Nov 20 2015 06:44
$(".target:nth-child(2)").addClass("animated-bounce");
 $(".target:nth-child(2)").addClass("animated-bounce");
still not working
am doing something wrong ??
Markus Kiili
@Masd925
Nov 20 2015 06:49
@iambali try "animated bounce"
Vinamra
@iambali
Nov 20 2015 06:50
thanks @Masd925
CamperBot
@camperbot
Nov 20 2015 06:50
iambali sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 291 | @masd925 | http://www.freecodecamp.com/masd925
Elliott McNary
@bighitbiker3
Nov 20 2015 06:59
Can someone help me figure out why I can't get this remove class to work?
MIN
@una720302
Nov 20 2015 07:07
quesion: how to do this in JQurey Apply the target class to each of your button elements? Please and Thank you.
Victor Tang
@vtange
Nov 20 2015 07:08
  1. you're declaring a new 'active' variable inside your click functions, that means when you say active = false you only make the one inside the function false
two. using "active/inactive" as a global to control if your buttons are active or not isn't a great idea, it might lead to bugs when you click on other buttons
three: I think what you're looking for is "mousedown" and "mouseup", instead of "click"
if you want your buttons to turn black for the moment i click the button
$('.keys span').on('mouseup', function(){
$(this).removeClass('active');
})
$('.keys span').on('mousedown', function() {
$(this).addClass('active');
})
@una720302 you want to add a class to all button elements?
Victor Tang
@vtange
Nov 20 2015 07:14
$(".insert-button-element-class").addClass("class-you-want-added");
but why do it in js when you can do it in css
MIN
@una720302
Nov 20 2015 07:17
@vtange it asks me to put target by using JQuery function but it didn't say how to use JQuery
@vtange Waypoint: Create a Class to Target with jQuery Selectors
Victor Tang
@vtange
Nov 20 2015 07:17
oh
you don't need to use any jquery in that lesson
it's just plain ol html
add "target" class after all the other "btn" classes
all buttons should look like this
<button class="btn btn-default target"></button>
remember to put a space between all classes :)
MIN
@una720302
Nov 20 2015 07:20
@vtange i see and thank you
CamperBot
@camperbot
Nov 20 2015 07:20
una720302 sends brownie points to @vtange :sparkles: :thumbsup: :sparkles:
:star: 299 | @vtange | http://www.freecodecamp.com/vtange
Victor Tang
@vtange
Nov 20 2015 07:22
the reason why it says Jquery @una720302 is because later on you'll see that Jquery uses the $(".target") to grab those buttons to animate or do whatever with
that's all
Rabin Shrestha
@jyapujuju
Nov 20 2015 07:27
how to compare .keypress with arr[x]
96street
@96street
Nov 20 2015 07:32
Waypoint: Condense arrays with reduce - I have no idea what the heck this is can someone explain

The array method reduce is used to iterate through an array and condense it into one value.

To use reduce you pass in a callback whose arguments are an accumulator (in this case, previousVal) and the current value (currentVal).

reduce has an optional second argument which can be used to set the initial value of the accumulator. If no initial value is specified it will be the first array element and currentVal will start with the second array element.

Victor Tang
@vtange
Nov 20 2015 07:33
when you use functions like .reduce and .sort you input a function to let reduce/sort know how you want things to be reduced/sorted
if you wanted things to be all summed up together it's
Arr.reduce(function(a,b){ return a+b;});
notice how i basically created a function inside .reduce()
you can make functions outside reduce and then call it inside
96street
@96street
Nov 20 2015 07:34
What's the point of this?
Victor Tang
@vtange
Nov 20 2015 07:34
makes code more modular/reusable
and when you're looping it saves you the resources of creating a new function everytime you reduce something
which i recall is a no-no
don't do a for loop with a .reduce(function(....blah blah)
cause you're literally creating new functions then everytime you loop
96street
@96street
Nov 20 2015 07:35
Are currentVal & previousVal just variables?
Victor Tang
@vtange
Nov 20 2015 07:35
yes
you can just use a, b
it's a placeholder for reduce to compare a value with a value after it
try out sort()
.sort(function(a,b){return a>b});
96street
@96street
Nov 20 2015 07:36
So singleVal is the result after currentVal has been reduced?
Victor Tang
@vtange
Nov 20 2015 07:37
i guess
reduce always tries to produce a single value
if you reduced an array of numbers you can sum them all up, or even multiply them all
96street
@96street
Nov 20 2015 07:38
thanks, can you just go through the exercise with me
what's a callback?
callbacks
the 226 vote one
anyways.
for your waypoint, you have an
var array = [4,5,6,7,8];
96street
@96street
Nov 20 2015 07:40
wait 1 sec let me read it
Victor Tang
@vtange
Nov 20 2015 07:40
that array can use the .reduce command, (all arrays can)
k
96street
@96street
Nov 20 2015 07:41
ok sweet
so the array yep go on
Victor Tang
@vtange
Nov 20 2015 07:42
so if you wanted to reduce that array, you'd natrually go
array.reduce()
96street
@96street
Nov 20 2015 07:43
one question i wanted to ask was: what exacty does ".reduce" reduce the array to?
what does it reduce?
Victor Tang
@vtange
Nov 20 2015 07:43
think of it as crunching down all those numbers into one number
so you don't want 5 numbers, you want 1
96street
@96street
Nov 20 2015 07:43
how does it get to that one number?
Victor Tang
@vtange
Nov 20 2015 07:44
depends on what you tell reduce
if you said
var singleVal = array.reduce(function(a,b){return a + b;});
you're telling the computer
I want a "singleVal" variable to equal what happens if i took array,
looked at each number and the number after that
for example 6, and then 7,
and added them all up
so it'd go
4+5 = 9
9 + 6 = 15
and so on until it ran out of numbers
and then you'd end up with just one number, a sum
96street
@96street
Nov 20 2015 07:46
what have those numbers got to do with 6 and 7?
Victor Tang
@vtange
Nov 20 2015 07:47
6 and 7 are numbers within var array
.reduce looks at each and every number inside the array and works with them
think of 6 and 7 as "a" and "b" in the function you put in reduce
96street
@96street
Nov 20 2015 07:48
where did you get the 9 in "9 + 6" from? that's not in the array
Victor Tang
@vtange
Nov 20 2015 07:48
4+5 became 9
so it became [9,6,7,8]
then it's [15,7,8]
96street
@96street
Nov 20 2015 07:49
ohh ok
Victor Tang
@vtange
Nov 20 2015 07:49
so it does that until it runs out of numbers
[22,8]
96street
@96street
Nov 20 2015 07:49
so the return a + b just gets 2 random numbers from the array and adds them togethor? then the numbers keep reducing?
Victor Tang
@vtange
Nov 20 2015 07:49
[30]
and then breaks it to leave you just 30
as a number, not an array
96street
@96street
Nov 20 2015 07:50
yeah that makes sense
Victor Tang
@vtange
Nov 20 2015 07:50
yeah a+b will add them all up
if you did a*b it gets funny and multiplies them all up
96street
@96street
Nov 20 2015 07:50
thanks. can you give an example where you would use this?
Victor Tang
@vtange
Nov 20 2015 07:50
oh this gets used a looooot
if you ever get any list of numbers you don't know the end to and you want a sum of them all,you use reduce
one of the bonfires in your near future
96street
@96street
Nov 20 2015 07:51
I can't see how this is useful as the ending single number which stems from the array is not related to the initial array
Victor Tang
@vtange
Nov 20 2015 07:51
"Factorial"
uses reduce again
for multiplying
well sums are used everywhere in the real world.
96street
@96street
Nov 20 2015 07:52
yes but can you give an actual example when this piece of code will help, e.g. when building a website
Victor Tang
@vtange
Nov 20 2015 07:52
if i had a website that for example kept track of peoples $ donations
and everyone donated a separate amount
and i logged it all in an array
and i want to know how much in total was donated
then i'd use reduce
96street
@96street
Nov 20 2015 07:53
oh good point
Victor Tang
@vtange
Nov 20 2015 07:53
since that array could be THOUSANDS of numbers long
96street
@96street
Nov 20 2015 07:54
but can't you just add up all the numbers togethor...
Victor Tang
@vtange
Nov 20 2015 07:54
yeah, you could also just write up a function that manually adds them up together
96street
@96street
Nov 20 2015 07:54
so what the heck is the point of this method?
Victor Tang
@vtange
Nov 20 2015 07:54
but sometimes you'll run into a trickier app that forces you to use reduce
like if you had to process the total later in some other way
96street
@96street
Nov 20 2015 07:55
but they both end up with the same result?
Victor Tang
@vtange
Nov 20 2015 07:55
yeah pretty much
that's the beauty of programming somewhat
there's more than one answer
you'll realize though that somethings are more efficient than others
96street
@96street
Nov 20 2015 07:55
more than one method* same answer it seems
Victor Tang
@vtange
Nov 20 2015 07:55
but that's senior level stuff hah
96street
@96street
Nov 20 2015 07:56
yeah fair enough
cheers for the help
Victor Tang
@vtange
Nov 20 2015 07:56
np
Jason
@Jauble
Nov 20 2015 08:10
This message was deleted
This message was deleted
vlb152
@vlb152
Nov 20 2015 08:26
help! stuck on where to add width to the image source in the code--does it go in style section?
CamperBot
@camperbot
Nov 20 2015 08:26
no wiki entry for: stuck on where to add width to the image source in the code--does it go in style section
:pencil: click here to create one now!after creating your page type update to reload it here
MD Alsaffar
@Cyberistic
Nov 20 2015 08:28
@vlb152 Which challenge? and mind pasting the code?
vlb152
@vlb152
Nov 20 2015 08:28
challenge 17

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

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

h2 {
font-family: Lobster, Monospace;
}

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

.smaller-image {
width: 100px;
}


</style>

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

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

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

.smaller-image {
width: 100px; needs to be added
MD Alsaffar
@Cyberistic
Nov 20 2015 08:30
This message was deleted
add the class to the picture
vlb152
@vlb152
Nov 20 2015 08:31
is it within the image source or within the style element?
MD Alsaffar
@Cyberistic
Nov 20 2015 08:32
try adding to <img src="https://bit.ly/fcc-relaxing-cat"> the class smaller-image
@vlb152 Need help with adding the class?
vlb152
@vlb152
Nov 20 2015 08:34
@Cyberistic : yes
MD Alsaffar
@Cyberistic
Nov 20 2015 08:35
to add a class <img src="https://bit.ly/fcc-relaxing-cat" class="smaller-image">
Just add class="" to your element and then write your class' name in it
vlb152
@vlb152
Nov 20 2015 08:37
wow! thank you so much @Cyberistic. spent 20 minutes on this
CamperBot
@camperbot
Nov 20 2015 08:37
vlb152 sends brownie points to @cyberistic :sparkles: :thumbsup: :sparkles:
:star: 126 | @cyberistic | http://www.freecodecamp.com/cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 08:37
Happy to help (:
96street
@96street
Nov 20 2015 08:38
@vtange you there?
MD Alsaffar
@Cyberistic
Nov 20 2015 08:39
This message was deleted
CamperBot
@camperbot
Nov 20 2015 08:39
you need to ask about @someone!
96street
@96street
Nov 20 2015 08:39
var array = [4,5,6,7,8]; var singleVal = array.reduce(function(previousVal, currentVal) {
return previousVal - currentVal;
});
how does that equal 22?
i completed the exercise but changed it from adding to minusing and don't get how that array reduces to 22
Kevin H.
@kbolt
Nov 20 2015 08:44
I'm having a centering problem on a few elements in bootstrap. Any care to lend me a hand here?
Markus Kiili
@Masd925
Nov 20 2015 08:48
@96street is it -22?
MD Alsaffar
@Cyberistic
Nov 20 2015 08:49
@wolfboyprime Sure, which challenge? and mind pasting the code?
Kevin H.
@kbolt
Nov 20 2015 08:51
It's not a challenge. Wait a sec, I want to try something before I get into it
96street
@96street
Nov 20 2015 08:51
@Masd925 nope it's 22
dw not a big problem atm
MD Alsaffar
@Cyberistic
Nov 20 2015 08:52
@wolfboyprime Waypoint?
Idris Akmal Haslin
@idrisakmal
Nov 20 2015 08:54

@96street Hi there. lets calculate together.
previousVal currentVal
4 5
9 6
15 7
22 8
30

Return previousVal (which is 30 atm) - currentVal (which is 8) = 22

Markus Kiili
@Masd925
Nov 20 2015 08:56
@96street I ran your code and it returned -22 as it should.
96street
@96street
Nov 20 2015 08:57
@idrisakmal thankyou
Kevin H.
@kbolt
Nov 20 2015 08:59
it's nothing from FCC. I'm working on a portfolio website and I'm having this weird problem with centering 3 text boxes. Everything else on the page is centering fine but this row is pulling everything to the left
LeopardMV
@LeopardMV
Nov 20 2015 09:01
'''
'''
CamperBot
@camperbot
Nov 20 2015 09:01
:bulb: to format code use backticks! ``` more info
LeopardMV
@LeopardMV
Nov 20 2015 09:02
how was that screen for
form*
```
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

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

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

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>

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

<form action="/submit-cat-photo">Submit cat photo</form>
Joshua Abu
@Absolutestunna
Nov 20 2015 09:06
@lezzomosco2015 can you stop please
Abhisek Pattnaik
@abhisekp
Nov 20 2015 09:06
@QuincyLarson ban
LeopardMV
@LeopardMV
Nov 20 2015 09:06
can you take out this person
Abhisek Pattnaik
@abhisekp
Nov 20 2015 09:07
@lezzomosco2015 @QuincyLarson @BerkeleyTrue
@SaintPeter
Joshua Abu
@Absolutestunna
Nov 20 2015 09:07
@SaintPeter @QuincyLarson
Abhisek Pattnaik
@abhisekp
Nov 20 2015 09:07
@lezzomosco2015 you're going to regret this
LeopardMV
@LeopardMV
Nov 20 2015 09:07
who the hell is this guy
96street
@96street
Nov 20 2015 09:08

what's the code below "only change code above this line" doing? var array = [1, 12, 21, 2];

// Only change code below this line.

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

// Only change code above this line.

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

Kevin H.
@kbolt
Nov 20 2015 09:08
codepen is not loading my bootstrap css, hmm
LeopardMV
@LeopardMV
Nov 20 2015 09:08
can you please take out this guy that is annoying
Akira Laine
@AkiraLaine
Nov 20 2015 09:09
@lezzomosco2015 Hey! How's life? Oh, you don't have one.....?
Quincy Larson
@QuincyLarson
Nov 20 2015 09:11

Sorry everyone. I banned that weird spammer person. Thanks for your patience.

Kevin H.
@kbolt
Nov 20 2015 09:12
You da real MVP @QuincyLarson
Spencer Y. Hsu
@spencerhsu
Nov 20 2015 09:13
Hello guys!
carlosdrave
@carlosdrave
Nov 20 2015 09:13
what do you mean weird? he made a good point! ("dse dfd ddù") :P
Dmitry
@Ohhwee
Nov 20 2015 09:14
@LeopardMV
Abhisek Pattnaik
@abhisekp
Nov 20 2015 09:14
@carlosdrave what does that mean?
Dmitry
@Ohhwee
Nov 20 2015 09:14
whats ur question?
96street
@96street
Nov 20 2015 09:14

what's the code below "only change code above this line" doing? var array = [1, 12, 21, 2];

// Only change code below this line.

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

// Only change code above this line.

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

MD Alsaffar
@Cyberistic
Nov 20 2015 09:22
about @QuincyLarson
CamperBot
@camperbot
Nov 20 2015 09:22
:star: 261 | @quincylarson | http://www.freecodecamp.com/quincylarson
Kevin H.
@kbolt
Nov 20 2015 09:22
Ok, it looks like I fixed the issue I was having. I knew it had to be something simple
Markus Kiili
@Masd925
Nov 20 2015 09:26
@96street Sort function rearranges the array elements using the function you passed to it. When the passed function is negative for elements a and b, a comes first in the final array. Therefore your sort function arranges the array elements so that the largest comes first.
@96street for example when sort compares a=1 and b=12, the return value is 11 and it tells sort that 12 should be before 1.
Alaa Yahia
@Alaa--
Nov 20 2015 09:52
Hello campers
I'm curious about Karim Rashid Website ,any one know how the developer achieved the transition from one page to another ?
The website : http://work.antonandirene.com/karimrashid/
Qazim Rama
@politologu
Nov 20 2015 10:00
i have this problem why not worked : Your text input element should have the required attribute.
as you can see the code is ok <form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
why not worked
Volker Kassim
@koyunmania
Nov 20 2015 10:01
@Alaa-- really nice site. Please let me know if you find out.
Dmitry
@Ohhwee
Nov 20 2015 10:03

@politologu try this

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

Qazim Rama
@politologu
Nov 20 2015 10:04
again not worked
the problem said is : Your text input element should have the required attribute.
Dmitry
@Ohhwee
Nov 20 2015 10:05
so in the form u havent got errors
Qazim Rama
@politologu
Nov 20 2015 10:05
yep i know
gts00k
@gts00k
Nov 20 2015 10:05
can someone explain to me Bonfire: Smallest Common Multiple ? and if you want we can pair
Qazim Rama
@politologu
Nov 20 2015 10:05
but why not worked
unbelieve
Dmitry
@Ohhwee
Nov 20 2015 10:07
try to relog)
Qazim Rama
@politologu
Nov 20 2015 10:07
you mean reset
to start again
Dmitry
@Ohhwee
Nov 20 2015 10:08
y
and past this code again
Qazim Rama
@politologu
Nov 20 2015 10:08
oki
now worked
i done reset
thanks :)
Dmitry
@Ohhwee
Nov 20 2015 10:10
np, after run tests?)
Qazim Rama
@politologu
Nov 20 2015 10:10
yep
yep after run reset
Dmitry
@Ohhwee
Nov 20 2015 10:11
usual thing
Qazim Rama
@politologu
Nov 20 2015 10:11
yep
MD Alsaffar
@Cyberistic
Nov 20 2015 10:12
@politologu Do you still need help? or did you figure it out?
Qazim Rama
@politologu
Nov 20 2015 10:13
now its ok thanks
MD Alsaffar
@Cyberistic
Nov 20 2015 10:13
Alright, happy coding (:
Qazim Rama
@politologu
Nov 20 2015 10:13
too :)
Dmitry
@Ohhwee
Nov 20 2015 10:14
btw, there is rly good community, im lovin it =p
Qazim Rama
@politologu
Nov 20 2015 10:14
yep
i am from Kosovo as for information :)
Nhan CS
@nhaancs
Nov 20 2015 10:19
anyone can help me please
Your p element should have the text "View more " (with a space after it).
my code here
Your p element should have the text "View more " (with a space after it).
<p>
View more
<a href="http://www.freecatphotoapp.com"></a>
</p>
KeithDaFox
@KeithDaFox
Nov 20 2015 10:21
im on the exercise for filter arrays with filter and it says I need to remove everything greater than 5. What equation would do that?
Andrei Sheina
@andrei-sheina
Nov 20 2015 10:22
@nhancs
<p>
  <a href="http://www.freecatphotoapp.com"> View more </a>
</p>
gts00k
@gts00k
Nov 20 2015 10:22
can someone explain to me Bonfire: Smallest Common Multiple ? and if you want we can pair
Nhan CS
@nhaancs
Nov 20 2015 10:23
@andrei-sheina thank but it said Your a element should not have the text "View more".
CamperBot
@camperbot
Nov 20 2015 10:23
nhancs sends brownie points to @andrei-sheina :sparkles: :thumbsup: :sparkles:
:star: 135 | @andrei-sheina | http://www.freecodecamp.com/andrei-sheina
bozinmyo
@bozinmyo
Nov 20 2015 10:24
how make this step
Your p element should contain the first few words of the provided kitty ipsum text.
Dmitry
@Ohhwee
Nov 20 2015 10:26
<p>insert text about Kitty </p>
bozinmyo
@bozinmyo
Nov 20 2015 10:29
ok thz
MD Alsaffar
@Cyberistic
Nov 20 2015 10:35
@nhancs Still need help?
Markus Kiili
@Masd925
Nov 20 2015 10:36
@KeithDeFox use an expression that compares val and returns true on all elements you want to keep in your array.
KeithDaFox
@KeithDaFox
Nov 20 2015 10:37
yeah luckily my Computer teacher was here, I did not understand the code very well
Markus Kiili
@Masd925
Nov 20 2015 10:40
@KeithDeFox Do you now understand how filter works?
KeithDaFox
@KeithDaFox
Nov 20 2015 10:40
yeah, a bit now
I was using, becuase in the example it had taken out everything that was even with "val % 2===0" and so I thought the zero had some purpose. The code "5<<<0, 5>>>, or whatever " did not work, but it was easily solved when I did "val <= 5"
Alex Bykov
@tomkallen
Nov 20 2015 10:49
@96street Actually this code sorts an array according to numerical values of elements. That's it. That anonymous functions just tells sort() to do so. By default it sorts by Unicode so it would be 1, 10, 11, 2 etc
NoRestrictions
@NoRestrictions
Nov 20 2015 10:58
Hi guys!
Markus Kiili
@Masd925
Nov 20 2015 10:58
@tomkallen Actually @96street was asking about the (function() { return array; })(); part. Fooled me too:)
NoRestrictions
@NoRestrictions
Nov 20 2015 10:59
@nhancs: have u been able to get ur code to work?
Fernando Garcia
@nano4610
Nov 20 2015 11:05
I need some help and sorry for my English
srinivas
@srinivasdasu
Nov 20 2015 11:05
Post your problem @nano4610
Fernando Garcia
@nano4610
Nov 20 2015 11:05
I do not understand this

You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.

For example:

<form action="/url-where-you-want-to-submit-form-data"></form>

Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.

where I have to put it ?
<input type="text" form action="/submit-cat-photo" placeholder=" cat photo URL ">
form action??
FiveSheep
@MysticFivesheep
Nov 20 2015 11:07
Hello world!!!Its my first time here! : )
CamperBot
@camperbot
Nov 20 2015 11:07

welcome to FreeCodeCamp @MysticFivesheep!

srinivas
@srinivasdasu
Nov 20 2015 11:07
@nano4610 <form action="/submit-cat-photo" <input type="text"></form>
Fernando Garcia
@nano4610
Nov 20 2015 11:08
thank you very much , I'll try
perfect. I already understand it. I am a beginner
welcome Mysticfivesheep
Vos
@KrisVos130
Nov 20 2015 11:13
Welcome @MysticFivesheep!
srinivas
@srinivasdasu
Nov 20 2015 11:23
@nano4610 you can say thanks by specifying name :)
CamperBot
@camperbot
Nov 20 2015 11:23
srinivasdasu sends brownie points to @nano4610 :sparkles: :thumbsup: :sparkles:
:star: 39 | @nano4610 | http://www.freecodecamp.com/nano4610
usrcode
@usrcode
Nov 20 2015 11:33
Hello everyone. Thanks I guess. Here goes everything.
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:41
@KrisVos130 you've the admin powers. rt?
Vos
@KrisVos130
Nov 20 2015 11:42
@abhisekp I have admin powers yes
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:42
@KrisVos130 nice to know. :D
Handy for banning trolls :D
Ethan Leyden
@Darksmurf
Nov 20 2015 11:42
Hello, I think there may be a bug, but I may be wrong. The waypoint wants me to italicize text, and it works, but it won't let me pass. Here's my code:
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $('#target4').html('<em>#target4</em>');;
  });
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:43
@Darksmurf ah!
Vos
@KrisVos130
Nov 20 2015 11:43
@abhisekp Yeah, but every time I tried to ban a troll there was someone 5 seconds before me who banned them :P
CamperBot
@camperbot
Nov 20 2015 11:43
:trollface: troll problems? notify admins here
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:43
@KrisVos130 lol. Too late like Police!
Ethan Leyden
@Darksmurf
Nov 20 2015 11:43
Derp! I had to use <i>, not <em>
Vos
@KrisVos130
Nov 20 2015 11:44
@Darksmurf It happens to all of us at some point, that we use the wrong element :P
Thomas Moore
@Moorekun
Nov 20 2015 11:44
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$("well").addClass("animated shake");
});
</script>
Anyone know why the well class won't apply?
Vos
@KrisVos130
Nov 20 2015 11:45
@Moorekun Yes
Thomas Moore
@Moorekun
Nov 20 2015 11:45
@KrisVos130 What's up with it? ^^
Vos
@KrisVos130
Nov 20 2015 11:46
@Moorekun "well" isn't an element, it's a class. You select $("well") instead of the class well which is $(".well")
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:46
@Darksmurf you should write like this $("#target4").html("<i>" + $("#target4").text() + "</i>");
Thomas Moore
@Moorekun
Nov 20 2015 11:46
@KrisVos130 Ah, got it; gotta remember to apply the . to classes haha ^^ Thanks!
CamperBot
@camperbot
Nov 20 2015 11:46
moorekun sends brownie points to @krisvos130 :sparkles: :thumbsup: :sparkles:
:star: 358 | @krisvos130 | http://www.freecodecamp.com/krisvos130
Vos
@KrisVos130
Nov 20 2015 11:46
@Moorekun If you want to select elements by class, you need a . before the class name in the jQuery selector. And for ids you need a #
@Moorekun No problem :)
Ethan Leyden
@Darksmurf
Nov 20 2015 11:47
@abhisekp that makes more sense, because .text() takes a string of the text there, right?
Abhisek Pattnaik
@abhisekp
Nov 20 2015 11:47

@Darksmurf yep! So does the instruction says! ;)

Change the button with id target4 by italicizing its text.

Ethan Leyden
@Darksmurf
Nov 20 2015 11:48
thanks @abhisekp
CamperBot
@camperbot
Nov 20 2015 11:48
darksmurf sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 991 | @abhisekp | http://www.freecodecamp.com/abhisekp
i don't understand
Ethan Leyden
@Darksmurf
Nov 20 2015 11:52
you have to make the code not commenteed
you have to remove the comments
Dmitry
@Ohhwee
Nov 20 2015 11:52
just remove arrows
Ethan Leyden
@Darksmurf
Nov 20 2015 11:52
^^
Dmitry
@Ohhwee
Nov 20 2015 11:52
^^
hossam99
@hossam99
Nov 20 2015 11:52
thanks ^^
what am I doing wrong

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

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

h2 {
font-family: Lobster, Monospace;
}

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

.smaller-image {
width: 100px;
}

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

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

<img class="smaller-image thick-green" 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>

Your img element should have the class thick-green-border.
Give your image a border width of 10px.
Didnt I already fulfill that.
Alexander Køpke
@alexanderkopke
Nov 20 2015 12:10
did you give your <img> element the class thick-green?
m1573r
@m1573r
Nov 20 2015 12:11
<img class="smaller-image thick-green" src="https://bit.ly/fcc-relaxing-cat">
Dmitry
@Ohhwee
Nov 20 2015 12:12
<img class="smaller-image thick-green-border"
m1573r
@m1573r
Nov 20 2015 12:12
Multitasking messed up, its supposed to be .thick-green-border
Thanks.
Dmitry
@Ohhwee
Nov 20 2015 12:12
and edit into style
Alexander Køpke
@alexanderkopke
Nov 20 2015 12:13
yes the class should be named thick-green-border
your code should work too but the site is checking if you do as instructed
MD Alsaffar
@Cyberistic
Nov 20 2015 12:30

Could anyone help me understand what i++ in

for (var i = 1; i < 6; i++) {

means?

Alex Bykov
@tomkallen
Nov 20 2015 12:34
@Cyberistic i = i + 1
@Cyberistic just increment by 1
MD Alsaffar
@Cyberistic
Nov 20 2015 12:42

can't i just set it as

for (var i = 1; i < 6; i =i+1)

?

Or i +=1?
Dmitry
@Ohhwee
Nov 20 2015 12:43

i = i+1

i+=1
its same
Alex Bykov
@tomkallen
Nov 20 2015 12:44
@Cyberistic you can
MD Alsaffar
@Cyberistic
Nov 20 2015 12:45
ahh
Thanks a lot. (:
@tomkallen @ohhwee
CamperBot
@camperbot
Nov 20 2015 12:47
cyberistic sends brownie points to @tomkallen :sparkles: :thumbsup: :sparkles:
:star: 208 | @tomkallen | http://www.freecodecamp.com/tomkallen
Dustin Frank
@DustInCompetent
Nov 20 2015 12:49

Test

Test

This Markdown sure is something
MD Alsaffar
@Cyberistic
Nov 20 2015 12:51
@tomkallen If you don't mind, please explain what myArray.push(i) does
var myArray = [];
for (var i = 1; i<10; i +=2){
  myArray.push(i);
}

what would happen if i used

myArray.pop(i);

instead?

Dmitry
@Ohhwee
Nov 20 2015 12:56
with push ur elements add at еnd of array
Markus Kiili
@Masd925
Nov 20 2015 12:56
@Cyberistic First you define myArray as an empty array. Then you loop i over some integers. myArray.push(i) adds these integers to the end of your array. myArray.pop() removes and returns the last element of an array.
Alex Bykov
@tomkallen
Nov 20 2015 12:56
@Cyberistic push() adds a new element to the end, pop() removes it
Abhisek Pattnaik
@abhisekp
Nov 20 2015 12:56
@Ohhwee All these are same
i += 1;
i = i + 1;
i++;
Dmitry
@Ohhwee
Nov 20 2015 12:56
and pop - changed array
@abhisekp y, but sometime use ++i
it depends of task
Abhisek Pattnaik
@abhisekp
Nov 20 2015 13:00
@Ohhwee yep! The task and purpose. It matters if you use it in an expression.
++i (increments first and then considers the value)
i-- (considers the value and then decrement)
Aleksander Gębicki
@Takumar
Nov 20 2015 13:13
@abhisekp go and eat something :melon:
Pramod Sripada
@pramodvspk
Nov 20 2015 13:24
I am facing issue with this waypoint http://www.freecodecamp.com/challenges/waypoint-change-text-inside-an-element-using-jquery , not able to understand the error message -- Make sure the text is otherwise unchanged.
Dmitry
@Ohhwee
Nov 20 2015 13:25
$("#target4").html("<i>#target4</i>");
jihedbouhlel
@jihedbouhlel
Nov 20 2015 13:26
@m1573r $("#target4").html("<i>#target4</i>");
Aleksander Gębicki
@Takumar
Nov 20 2015 13:28
@pramodvspk you can make this like @Ohhwee and @jihedbouhlel said, but in such case you have to remember what text was on #target4 button. I would suggest italicizing existing text, so get your text using $("#target4").text() and paste it in correct place.
@pramodvspk remember that you can concatenate strings using "+". i.e.
"<p>" + "This is a paragraph text" + "</p>"
Pramod Sripada
@pramodvspk
Nov 20 2015 13:35
@Ohhwee , thanks for that.
CamperBot
@camperbot
Nov 20 2015 13:35
pramodvspk sends brownie points to @ohhwee :sparkles: :thumbsup: :sparkles:
:star: 127 | @ohhwee | http://www.freecodecamp.com/ohhwee
Pramod Sripada
@pramodvspk
Nov 20 2015 13:36
@Takumar , your solution works, I was lost, the last sentence of your solution made mt brush my basics again
@Takumar thanks for the soultion
CamperBot
@camperbot
Nov 20 2015 13:36
pramodvspk sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 821 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 20 2015 13:38
@pramodvspk you're welcome. Please remember about @jihedbouhlel he also gave you correct solution :-)
Pramod Sripada
@pramodvspk
Nov 20 2015 13:39
@jihedbouhlel ,thank you for the solution :D
CamperBot
@camperbot
Nov 20 2015 13:39
pramodvspk sends brownie points to @jihedbouhlel :sparkles: :thumbsup: :sparkles:
:star: 153 | @jihedbouhlel | http://www.freecodecamp.com/jihedbouhlel
jihedbouhlel
@jihedbouhlel
Nov 20 2015 13:40
@Takumar @pramodvspk Thank you guys
CamperBot
@camperbot
Nov 20 2015 13:41
jihedbouhlel sends brownie points to @takumar and @pramodvspk :sparkles: :thumbsup: :sparkles:
:star: 822 | @takumar | http://www.freecodecamp.com/takumar
:star: 174 | @pramodvspk | http://www.freecodecamp.com/pramodvspk
Dmitry
@Ohhwee
Nov 20 2015 13:41
oh, need a rest, cya guys=)
Aleksander Gębicki
@Takumar
Nov 20 2015 13:42
@Ohhwee colourful dreams (I say this to my daughter) :-)
Dmitry
@Ohhwee
Nov 20 2015 13:42
=)
D/S
@dantesolis
Nov 20 2015 13:44
hello peeps
Aleksander Gębicki
@Takumar
Nov 20 2015 13:45
hi @dantesolis
MD Alsaffar
@Cyberistic
Nov 20 2015 13:46
@Ohhwee @Masd925 @tomkallen @abhisekp Thanks a lot guys! It helps a lot.
CamperBot
@camperbot
Nov 20 2015 13:46
cyberistic sends brownie points to @ohhwee and @masd925 and @tomkallen and @abhisekp :sparkles: :thumbsup: :sparkles:
:warning: cyberistic already gave tomkallen points
:star: 294 | @masd925 | http://www.freecodecamp.com/masd925
:star: 128 | @ohhwee | http://www.freecodecamp.com/ohhwee
:star: 993 | @abhisekp | http://www.freecodecamp.com/abhisekp
Nathan Kipsang Tum
@nathantum
Nov 20 2015 13:51
i am having trouble with this waypoint
MD Alsaffar
@Cyberistic
Nov 20 2015 14:00
Whats your problem? @nathantum
MD Alsaffar
@Cyberistic
Nov 20 2015 14:10
@nathantum there are a couple of things wrong with your code, the F in myFunction should be capitalized and you forgot brackets () in Math.random();
Nathan Kipsang Tum
@nathantum
Nov 20 2015 14:13
@Cyberistic Thanks, it was helpful.
CamperBot
@camperbot
Nov 20 2015 14:13
nathantum sends brownie points to @cyberistic :sparkles: :thumbsup: :sparkles:
:star: 163 | @cyberistic | http://www.freecodecamp.com/cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 14:14
@nathantum Anytime. (:
D/S
@dantesolis
Nov 20 2015 14:22
hi @Takumar
cherielum
@cherielum
Nov 20 2015 14:26
Hey anybody around to help me with the "Waypoint: Override Class Declarations with Inline Styles assignment"?
I'm stuck on literarily 2 points.
"Your h1 element should be white."

<style>


body {
background-color: black;
font-family: Monospace;
color: green;
}
#orange-text {
color: orange;
}
.pink-text {
color: pink;
}
.blue-text {
color: blue;
}
.white-text{
color: white;
}

<h1 style= "color:white">

</style>

<h1 id= "orange-text">

<h1 style="color: green">
<h1 style= "color:white">

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

MD Alsaffar
@Cyberistic
Nov 20 2015 14:28
alright
Ashay Kolhe
@ashaykolhe
Nov 20 2015 14:28

Hello. http://www.freecodecamp.com/challenges/waypoint-iterate-over-arrays-with-map

In this waypoint,
newArray.map(function(value){
return value + 3;
});

this is what I wrote. I checked the console and it is adding 3 to each of the array elements. Yet the waypoint is not proceeding.

MD Alsaffar
@Cyberistic
Nov 20 2015 14:28
<style>


  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
  .white-text{
    color: white;
  }

   <h1 style= "color:white">

</style>

   <h1 id= "orange-text">

<h1 style="color: green">
   <h1 style= "color:white">

<h1 id="orange-text" class="pink-text blue-text"> Hello World!</h1>
Abhisek Pattnaik
@abhisekp
Nov 20 2015 14:28
This message was deleted
Ashay Kolhe
@ashaykolhe
Nov 20 2015 14:29
Did I miss anything?
Coira Ellison
@Coira
Nov 20 2015 14:30
@ashaykolhe you're very close. map returns an array so you need to assign it to something
@ashaykolhe in this case, it's all set up for you. move the .map(...) stuff onto the end of oldArray (delete the semi-colon first)
cherielum
@cherielum
Nov 20 2015 14:31
@Cyberistic did you rewrite my text?
it's not going through
MD Alsaffar
@Cyberistic
Nov 20 2015 14:31
<h1 style="color: green">
   <h1 style= "color:white">
here is the problem @cherielum
and no, I only pasted it using ``` to make it easier to read
cherielum
@cherielum
Nov 20 2015 14:32
yeah! It keeps clearing either "your h1 element should be white" or "your h1 element should have the id of orange-text"
oh hmm
i took green out
and it still won't run @Cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 14:33
@cherielum to make your code simpler try adding everything in one line like this
<h1 id="orange-text" style="color: white" class="pink-text blue-text">
4 lines mushed up to 1
Ashay Kolhe
@ashaykolhe
Nov 20 2015 14:34
Oh I see. Thanks.
MD Alsaffar
@Cyberistic
Nov 20 2015 14:34
This message was deleted
cherielum
@cherielum
Nov 20 2015 14:35
@Cyberistic OH THAT DID IT.
@Cyberistic I'm not pro at mushing yet....but this is GREAT
MD Alsaffar
@Cyberistic
Nov 20 2015 14:37
@cherielum Haha! Happy to help.
Have fun coding. (:
cherielum
@cherielum
Nov 20 2015 14:41
@Cyberistic Thanks!! Cannot believe it's getting hard already....I'm sure I'll have more questions!
CamperBot
@camperbot
Nov 20 2015 14:41
cherielum sends brownie points to @cyberistic :sparkles: :thumbsup: :sparkles:
:star: 165 | @cyberistic | http://www.freecodecamp.com/cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 14:42
@cherielum I'm happy to help.
Daniel Knowles
@GlazeitBro
Nov 20 2015 14:44
This message was deleted
Right guys I'm trying to make an image that is 100 pixels wide and I've created a class called "smaller-image". Now whenever I try to change the style of it to 100 pixels by saying "width: 100px; it doesn't seem to work even tho it looks the same as the example.
Brett
@Brettb2k8
Nov 20 2015 14:49
SO I am trying to use the reverse method I get the array to reverse, however 1 of the 3 objectives if giving me an error. it says "you should use the reverse method" in my code i am using newArray.reverse(function() { return; });
Coira Ellison
@Coira
Nov 20 2015 14:51
@GlazeitBro you'll have to post more code
Ravi Siswaliya
@RvSiswaliya
Nov 20 2015 14:51

var firstLetterOfFirstName = "";
var firstLetterOfLastName = "";

var firstName = "Ada";

firstLetterOfFirstName = firstName[0];

var lastName = "Lovelace";

firstLetterOfLastName = LastName;

// Only change code above this line.

(function(v){return v;})(firstLetterOfLastName);

Coira Ellison
@Coira
Nov 20 2015 14:51
@Brettb2k8 you don't need the function... stuff there, just .reverse()
Daniel Knowles
@GlazeitBro
Nov 20 2015 14:51

@Coira <img class="smaller-image">

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

Ravi Siswaliya
@RvSiswaliya
Nov 20 2015 14:51
i need solution of this program
coz m getting error
Coira Ellison
@Coira
Nov 20 2015 14:52
@GlazeitBro are youy applying the class to the cat image?
MD Alsaffar
@Cyberistic
Nov 20 2015 14:52
@GlazeitBro paste your code please
Daniel Knowles
@GlazeitBro
Nov 20 2015 14:53
@Coira Yes
@Cyberistic All of it?
MD Alsaffar
@Cyberistic
Nov 20 2015 14:54
@GlazeitBro Yes
Coira Ellison
@Coira
Nov 20 2015 14:54
@GlazeitBro oh, in style, for class it shoud be .smaller-image (note the full-stop)
Daniel Knowles
@GlazeitBro
Nov 20 2015 14:54

@Cyberistic <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>
<img class="smaller-image">

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

MD Alsaffar
@Cyberistic
Nov 20 2015 14:55
pasting it so it's easier to read
<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>
<img class="smaller-image">
<style>
smaller-image {
width: 100px;
}
</style>
remove this from the end of your program and add it to <style> that's on top of your program
smaller-image {
width: 100px;
}
</style>
Daniel Knowles
@GlazeitBro
Nov 20 2015 14:56
@Cyberistic Done that
MD Alsaffar
@Cyberistic
Nov 20 2015 14:57
Also remember, classes always start with . so you need to add a dot to smaller-image to make it work (.smaller-image) @GlazeitBro
Joseph Slack
@Joeyskywalker
Nov 20 2015 15:01
Why is lastNameLength not equal to 8?
lastNameLength = lastName.length;
var lastName = "Lovelace";
Daniel Knowles
@GlazeitBro
Nov 20 2015 15:02
@Cyberistic I've got it to work, thank you.
CamperBot
@camperbot
Nov 20 2015 15:02
glazeitbro sends brownie points to @cyberistic :sparkles: :thumbsup: :sparkles:
:star: 166 | @cyberistic | http://www.freecodecamp.com/cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 15:03
@GlazeitBro Anytime. (:
@Joeyskywalker Paste the whole code please
Joseph Slack
@Joeyskywalker
Nov 20 2015 15:04

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

firstNameLength = firstName.length;

var lastName = "Lovelace";

lastNameLength = lastName.length;

// Only change code below this line.

lastNameLength = lastName;

// Only change code above this line.

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

MD Alsaffar
@Cyberistic
Nov 20 2015 15:04
Pasting your code so it's easier to read
 var firstNameLength = 0;
var lastNameLength = 0;
var firstName = "Ada";

firstNameLength = firstName.length;

var lastName = "Lovelace";

lastNameLength = lastName.length;

// Only change code below this line.

lastNameLength = lastName;



// Only change code above this line.

if(typeof(lastNameLength) !== "undefined"){(function(){return lastNameLength;})();}
Coira Ellison
@Coira
Nov 20 2015 15:05
@Cyberistic you might want to post camperbot's format instructions ("wiki format"), so people know how to do it themselves :)
wiki format
CamperBot
@camperbot
Nov 20 2015 15:05

: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

MD Alsaffar
@Cyberistic
Nov 20 2015 15:06
@Coira A'ight will do that
Joseph Slack
@Joeyskywalker
Nov 20 2015 15:08
It just says lastNameLength should be equal to 8 but I don't see why it isn't
MD Alsaffar
@Cyberistic
Nov 20 2015 15:09

@Joeyskywalker

// Only change code below this line.

lastNameLength = lastName;



// Only change code above this line.

add .length to last name in
```lastNameLength = lastName;````

It should look like this
```lastNameLength = lastName.length;````

Joseph Slack
@Joeyskywalker
Nov 20 2015 15:10
I'm so stupid thanks @Cyberistic
CamperBot
@camperbot
Nov 20 2015 15:10
joeyskywalker sends brownie points to @cyberistic :sparkles: :thumbsup: :sparkles:
:star: 168 | @cyberistic | http://www.freecodecamp.com/cyberistic
MD Alsaffar
@Cyberistic
Nov 20 2015 15:11
@Joeyskywalker
No you are not, you're just learning and it takes time. Don't be harsh on yourself!
Happy to help. (:
muzikmoe
@muzikmoe
Nov 20 2015 15:12

<style>

.red-text {

color: red;

}
</style>

<h2>CatPhotoApp</h2>
how to apply the class to h2. I don't know how to do it

MD Alsaffar
@Cyberistic
Nov 20 2015 15:13

@Jinser

<h2 class="Your class here">

muzikmoe
@muzikmoe
Nov 20 2015 15:16
thanks for your help. I used to think just that I should only make the change with the statements within style. Thank you very much
MD Alsaffar
@Cyberistic
Nov 20 2015 15:18
Anytime. (:
MIN
@una720302
Nov 20 2015 15:22

who can help me on this please?====>For example, let's make all of your button elements bounce. Just add this code inside your document ready function:

$("button").addClass("animated bounce")

Note that we've already included both the jQuery library and the Animate.css library in the background so that you can use them in the editor. So you are using jQuery to apply the Animate.css bounce class to your button elements.

this is my doce=====><script>
$("botton").addclass("bounce"(){});
</script>
jihedbouhlel
@jihedbouhlel
Nov 20 2015 15:24
<script>
$("botton").addClass(“bounce");
</script>
MD Alsaffar
@Cyberistic
Nov 20 2015 15:24
I could, please paste your code using the wiki format
@una720302
MIN
@una720302
Nov 20 2015 15:24
@Cyberistic http://www.freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery?solution=fccss%0A%20%20%24(%22botton%22).addclass(%22bounce%22()%7B%7D)%3B%0Afcces%0A%0A%3C!--%20Only%20change%20code%20above%20this%20line.%20--%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Ch3%20class%3D%22text-primary%20text-center%22%3EjQuery%20Playground%3C%2Fh3%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23left-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22left-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target1%22%3E%23target1%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target2%22%3E%23target2%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target3%22%3E%23target3%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%20%20%3Ch4%3E%23right-well%3C%2Fh4%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22well%22%20id%3D%22right-well%22%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target4%22%3E%23target4%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target5%22%3E%23target5%3C%2Fbutton%3E%0A%20%20%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-default%20target%22%20id%3D%22target6%22%3E%23target6%3C%2Fbutton%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A
Sanketh N B
@sankethu28
Nov 20 2015 15:25
Hi All

Waypoint: Nest an Anchor Element within a Paragraph
this s my code

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

they want me to do this,

Now nest your existing a element within a new p element (just after the existing h2 element) so that the surrounding paragraph says "View more cat photos", but where only "cat photos" is a link, and the rest of the text is plain text.

kindly help
MD Alsaffar
@Cyberistic
Nov 20 2015 15:26
@sankethu28 paste the whole code please
jihedbouhlel
@jihedbouhlel
Nov 20 2015 15:27
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
});
</script>
Sanketh N B
@sankethu28
Nov 20 2015 15:27

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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


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

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

MD Alsaffar
@Cyberistic
Nov 20 2015 15:28
@una720302
You're missing document read
try adding it to the top of your <script>
$(document).ready(function() {
posting your code using the wiki format to make it easier to read:
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

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

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

.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
<a href="http://www.freecatphotoapp.com">cat photos</a>


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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
wiki format
CamperBot
@camperbot
Nov 20 2015 15: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

MIN
@una720302
Nov 20 2015 15:31

@Cyberistic you mean like this====>$(document).ready(function(){

<script>
$("botton").addclass("bounce"(){});
</script>
}

jihedbouhlel
@jihedbouhlel
Nov 20 2015 15:32
@Cyberistic @una720302 like this i think <script>
$(document).ready(function() {
$("button").addClass(" bounce");
});
</script>
MD Alsaffar
@Cyberistic
Nov 20 2015 15:33

@sankethu28
Here is how it should look like

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

If you want me to explain it to you, please do tell me.

@una720302
@jihedbouhlel
Yup! Like @jihedbouhlel said.
<script>
$(document).ready(function() {
$("button").addClass(" bounce");
});
</script>
MD Alsaffar
@Cyberistic
Nov 20 2015 15:42
@sankethu28 Did it work?
MIN
@una720302
Nov 20 2015 15:43
@Cyberistic now have an error====>Use the jQuery addClass() function to give the classes animated and bounce to your button elements.
@jihedbouhlel now have an error====>Use the jQuery addClass() function to give the classes animated and bounce to your button elements.
jihedbouhlel
@jihedbouhlel
Nov 20 2015 15:48
@una720302 you have to add the animated to the button
@una720302 you have to add the class “animated to the button
MD Alsaffar
@Cyberistic
Nov 20 2015 15:50

@una720302 My bad >.>

<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
});
</script>

try this.

Shayan Ahmad
@shayanahmed1993
Nov 20 2015 15:57
Hello Guys!
I need some help
Dmitry
@Ohhwee
Nov 20 2015 15:57
sup?
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 15:57
I am at the Bonfire: Return Largest Numbers in Arrays challenge of freecodecamp
I have written this code

function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);

function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);

blob
Here;s the screenshot
and it works fine
Coira Ellison
@Coira
Nov 20 2015 15:59
hey @shayanahmed1993 you can format code like this
wiki format
CamperBot
@camperbot
Nov 20 2015 15:59

: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

Shayan Ahmad
@shayanahmed1993
Nov 20 2015 15:59

'function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);
'

blob

'''function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);
'''

CamperBot
@camperbot
Nov 20 2015 16:00
:bulb: to format code use backticks! ``` more info
bozinmyo
@bozinmyo
Nov 20 2015 16:01
how to create a css style element
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:02

'''
function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);

'''

CamperBot
@camperbot
Nov 20 2015 16:02
:bulb: to format code use backticks! ``` more info
MD Alsaffar
@Cyberistic
Nov 20 2015 16:02
@shayanahmed1993 use these ```
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:05

'''function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);

CamperBot
@camperbot
Nov 20 2015 16:05
:bulb: to format code use backticks! ``` more info
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:05
@Cyberistic i am using the ticks but not working

```function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);

```function largestOfFour(arr) {
// You can do this!

var aec,i;
var largest = Array();
largest[aec] = 0;

for(aec = 0; aec < arr.length; aec++) {
largest[aec] = 0;
for(i = 0; i<4; i++) { if (arr[aec][i] > largest[aec]) {
largest[aec] = arr[aec][i];
}

    else {
      largest[aec] = largest[aec];
    }
  }

}

return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);
```

Coira Ellison
@Coira
Nov 20 2015 16:06
@shayanahmed1993 on my (uk) keyboard, the backticks are to the left of the 1 key
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:06
test code
now its working
thanks
@Coira thanks
CamperBot
@camperbot
Nov 20 2015 16:07
shayanahmed1993 sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 325 | @coira | http://www.freecodecamp.com/coira
Explvcit
@Explvcit
Nov 20 2015 16:07
the directions say i should use the reverse method but my code is
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:07
function largestOfFour(arr) {
  // You can do this!

  var aec,i;
  var largest = Array();
  largest[aec] = 0;


  for(aec = 0; aec < arr.length; aec++) {  
      largest[aec] = 0;
      for(i = 0; i<4; i++) {
        if (arr[aec][i] > largest[aec]) {
          largest[aec] = arr[aec][i];
        }

        else {
          largest[aec] = largest[aec];
        }
      }

   }

  return largest;
}
largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);
Explvcit
@Explvcit
Nov 20 2015 16:07
var newArray = array.reverse(function(array) {
}); & it still won't let me move on
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:07
So, this is my code
It returns all the right values
but #freecodecamp wouldnt accept it.
@Coira can you check
It's this exercise: Bonfire: Return Largest Numbers in Arrays
Coira Ellison
@Coira
Nov 20 2015 16:08
@shayanahmed1993 if i print out largest, it gives [9, 35, 97, 1000000, undefined: 0]
@Explvcit you don't need the function... stuff inside reverse
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:08
so, there is a 5th value which i cant see.
right I get it
RoadtoMastery
@RoadtoMastery
Nov 20 2015 16:09

What am I missing here? thanks ```
var Car = function(wheels, seats, engines) {
//Change this constructor
this.wheels = 4;
this.seats = 1;
this.engines = 1;
};

//Try it out here
var myCar = new Car (3, 2, 1);
```

Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:09
So, which compiler are you using.
Or software to try that out @Coira
Coira Ellison
@Coira
Nov 20 2015 16:09
@shayanahmed1993 maybe your loops are going too far
@shayanahmed1993 i'm using chrome
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:09
I am using that too
and on the same website i.e. freecodecamp?
Coira Ellison
@Coira
Nov 20 2015 16:09
do you know how to use the console?
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:10
nopes I dont'
Coira Ellison
@Coira
Nov 20 2015 16:10
@shayanahmed1993 give me a minute
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:10
Okay
:)
Juliana Buonanno
@JulianaBuonanno
Nov 20 2015 16:10

Having trouble sorting arrays in ascending order...waypoint sort. Here's what I have so far...any suggestions?

```
var array = [1, 12, 21, 2];

// Only change code below this line.

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

// Only change code above this line.

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

Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:11
@JulianaBuonanno hello
you will have to put ``` at the end of the code as well
That wway you will be able to format it.
Juliana Buonanno
@JulianaBuonanno
Nov 20 2015 16:11
@shayanahmed1993 my bad, thanks
CamperBot
@camperbot
Nov 20 2015 16:11
julianabuonanno sends brownie points to @shayanahmed1993 :sparkles: :thumbsup: :sparkles:
:star: 193 | @shayanahmed1993 | http://www.freecodecamp.com/shayanahmed1993
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:12
No problem :)
Coira Ellison
@Coira
Nov 20 2015 16:13
@shayanahmed1993 ok, my pic upload is stuck, so i'll just tell you instead
Juliana Buonanno
@JulianaBuonanno
Nov 20 2015 16:13
```
var array = [1, 12, 21, 2];

// Only change code below this line.

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

// Only change code above this line.

(function() { return array; })();
still can't find anything else that was wrong with the code though, it's still not working
Coira Ellison
@Coira
Nov 20 2015 16:13
@shayanahmed1993 press f12 to get the debug console up (for windows)
tell me if that works
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:14
@JulianaBuonanno
var array = [1, 12, 21, 2];

// Only change code below this line.

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

// Only change code above this line.

(function() { return array; })();
try this one! @JulianaBuonanno
just replace b-a by a-b :)
@Coira okay
let me try
oh yes @Coira
it words
MIN
@una720302
Nov 20 2015 16:15

question==>Use the jQuery addClass() function to give the classes animated and bounce to your button elements.
Only use jQuery to add these classes to the element. my code==>

<script>
$(document).ready(function(){
$("button").addclass(" animated bounce");
});
</script> please help and i still can't figure out why is not working.

Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:15
works*
thanks
I should place my code there!
@Coira
right?
Juliana Buonanno
@JulianaBuonanno
Nov 20 2015 16:16
oh, duh! Thanks! For some reason I was reading the question wrong and thought they wanted a-b @shayanahmed1993
CamperBot
@camperbot
Nov 20 2015 16:16
julianabuonanno sends brownie points to @shayanahmed1993 :sparkles: :thumbsup: :sparkles:
Coira Ellison
@Coira
Nov 20 2015 16:16
@shayanahmed1993 ah no, if you put in console.log(largest), just before return largest, it will print out largest to the console
Capture.PNG
CamperBot
@camperbot
Nov 20 2015 16:16
:warning: julianabuonanno already gave shayanahmed1993 points
Coira Ellison
@Coira
Nov 20 2015 16:16
now the pic's turned up
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:17
@Coira oh yes
Coira Ellison
@Coira
Nov 20 2015 16:17
@shayanahmed1993 anyway, i'm going to look at your code now
Shayan Ahmad
@shayanahmed1993
Nov 20 2015 16:17
i can see the error now!
<