These are chat archives for FreeCodeCamp/Help

10th
Oct 2015
Karolis
@Luomint
Oct 10 2015 00:01
bf html
CamperBot
@camperbot
Oct 10 2015 00:01

:fire:Bonfire: Convert HTML Entities :link:

function convert(str) {
  // :)
  return str;
}

convert('Dolce & Gabbana');

Convert the characters "&", "<", ">", '"' (double quote), and "'" (apostrophe), in a string to their corresponding HTML entities.

more info:  bf details | bf links | hint

Karolis
@Luomint
Oct 10 2015 00:01
hint
CamperBot
@camperbot
Oct 10 2015 00:01
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Jason
@Jauble
Oct 10 2015 00:09
Anyone know how I would say something like: 'if (myFunction() doesn't receive any arguments) {'
Herman Fassett
@HermanFassett
Oct 10 2015 00:14
Um arguments[0] == undefined? or idk
noobstar
@namsir
Oct 10 2015 00:14
if(arguments == 0)
DTing
@dting
Oct 10 2015 00:15
if (!arguments.length)
Jason
@Jauble
Oct 10 2015 00:25
@HermanFassett @namsir @dting Didn't think about using arguments. Thanks guys
CamperBot
@camperbot
Oct 10 2015 00:25
jauble sends brownie points to @hermanfassett and @namsir and @dting :sparkles: :thumbsup: :sparkles:
:star: 213 | @namsir | http://www.freecodecamp.com/namsir
:star: 1357 | @dting | http://www.freecodecamp.com/dting
:star: 340 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Oct 10 2015 00:27
dting is ofc the most refined
Jason
@Jauble
Oct 10 2015 00:31
@HermanFassett Ya, that's what I used
Joshua Abu
@Absolutestunna
Oct 10 2015 00:38
@IAmMyself hello..still available to help. Didn't get the answer to my idea
cooljoe21
@cooljoe21
Oct 10 2015 00:40
can someone help me with http://www.freecodecamp.com/challenges/bonfire-reverse-a-string#? I am having some trouble
CamperBot
@camperbot
Oct 10 2015 00:40
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
noobstar
@namsir
Oct 10 2015 00:41
@cooljoe21 convert the param into an array and use reverse function.
to convert to array use the split function.
"hello".split(''); will convert to ['h','o','l'......etc
cooljoe21
@cooljoe21
Oct 10 2015 00:43
ok thank you @namsir :smile:
CamperBot
@camperbot
Oct 10 2015 00:43
cooljoe21 sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:star: 215 | @namsir | http://www.freecodecamp.com/namsir
Jason
@Jauble
Oct 10 2015 00:54
Anyone know if I'm writing this wrong?
      newArr.reduce(function(a,b) {
        return a+b;
      });
noobstar
@namsir
Oct 10 2015 00:54
where is it returning to?
var arr = newArr.reduce(function(a,b) {
        return a+b;
      });
now arr will contain the return value
Jason
@Jauble
Oct 10 2015 00:56
The function call I guess. Is that the way to do it? I could've swore I did it the other way before and it worked
So I do that and then return arr?
noobstar
@namsir
Oct 10 2015 00:57
yeah
reduce always return a value
in this case a is previous value and b is the next value from the newArr array.
console.log(arr) and see it for yourself.
Jason
@Jauble
Oct 10 2015 00:59
I get that your way works by looking at it. I just thought I could do it the other way which would be more efficient
@namsir Thanks for the help
CamperBot
@camperbot
Oct 10 2015 00:59
jauble sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:warning: jauble already gave namsir points
Joshua Abu
@Absolutestunna
Oct 10 2015 01:02
anyone who can help on bonfire sum all numbers?
CamperBot
@camperbot
Oct 10 2015 01:02
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
noobstar
@namsir
Oct 10 2015 01:03
bonfire sum all numbers
CamperBot
@camperbot
Oct 10 2015 01:03

:fire:Bonfire: Sum All Numbers in a Range :link:

function sumAll(arr) {
  return(1);
}

sumAll([1, 4]);

We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.

more info:  bf details | bf links | hint

noobstar
@namsir
Oct 10 2015 01:04
@Absolutestunna there are multiple ways of doing it.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:04
@namsir correct me if i am wrong. I am trying to create an array using the two numbers that
noobstar
@namsir
Oct 10 2015 01:05
why?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:05
I am trying to populate the new array with all the numbers between the two given numbers and then use the .reduce method. But i am having problems creating that array
noobstar
@namsir
Oct 10 2015 01:06
is it always accept only 2 items in the array?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:06
so [2, 66], i want to first get the new array to give me numbers from 2 to 66
does that make sense @namsir
noobstar
@namsir
Oct 10 2015 01:06
yes i know what you are trying to do.
VladkoSW
@VladkoSW
Oct 10 2015 01:07
Replace your a element's href attribute with a #??
noobstar
@namsir
Oct 10 2015 01:07
use Max ?
find out which number is a max number
CamperBot
@camperbot
Oct 10 2015 01:07
find out which number is a max number
nothing found
noobstar
@namsir
Oct 10 2015 01:08
if first item in your arr is Max then second must be Min
otherwise
Joshua Abu
@Absolutestunna
Oct 10 2015 01:08
max is to find the biggest number between two numbers..but i don't know how the max and min is going to help me in getting a new array with all the numbers between the two given numbers
noobstar
@namsir
Oct 10 2015 01:08
use for loops to create your new array
Joshua Abu
@Absolutestunna
Oct 10 2015 01:08
I did..
noobstar
@namsir
Oct 10 2015 01:09
how did you construct your for loop?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:09
that's what i am trying to accomplish..i am having problems creating a for loop that will stop at the max number
I'll get you the code in a little. give me a sec
noobstar
@namsir
Oct 10 2015 01:09
so let's say 3 is your min number, 7 is your max number.
for( i = 3; i ......etc
VladkoSW
@VladkoSW
Oct 10 2015 01:10
hello
noobstar
@namsir
Oct 10 2015 01:10
hi
VladkoSW
@VladkoSW
Oct 10 2015 01:10
How use #&
?
Replace your a element's href attribute with a #
Chris
@Shifthawke
Oct 10 2015 01:11
@VladkoSW Delete the link and replace it with a #
noobstar
@namsir
Oct 10 2015 01:11
@VladkoSW what are you trying to accomplish?
@Shifthawke nice helmet :smile:
VladkoSW
@VladkoSW
Oct 10 2015 01:12
Waypoint: Make Dead Links using the Hash Symbol
Chris
@Shifthawke
Oct 10 2015 01:12
Thanks. I love my helmet. Its an alliance SSR. Limited edition.
CamperBot
@camperbot
Oct 10 2015 01:12
if you want to thank someone, put an @ before their name!
VladkoSW
@VladkoSW
Oct 10 2015 01:12
<p>Click here for <a href="http://www.freecatphotoapp.com"> cat photos</a>.</p>
noobstar
@namsir
Oct 10 2015 01:12
<a href="#"
Chris
@Shifthawke
Oct 10 2015 01:12
@VladkoSW I told you above.
VladkoSW
@VladkoSW
Oct 10 2015 01:12
thanks
CamperBot
@camperbot
Oct 10 2015 01:12
if you want to thank someone, put an @ before their name!
VladkoSW
@VladkoSW
Oct 10 2015 01:13
@camperbot
@camperbot thanks
CamperBot
@camperbot
Oct 10 2015 01:13
vladkosw sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 325 | @camperbot | http://www.freecodecamp.com/camperbot
noobstar
@namsir
Oct 10 2015 01:14
@VladkoSW you should send Shifthawke a brownie...not the camperbot LOL
@Shifthawke i would love to see your helmet pictures :)
VladkoSW
@VladkoSW
Oct 10 2015 01:15
@namsir thanks
CamperBot
@camperbot
Oct 10 2015 01:15
vladkosw sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:star: 216 | @namsir | http://www.freecodecamp.com/namsir
noobstar
@namsir
Oct 10 2015 01:15
@Shifthawke damn thing looks hot.
Chris
@Shifthawke
Oct 10 2015 01:15
No I don't deserve it.
I''m getting mean. I'm sorry @namsir
That's the helmet.
alliance ssr.jpg
noobstar
@namsir
Oct 10 2015 01:16
badass dude.
VladkoSW
@VladkoSW
Oct 10 2015 01:16
@Shifthawke thaks
CamperBot
@camperbot
Oct 10 2015 01:16
vladkosw sends brownie points to @shifthawke :sparkles: :thumbsup: :sparkles:
:star: 414 | @shifthawke | http://www.freecodecamp.com/shifthawke
Chris
@Shifthawke
Oct 10 2015 01:17
I need coffee.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:17
@namsir
function sumAll(arr) {
 var first = arr.shift();
 var second = arr.pop();
 var num_arr = []
 for (var i=0; i<Math.max(first, second); i++){
   var high = Math.max(first, second);
   var low = Math.min(first, second);
   low++
   num_arr.push(low)

 }
  }

sumAll([2, 55]);
noobstar
@namsir
Oct 10 2015 01:17
missing semilocon lol
Chris
@Shifthawke
Oct 10 2015 01:17
Thanks. I got it on a whim. I saw it and fell inlove. It was too big for my head. I wish they made girly sizes. So the store owner dug through some 200 helmet boxes to find the only medium.
CamperBot
@camperbot
Oct 10 2015 01:17
if you want to thank someone, put an @ before their name!
noobstar
@namsir
Oct 10 2015 01:17
why would you start your for loop with a 0
Chris
@Shifthawke
Oct 10 2015 01:18
SEMI COLONS!!!!!!! -shakes fist-
bgersh
@bgersh
Oct 10 2015 01:18
Hey everyone! I am new to code and was wondering what the best way to gain a foundational knowledge of how everything was.
works*
noobstar
@namsir
Oct 10 2015 01:18
for( var i= first; i < second; i++)
@bgersh i'm new too :) i guess just learn and practice makes good foundation.
Chris
@Shifthawke
Oct 10 2015 01:19
@bgersh I picked up jqery and javascript(reverse those) from john duckett.
Hang on I have a link for you
noobstar
@namsir
Oct 10 2015 01:19
@bgersh try to resolve people's problems also make you stronger.
bgersh
@bgersh
Oct 10 2015 01:20
do I start with HTML and CSS?
noobstar
@namsir
Oct 10 2015 01:20
@bgersh definitely
Chris
@Shifthawke
Oct 10 2015 01:20
Honestly, you can jump right into JS. FCC teaches some HTML and CSS though.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:20
@bgersh @Shifthawke in addition to FCC, i also read eloquent javascript, the first book on the link. It's really good
noobstar
@namsir
Oct 10 2015 01:21
people just try to finish FCC without doing research.....pointless.
Chris
@Shifthawke
Oct 10 2015 01:21
I have it saved. How long is it? I was thinking about printing it out.
@namsir ?
noobstar
@namsir
Oct 10 2015 01:21
they can google answer on google too.
bgersh
@bgersh
Oct 10 2015 01:22
does FCC teach about hosting and whatever else I would need to know about creating apps and websites? ( sorry I dont know the lingo yet)
Joshua Abu
@Absolutestunna
Oct 10 2015 01:22
@namsir between incrementing the lower number and push the incremented number into the empty array, it gets lost, is it because it's resetting?
noobstar
@namsir
Oct 10 2015 01:23
it doesn't get lost.
Chris
@Shifthawke
Oct 10 2015 01:23
@namsir Oh yeah. MDN, stackoverflow. I have better luck with those. Google and I don't get along.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:23
noobstar
@namsir
Oct 10 2015 01:23
i is always a dynamic index number
use it for its benefit.
bgersh
@bgersh
Oct 10 2015 01:24
@Absolutestunna @namsir thank you :)
CamperBot
@camperbot
Oct 10 2015 01:24
bgersh sends brownie points to @absolutestunna and @namsir :sparkles: :thumbsup: :sparkles:
:star: 298 | @absolutestunna | http://www.freecodecamp.com/absolutestunna
:star: 217 | @namsir | http://www.freecodecamp.com/namsir
bgersh
@bgersh
Oct 10 2015 01:24
@Shifthawke :)
noobstar
@namsir
Oct 10 2015 01:24
@Shifthawke i don't google my answers lol. i spent hours figuring things out. i learn better that way.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:24
@namsir
for (var i=first; i<second; i++){
   var high = Math.max(first, second);
   var low = Math.min(first, second);
   low++;
   num_arr.push(low);
Chris
@Shifthawke
Oct 10 2015 01:25
@namsir Well that's great for you. But programming doesn't come second nature to everyone.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:25
the last line of the code is expected to save the incremeted value of low into the empty array i created earlier. am i writing that correctly/.
?
@namsir
noobstar
@namsir
Oct 10 2015 01:25
@Absolutestunna didn't you just want to add those numbers up?
@Absolutestunna i thought you want to add the missing numbers between the array
[1,4]
your for loop should return [1,2,3,4]
Joshua Abu
@Absolutestunna
Oct 10 2015 01:26
Actually didn't think to add them up at that point, I actually wanted to just get an array of all the numbers between the lowest and the highest number, then use the .reduce to add them
noobstar
@namsir
Oct 10 2015 01:27
here
@Absolutestunna ```
Joshua Abu
@Absolutestunna
Oct 10 2015 01:27
that's what i am trying to do. get the for loop to return [1,2,3,4]
noobstar
@namsir
Oct 10 2015 01:27
function sumAll(arr) {
 var first = arr.shift();
 var second = arr.pop();
 var num_arr = []
 for (var i=first; i<second; i++){

   num_arr.push(i)

 }
  }


sumAll([2, 55]);
@Absolutestunna when you push i (index) it returns the current value based on where you started from.
let's say [2,55]
your i is 2
first loop will return 2
second loop will return 3,4,5,etc....
so every time you push i into num_arr
you will get an increment number
until i = 55
Joshua Abu
@Absolutestunna
Oct 10 2015 01:30
yeah..one of the things that was also confusing me was the placement of my return. I wanted to return the value of the array and i put it in the for loop..well it resets it every single time so i wasnt' getting the right result
lol
noobstar
@namsir
Oct 10 2015 01:30
you are dealing with digits atm.
nvm lol
i guess i can explain how for loop works so you get a better understanding.
for (Start; End; increment)
Joshua Abu
@Absolutestunna
Oct 10 2015 01:32
@namsir I'll have to add if statements to direct the iteration on where to start. like the example works great if the first number is less than the second number, but if it isn't, i expect it to draw a blank array
noobstar
@namsir
Oct 10 2015 01:32
@Absolutestunna of course.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:33
@namsir you are a good man sir..Thank you. Let me play with it and see where it takes me
CamperBot
@camperbot
Oct 10 2015 01:33
absolutestunna sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:star: 218 | @namsir | http://www.freecodecamp.com/namsir
noobstar
@namsir
Oct 10 2015 01:33
@Absolutestunna so do you think pop and shift are capable of detecting dynamic value ?
@Absolutestunna look up Math.min and Math.max
bonfire sorted union
CamperBot
@camperbot
Oct 10 2015 01:36

:fire:Bonfire: Sorted Union :link:

function unite(arr1, arr2, arr3) {
  return arr1;
}

unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);

Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.

more info:  bf details | bf links | hint

noobstar
@namsir
Oct 10 2015 01:36
anyone did this yet?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:36
@namsir in my understanding i deals with the current position of value of the array..i used pop and shift to remove the digits from the array because the pop and shift methods don't work on arrays.
I don't know if that helps
noobstar
@namsir
Oct 10 2015 01:37
@Absolutestunna pop and shift works.
they only work on arrays
@Absolutestunna just take a min and think about it. pop remove the last item of array and return it. shift remove the first item and returns it.
@Absolutestunna it doesn't know which number in your array is a biggest number.
@Absolutestunna or smallest.
@Absolutestunna now, does min and max know about the 2 numbers?
Michael Cheung
@m6cheung
Oct 10 2015 01:39
can someone take a look at my html file for my weather app and tell me why i cant load it locally?
noobstar
@namsir
Oct 10 2015 01:40
Math.min(6,1) will return 1
Math.max(6,1) will return 6
@Absolutestunna so would you use pop and shift or min and max?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:41
@namsir the question is: do we even need min or max at this point. I don't think we do.
noobstar
@namsir
Oct 10 2015 01:41
@Absolutestunna yes you do.
@Absolutestunna if you don't know which one is min.....how do you construct your for loop for(i=min; i < max; i++)
Joshua Abu
@Absolutestunna
Oct 10 2015 01:43
I have tried it with pop and shift and it's behaving as anticipated. I am getting the numbers between the array. I am using the if statement to check for the position of the big and small number..
do you want to see the code?
noobstar
@namsir
Oct 10 2015 01:44
@Absolutestunna tell me what does Pop do?
Joshua Abu
@Absolutestunna
Oct 10 2015 01:45
lol @namsir .pop takes the last value or in this case number from the end of the array and returns it. But in my code, i saved that number in a new variable
noobstar
@namsir
Oct 10 2015 01:45
ok
Joshua Abu
@Absolutestunna
Oct 10 2015 01:45
shift takes the first.
noobstar
@namsir
Oct 10 2015 01:45
@Absolutestunna alright.
@Absolutestunna lets make things a little simpler.
write me a code just to pop and shift an array that contains 2 numbers.
here is the array [3,7]
Joshua Abu
@Absolutestunna
Oct 10 2015 01:46
@namsir right now, I am just trying to get it to work..making things simpler or efficient is not necessarily a goal for now. I am barely trying to implement what i understand
noobstar
@namsir
Oct 10 2015 01:47
@Absolutestunna alright. we can do that too.
@Absolutestunna so you are saying your function will accept an array with 2 numbers.
you use pop and shift and assigned them to your first and second variables.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:48
var first_num = array.shift();
var sec_num = array.pop();
noobstar
@namsir
Oct 10 2015 01:48
@Absolutestunna ok now post your whole code.
Joshua Abu
@Absolutestunna
Oct 10 2015 01:49
function sumAll(arr) {
 var first = arr.shift();
 var second = arr.pop();
 var num_arr = [];
 if (first<second){
 for (var i=first; i<=second; i++){   
   num_arr.push(i);
  }
 } else {
   for (var i=first; i>=second; i--){
     num_arr.push(i);
   }
 }

  return num_arr
  }

sumAll([-1, 100]);
The return statement is there to show you the new value of the "num_arr" array i created earlier just before the first if statement
you can substitue positive numbers and flip the position of the sumAll array
@namsir like i said, my goal is just to get the number range in the array first, then i'll use the .reduce method to finish the assignment
noobstar
@namsir
Oct 10 2015 01:51
it looks like it's working for me
i got an array from -1 to 100
[ -1,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100 ]
it returns me that array.
you are missing a semicolon at the end of return num_arr
Joshua Abu
@Absolutestunna
Oct 10 2015 01:54
I'm glad it did. I just needed the return num_arr to check the value of the new array
Now I am working on the .reduce method
to add them
noobstar
@namsir
Oct 10 2015 01:54
@Absolutestunna sweet :) ... way to go
did anyone do the bonfire sorted union
federog
@federog
Oct 10 2015 01:56

Help I don't get it var ourArray = [1,2,3];
ourArray1 = 3;
// ourArray now equals [1,3,3].
var myArray = [3,2,3];
// Only change code below this line.

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
// You'll learn about functions soon.
if(typeof(myArray) !== "undefined"){(function(){return myArray;})();}

CamperBot
@camperbot
Oct 10 2015 01:56
no wiki entry for: i dont get it var ourarray 123ourarray1 3 ourarray now equals 133var myarray 323 only change code below this line only change code above this line we use this function to show you the value of your variable in your output box youll learn about functions sooniftypeofmyarray undefinedfunctionreturn myarray
:pencil: click here to create one now!after creating your page type update to reload it here
Joshua Abu
@Absolutestunna
Oct 10 2015 01:56
@namsir thanks again person
CamperBot
@camperbot
Oct 10 2015 01:56
absolutestunna sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:warning: absolutestunna already gave namsir points
Joshua Abu
@Absolutestunna
Oct 10 2015 01:56
lol
noobstar
@namsir
Oct 10 2015 01:57
@Absolutestunna you're welcome. good luck :)
Tim
@tdecker81
Oct 10 2015 01:57

'<style>

  .red-text {

    color: red;

  }

</style>

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

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

reporting back Your h2 element should be red.
why isn't it red
noobstar
@namsir
Oct 10 2015 01:58
@tdecker81 because you set the class to blue-text
@tdecker81 change it to red-text
Tim
@tdecker81
Oct 10 2015 01:58

<style>

  .red-text {

    color: red;

  }

</style>

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

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

still doesnt' pas
pas
pass
i pasted to jsfiddle and it doesnt show red there either
noobstar
@namsir
Oct 10 2015 02:00
which bonfire is it?
Tim
@tdecker81
Oct 10 2015 02:00
Waypoint: Use a CSS Class to Style an Element
noobstar
@namsir
Oct 10 2015 02:00
waypoint use a css class to style an element
that's weird....it should works
<style>
  .red-text {
    color: red;
  }
</style>

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

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Tim
@tdecker81
Oct 10 2015 02:03
Yours works.
How did you post the code window
noobstar
@namsir
Oct 10 2015 02:04
use the back ticks ``` hit enter and then paste code
Tim
@tdecker81
Oct 10 2015 02:05
How do i send brownie points
Herman Fassett
@HermanFassett
Oct 10 2015 02:05
wiki brownie points
CamperBot
@camperbot
Oct 10 2015 02:05

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

noobstar
@namsir
Oct 10 2015 02:05
click on my name and say thanks
CamperBot
@camperbot
Oct 10 2015 02:05
if you want to thank someone, put an @ before their name!
Tim
@tdecker81
Oct 10 2015 02:06
thanks @namsir
CamperBot
@camperbot
Oct 10 2015 02:06
tdecker81 sends brownie points to @namsir :sparkles: :thumbsup: :sparkles:
:star: 219 | @namsir | http://www.freecodecamp.com/namsir
Jason
@Jauble
Oct 10 2015 02:10
Anyone know the correct way to write this?
  for (var i = 0; i < arr1; i++) {
    if (!arr2.indexOf(arr1[i])) {
      newArr.push(arr1[i]);    
    }
  }
Herman Fassett
@HermanFassett
Oct 10 2015 02:11
< arr1.length in the for loop I'm guessing
And probably if (arr2.indexOf(arr1[i]) === -1)
DTing
@dting
Oct 10 2015 02:13
@Jauble indexOf needs to compare with -1
Jason
@Jauble
Oct 10 2015 02:16
@HermanFassett lol oops
@HermanFassett @dting Thanks guys, but why -1?
CamperBot
@camperbot
Oct 10 2015 02:16
jauble sends brownie points to @hermanfassett and @dting :sparkles: :thumbsup: :sparkles:
:star: 344 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
:star: 1359 | @dting | http://www.freecodecamp.com/dting
Herman Fassett
@HermanFassett
Oct 10 2015 02:16
That's what indexOf() returns if it's not found
DTing
@dting
Oct 10 2015 02:16
indexOf returns -1 if the element is not in the array
because it needs to return 0 if the elmenet is the first element
Jason
@Jauble
Oct 10 2015 02:17
@dting @HermanFassett Got it, thanks guys
CamperBot
@camperbot
Oct 10 2015 02:17
jauble sends brownie points to @dting and @hermanfassett :sparkles: :thumbsup: :sparkles:
:warning: jauble already gave dting points
:warning: jauble already gave hermanfassett points
Jason
@Jauble
Oct 10 2015 02:24
@dting @HermanFassett This is what I came up with. I see they mention .slice(), .filter() and .concat() in the helpful links. Is there a better way to do this using any of those?
function diff(arr1, arr2) {
  var newArr = [];
  for (var i = 0; i < arr1.length; i++) {
    if (arr2.indexOf(arr1[i]) === -1) {
      newArr.push(arr1[i]);    
    }
  }
  for (var i = 0; i < arr2.length; i++) {
    if (arr1.indexOf(arr2[i]) === -1) {
      newArr.push(arr2[i]);
    }
  }
  return newArr;
}

diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);
DTing
@dting
Oct 10 2015 02:24
you can use the array.filter function
to make a bit a more concise
but looks good
nice job
Joshua Abu
@Absolutestunna
Oct 10 2015 02:25
@namsir you still there. I have one more question..
lol
Jason
@Jauble
Oct 10 2015 02:26
@dting Ok thanks. I'll try that
CamperBot
@camperbot
Oct 10 2015 02:26
jauble sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: jauble already gave dting points
Joshua Abu
@Absolutestunna
Oct 10 2015 02:26
or anyone there to help with bonfire sum of all numbers. I have found a way to get the array appropriately, but i am missing a step or two in the creation of the sum array function itself
CamperBot
@camperbot
Oct 10 2015 02:26
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
DTing
@dting
Oct 10 2015 02:27
what does your code look like?
Joshua Abu
@Absolutestunna
Oct 10 2015 02:29
function sumAll(arr) {
//create array of numbers given by the arr argument
 var first = arr.shift();
 var second = arr.pop();
 var num_arr = [];
 if (first<second){
 for (var i=first; i<=second; i++){   
   num_arr.push(i);
  }
 } else {
   for (var i=first; i>=second; i--){
     num_arr.push(i);
   }
 }  
//Executing the .reduce method to get the total of the numbers in the array

 var total = num_arr.reduce(function(previousValue, currentValue, index, array){
    return previousValue+currentValue;

  });                     

}     
sumAll([100, 0]);
@dting
my num_arr contains the numbers between 100 and 0. you can test using return num_arr just before the second comment. Now i need to use the new array in conjunction to .reduce method to get the total of the numbers
DTing
@dting
Oct 10 2015 02:31
you arent returning your result
you set a variable total to the result of the reduce
but dont return it
Joshua Abu
@Absolutestunna
Oct 10 2015 02:34
@dting hmmm
how do i return the result?
Edper
@edper
Oct 10 2015 02:38
@Absolutestunna you don't have to use if (first<second) you can instead sort it first then use a for loop for example to iterate consecutive numbers inside a reduce function using prev as the initial value and current as the maximum value. ;-)
DTing
@dting
Oct 10 2015 02:40
function sumAll(arr) {
//create array of numbers given by the arr argument
 var first = arr.shift();
 var second = arr.pop();
 var num_arr = [];
 if (first<second){
 for (var i=first; i<=second; i++){   
   num_arr.push(i);
  }
 } else {
   for (var i=first; i>=second; i--){
     num_arr.push(i);
   }
 }  
//Executing the .reduce method to get the total of the numbers in the array

 var total = num_arr.reduce(function(previousValue, currentValue, index, array){
    return previousValue+currentValue;

  });                     
  return total;             // return the result
}     
sumAll([100, 0]);
j-gonzales
@j-gonzales
Oct 10 2015 02:40
I need a little hint for exercise 147.. not all of the green check marks are checked. For this check mark, "Your #target1 element should have the classes animated‚ shake and btn-primary." Shouldn't this accomplish this? $("#target1").addclass("animated shake btn-primary");
Herman Fassett
@HermanFassett
Oct 10 2015 02:40
It should be addClass with a capital C
j-gonzales
@j-gonzales
Oct 10 2015 02:41
Thanks Herman. Silly me.
CamperBot
@camperbot
Oct 10 2015 02:41
if you want to thank someone, put an @ before their name!
j-gonzales
@j-gonzales
Oct 10 2015 02:41
@HermanFassett Thanks! Silly me
CamperBot
@camperbot
Oct 10 2015 02:41
j-gonzales sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 345 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Joshua Abu
@Absolutestunna
Oct 10 2015 02:41
@dting did nothing
Herman Fassett
@HermanFassett
Oct 10 2015 02:41
Believe me, I've done worse :P
Joshua Abu
@Absolutestunna
Oct 10 2015 02:42
@edper i have never used the .sort before
j-gonzales
@j-gonzales
Oct 10 2015 02:42
@HermanFassett , no worries...
DTing
@dting
Oct 10 2015 02:43
bf sum
CamperBot
@camperbot
Oct 10 2015 02:43

:fire:Bonfire: Sum All Numbers in a Range :link:

function sumAll(arr) {
  return(1);
}

sumAll([1, 4]);

We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.

more info:  bf details | bf links | hint

j-gonzales
@j-gonzales
Oct 10 2015 02:43
@HermanFassett I need the squiggly lines underneath.. haha
Herman Fassett
@HermanFassett
Oct 10 2015 02:43
:P those do help
DTing
@dting
Oct 10 2015 02:43
Screen Shot 2015-10-09 at 7.43.37 PM.png
seems like it works
Alex Polubiec
@paloobi
Oct 10 2015 02:44
Does anyone else have a personal hatred for Roman numerals? I've been procrastinating getting started on that bonfire :(
Herman Fassett
@HermanFassett
Oct 10 2015 02:45
@paloobi that one was kind of fun to make as short as possible :P But yeah, numeral system with bases are nice
Edper
@edper
Oct 10 2015 02:45
@Absolutestunna Try checking this one sorting. I can show you my work by the way if you want. But let me try also refactoring your code.
Joshua Abu
@Absolutestunna
Oct 10 2015 02:46
@dting that was weird..it works now.
@dting thank yo!!!!
CamperBot
@camperbot
Oct 10 2015 02:47
absolutestunna sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1361 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Oct 10 2015 02:49
Sorting is an option but an alternative is to just set the variables in the correct order
if (arr[0] > arr[1]) {
  var start = arr[1];
  var limit = arr[0];
} else {
  var start = arr[0];
  var limit = arr[1];
}
// then single for loop that goes from i = start to i <= limit
Edper
@edper
Oct 10 2015 02:52
@Absolutestunna you're code is good actually you just forgot the return total at the last part.
function sumAll(arr) {
//create array of numbers given by the arr argument
 var first = arr.shift();
 var second = arr.pop();
  var num_arr = [];
 if (first<second){
 for (var i=first; i<=second; i++){   
   num_arr.push(i);
  }
 } else {
   for (var i=first; i>=second; i--){
     num_arr.push(i);
   }
 }  

 //Executing the .reduce method to get the total of the numbers in the array
 var total = num_arr.reduce(function(previousValue, currentValue, index, array){
    return previousValue+currentValue;

  });                     

  return total;
}     
sumAll([5, 10]);
Joshua Abu
@Absolutestunna
Oct 10 2015 02:54
@edper thank you!!
CamperBot
@camperbot
Oct 10 2015 02:54
absolutestunna sends brownie points to @edper :sparkles: :thumbsup: :sparkles:
:star: 45 | @edper | http://www.freecodecamp.com/edper
Joshua Abu
@Absolutestunna
Oct 10 2015 02:56
@dting I'll try to code it your way..see how it goes.
Edper
@edper
Oct 10 2015 03:00
function sumAll(arr) {

sorted_arr = arr.sort(function(a,b){
  return a-b;
});  
 //Executing the .reduce method to get the total of the numbers in the array
 var total = sorted_arr.reduce(function(previousValue, currentValue, index, array){
    sum=0;
    for(i=previousValue; i<=currentValue;i++) { 
           sum+=i;
        }
     return sum;
  });                     

  return total;
}
@Absolutestunna This is your program refactored with sort. GOD bless.
Jesse
@jctm30
Oct 10 2015 03:17
function diff(arr1, arr2) {
  var newArr = [];
  var concatArr = arr1.concat(arr2); //[1, 2, 3, 5, 1, 2, 3, 4, 5]
  for (i=0; i<concatArr.length; i++) {
    var searchOne = arr1.indexOf(concatArr[i])
    }; //looking for [1],[2],[3],[5],[1],[2],[3],[4],[5] in [1, 2, 3, 5]
  // result is (0, 1, 2, 3, 0, 1, 2, -1, 3)
  for (j=0; j<concatArr[j]; j++) {
    var searchTwo = arr2.indexOf(concatArr[j]) 
    }; //looking for [1],[2],[3],[5],[1],[2],[3],[4],[5] in [1, 2, 3, 4, 5]
  // result is (0, 1, 2, 4, 0, 1, 2, 3, 4)
  var correctElement1 = searchOne.indexOf(-1) //looking for -1 in (0, 1, 2, 3, 0, 1, 2, -1, 3). result would be 7
  if correctElement1 > -1 {

    newArr.push(concatArr[correctElement1])
  };

  var correctElement2 = searchTwo.indexOf(-1) //looking for -1 in (0, 1, 2, 4, 0, 1, 2, 3, 4). result would be -1.
  if correctElement2 > -1 {
    newArr.push(concatArr[correctElement2])
  };
  return newArr;
};

diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);
hi this is my code for Diff Two Arrays. can someone help me find what is missing?
DTing
@dting
Oct 10 2015 03:20
@jctm30 one way to approach this problem is instead of concating the arrays. keep the 2 arrays separate. first look through the first arr and find elements that are not in the second, adding the ones you find that are not in the second to a result array. then do the same to the second array looking for the elements in the first
pseudocode might look like:
var newArr = [];
for each element in arr1
  if element not in arr2
    push element to newArr

for each element in arr2
  if element not in arr1
    push element to newArr

return newArr
DTing
@dting
Oct 10 2015 03:25
if you want to use filter and concat pseudocode
results1 = arr1.filter function(el)
  return el not in arr2

results2 = arr2.filter function(el)
  return el not in arr1

return results1.concat results2
Jesse
@jctm30
Oct 10 2015 03:33
@dting thanks i'm figuring out based on your psuedocode
DTing
@dting
Oct 10 2015 03:33
np
DTing
@dting
Oct 10 2015 03:49
good luck
Jesse
@jctm30
Oct 10 2015 03:51
@dting haha thanks. still working at it!
CamperBot
@camperbot
Oct 10 2015 03:51
:star: 1362 | @dting | http://www.freecodecamp.com/dting
jctm30 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
navicyclical
@navicyclical
Oct 10 2015 03:53
ok, I took someone's suggestion of using a few methods for the Capitalize a sentence bonfire but mine isn't quite working yet
function titleCase(str) {
  var sentence = str.toLowerCase().split(" ");
  var capitalize = sentence.map(function(sentence){
    return sentence.charAt(0).toUpperCase()+sentence.substr(1,sentence.length-1);}).join(" ");
 }

titleCase("I'm a little tea pot", "");
DJ
@qualitymanifest
Oct 10 2015 03:54
@navicyclical you're not returning anything to titleCase
James Smith
@matthew02
Oct 10 2015 03:54
@navicyclical First of all, your titleCase function doesn't return anything. I haven't looked at the map yet, but you may try returning your capitalize variable.
DJ
@qualitymanifest
Oct 10 2015 03:55
@matthew02 well, yeah. i was trying to be a little more vague for the sake of learning though ;)
James Smith
@matthew02
Oct 10 2015 03:56
@qualitymanifest You're right. I get a little ahead of myself sometimes. :blush:
Edper
@edper
Oct 10 2015 03:59
@navicyclical the solution is correct except that you have to return capitalize. You can remove also capitalize and return everything on sentence.map(..) line.
Noelcboaz
@Noelcboaz
Oct 10 2015 04:06
Can I put a <div> class inside of another <div> class?
DJ
@qualitymanifest
Oct 10 2015 04:07
@Noelcboaz i'm a little confused as to your question... but yes, you can have more than one class in a div. you can also nest divs
James Smith
@matthew02
Oct 10 2015 04:07
@Noelcboaz Not sure if I understand what you're asking, but you can apply two different classes to a div.
Jason
@Jauble
Oct 10 2015 04:07
@dting Is there an easy way to write: el not in array?
James Smith
@matthew02
Oct 10 2015 04:07
@qualitymanifest You type too fast! :wink: Or maybe I think too slow.
Noelcboaz
@Noelcboaz
Oct 10 2015 04:07
My apologies guys. What I meant is that a large part of my code is in <div> tag.
Can I put another <div> tag inside the existing <div> tag?
James Smith
@matthew02
Oct 10 2015 04:08
@Noelcboaz Definitely can do that.
Noelcboaz
@Noelcboaz
Oct 10 2015 04:08
Awesome, thank you @matthew02
CamperBot
@camperbot
Oct 10 2015 04:08
noelcboaz sends brownie points to @matthew02 :sparkles: :thumbsup: :sparkles:
:star: 333 | @matthew02 | http://www.freecodecamp.com/matthew02
DJ
@qualitymanifest
Oct 10 2015 04:08
@Noelcboaz yes but like
<div>
    <div>
....
Noelcboaz
@Noelcboaz
Oct 10 2015 04:08
OOOOOH @qualitymanifest
Makes a lot more sense...
DJ
@qualitymanifest
Oct 10 2015 04:08
@matthew02 hahaha quick draw
James Smith
@matthew02
Oct 10 2015 04:10
:muscle: :joy:
navicyclical
@navicyclical
Oct 10 2015 04:13
@edper @matthew02 @qualitymanifest
Jesse
@jctm30
Oct 10 2015 04:17
@dting any additional hints? I just erased like three codes.. just doesn't wokr out
Edper
@edper
Oct 10 2015 04:34
@dting @abhisekp I refactored my code on diff to include those duplicates within an array but could not be found on other array.
function diff(arr1, arr2) {
  if (arr2.lengt==0) return arr1;
  return arr1.length == 0 ? arr2 : (arr1.concat(arr2).filter(function(val,idx,a){
     return ((a.indexOf(val) == a.lastIndexOf(val) | ((arr1.indexOf(val) != arr1.lastIndexOf(val)) & arr2.indexOf(val)==-1) | ((arr2.indexOf(val) != arr2.lastIndexOf(val)) & arr1.indexOf(val)==-1) ));
  }));
}
GianNipitella
@GianNipitella
Oct 10 2015 04:34
Hello everybody I have a question wheter a bonfire descriptcion is ok or not , I think it's asserts are wrong somehow I'm talking about bonfire number 12 Slasher Flick
can anybody helpme ? i dont want the solution or anything only to know how should it be!
Edper
@edper
Oct 10 2015 04:40
@GianNipitella it could be a one or two-liner code. Mind showing what you have?
Patrick Kennedy
@pkennedy89
Oct 10 2015 04:52
hint Roman Numeral Converter
CamperBot
@camperbot
Oct 10 2015 04:52
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Garrett Schultz
@garettschultz
Oct 10 2015 04:54
In Bonfire: Reverse a string, I am having troubles understanding how the answer is what it is.
blob
Here's the answer according to the docs.
blob
chyavana
@chyavana
Oct 10 2015 04:58
Hi all, I'm stuck with comparing a variable with false.
I've used the browser console.
Garrett Schultz
@garettschultz
Oct 10 2015 04:58
What i dont understand is, how do you know what order to put it all in? And for example where do they get var strReverse from? I would have never thought of that variable without looking at the docs. This is what confuses me about Javascript. If someone could help me out it would be greatly appreciated.
chyavana
@chyavana
Oct 10 2015 04:59
p = false
if(p == false) console.log('it\'s false')
VM11595:2 it's false
DJ
@qualitymanifest
Oct 10 2015 04:59
@gratschultz2013 did you view the hint? those aren't the docs... thats the solution
chyavana
@chyavana
Oct 10 2015 04:59
on using "==" the it's fale is printed.
but if I use the same in codecamp editor I'm not able to print it to console.
Program Execution Failure
this error is coming,
DJ
@qualitymanifest
Oct 10 2015 05:00
@gratschultz2013 anyway, the way that one works is you take the input (str), you split it into individual characters, then reverse it, then join them back together into a string
Dayne Wright
@daynewright
Oct 10 2015 05:00
@gratschultz2013 That solution shouldn’t work because you are returning str and you need to return strReverse.
DJ
@qualitymanifest
Oct 10 2015 05:01
@Daynewr ah yes, didn't look that closely
Garrett Schultz
@garettschultz
Oct 10 2015 05:01
@qualitymanifest I viewed the solution in github because I have no idea where to even start even after going through all the previous tutorials up to the bonfire.
DJ
@qualitymanifest
Oct 10 2015 05:01
@gratschultz2013 did you look at the "helpful links" FCC provides?
Dayne Wright
@daynewright
Oct 10 2015 05:02
@gratschultz2013 Do you understand how the methods are chained on? Each one is performing a different thing to the string.
Garrett Schultz
@garettschultz
Oct 10 2015 05:04
See here's my issue, when I learn this stuff, its like I can remember it in the moment but the second I go away from it, I completely forget how to do it. I have been trying to figure out how to do Javascript for quite some time now but it just isnt making any sense whatsoever. @Daynewr I have no clue what that even means to be honest.
HTML and CSS however are like 2nd nature to me as I have been designing Email newsletter templates for the last 4 years now as a profession. But now I am starting javascript for a hopeful better future career but man this stuff is confusing.
Dayne Wright
@daynewright
Oct 10 2015 05:06
Replace the function calls with this and look at the console. Use www.repl.it
var strReverse = str.split(‘’);
console.log(strReverse);
strReverse = strReverse.reverse();
console.log(strReverse);
strReverse = strReverse.join('');
console.log(strReverse);
DJ
@qualitymanifest
Oct 10 2015 05:06
@gratschultz2013 well my best advice would be to never look at the solution. read the helpful links, give it a really solid try, and post your code on here and ask for advice if you get stuck.
Dayne Wright
@daynewright
Oct 10 2015 05:06
https://repl.it/BPQ0 You can see it here. Click this link and look what the console outputs
Each one is a method that is performing something different .split() .reverse() .join()
Garrett Schultz
@garettschultz
Oct 10 2015 05:08
is there an easier way to understand how javascript works exactly? I feel like these tutorials arent explaining things in good enogh detail to really understand. Also is there an easier way to post my code to here or do i need to copy and paste an image of the code everytime?
DJ
@qualitymanifest
Oct 10 2015 05:08
@Daynewr you can view console.logs even when using FCC. it's just buried amongst a bunch of other things. i agree though, repl.it is really convenient for viewing console.log outputs
Dayne Wright
@daynewright
Oct 10 2015 05:08
console.log(putVarableHere); is a good way to see what the console is doing
DJ
@qualitymanifest
Oct 10 2015 05:08
@gratschultz2013 help format
help format
CamperBot
@camperbot
Oct 10 2015 05:09

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

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

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

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

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

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

Dayne Wright
@daynewright
Oct 10 2015 05:10
@qualitymanifest oh..cool. Didn’t know you could do console.log in FCC site
well..of course there is the dev tools
Garrett Schultz
@garettschultz
Oct 10 2015 05:11

``` function reverseString(str) {
var strReverse = str.split('').reverse().join('');
return str;
}

reverseString("hello", ""); ```

DJ
@qualitymanifest
Oct 10 2015 05:11
@gratschultz2013 if the waypoints aren't helping enough try the javascript section of codecademy. the bonfires are intentionally vague though, for the sake of learning how to figure out things for yourself
CamperBot
@camperbot
Oct 10 2015 05:11
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Garrett Schultz
@garettschultz
Oct 10 2015 05:11
i just tried the backticks and it didnt work
DJ
@qualitymanifest
Oct 10 2015 05:11
@gratschultz2013 yeah, you have to put them on separate lines above and below your code
Edper
@edper
Oct 10 2015 05:12
@gratschultz2013 It depends on what coding experience you have. HTML and CSS are descriptive languages while JavaScript is imperative and some functional ones. As somebody suggested console.log(whateverVaraibleYouWantToSeeHere); would really help in debugging and understanding your code. Now, in the code that you have shown strReverse is simply a variable to store the result of reversing the string. And the str is simply the passed string.
DJ
@qualitymanifest
Oct 10 2015 05:13
three backticks
your code goes here
three more backticks
Dayne Wright
@daynewright
Oct 10 2015 05:13
@gratschultz2013 The suggestion that @qualitymanifest made of codeacademy is a good one. Also check out learnCode.academy on YouTube.
Travis
@TravisHi
Oct 10 2015 05:13
@gratschultz2013 they have to be on their own lines
Garrett Schultz
@garettschultz
Oct 10 2015 05:14
@edper see, I have no idea what you even mean by that. all i know is i feel like i am doing something wrong to understand this stuff because it seems most people think its easy to learn but yet i am having extreme troubles.
`
Edper
@edper
Oct 10 2015 05:14
I mean declarative not descriptive sorry for that.
Dayne Wright
@daynewright
Oct 10 2015 05:14
@gratschultz2013 Also…Teamtreehouse has a 14 day free trial. If you want some basics you could sign up there and go through some of those lessons. They are great at getting you started and helped me a lot.
Garrett Schultz
@garettschultz
Oct 10 2015 05:14
how can a backtick be on its own line if everytime i hit "enter" it puts that 1 tick into chat lol
Edper
@edper
Oct 10 2015 05:14
codeacademy is really good way to start.
DJ
@qualitymanifest
Oct 10 2015 05:14
@Daynewr yeah. codecademy is kind of a dead end road, but it helped me understand a bit before i came here
Dayne Wright
@daynewright
Oct 10 2015 05:15
control + return will give you a new line @gratschultz2013
@qualitymanifest yeah…They do make you feel like you can do more than you can. I discovered that quickly once I was starting the ziplines.
Edper
@edper
Oct 10 2015 05:16
@gratschultz2013 type three backticks ``` and then press enter automatically it will give you the ending three backticks as well. Type or paste in the middle of the backticks and if you're done press Ctrl+Enter.
Garrett Schultz
@garettschultz
Oct 10 2015 05:17
ive read a few books and was lost beyond extreme one called: Javascript the definitive guide 6th edition, and Jquery & Javascript by Jon Duckett, neither of them helped at all. Ill give code academy a try i guess.
The reviews on those books say their for beginners haha but not even close.
Dayne Wright
@daynewright
Oct 10 2015 05:18
@gratschultz2013 Keep going through the bonfires and asking questions here…honestly that will help you learn it faster. One of the things it helped me do was understand how to search and how to read the docs online.
Garrett Schultz
@garettschultz
Oct 10 2015 05:23
Thank you @Daynewr @edper @qualitymanifest you have boosted my confidence. I just hope that its normal for this stuff to be confusing at first.
CamperBot
@camperbot
Oct 10 2015 05:23
gratschultz2013 sends brownie points to @daynewr and @edper and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 264 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
:star: 46 | @edper | http://www.freecodecamp.com/edper
:star: 288 | @daynewr | http://www.freecodecamp.com/daynewr
Travis
@TravisHi
Oct 10 2015 05:24
@gratschultz2013 https://www.youtube.com/watch?v=XHT9lsQ-_C0 you aren't alone!
Edper
@edper
Oct 10 2015 05:25
@gratschultz2013 breakthrough sometimes does not comes easily so persistence with a little caution of not overdriving yourself should be the order of the day for you. Once you got the hang of it you will be fine ;-)
Travis
@TravisHi
Oct 10 2015 05:25
It's hard work but if you keep hacking away you'll get it eventually
Garrett Schultz
@garettschultz
Oct 10 2015 05:26
okay because at this point i am at the point where i am just copying the examples because i have no idea what any of it means.
Travis
@TravisHi
Oct 10 2015 05:26
maybe look at the code you are copying
then try looking at the docs or something
until you understand why they used the invocations they did
Dayne Wright
@daynewright
Oct 10 2015 05:28
@gratschultz2013 don't copy. Attempt it and then ask here. It does get easier but still hard. Seriously, everyone here is super helpful and we all get stuck! :)
Garrett Schultz
@garettschultz
Oct 10 2015 05:30
i just feel bad if i am asking about every question every 10 minutes
Travis
@TravisHi
Oct 10 2015 05:30
It's good practice to answer questions!
I don't mind it when I can answer
it solidifies my understanding of it
Dayne Wright
@daynewright
Oct 10 2015 05:32
I say ask away. People here are good at pointing you without giving the answer. Great community to learn with.
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:33
besides, if someone gets tired of seeing help requests, they're probably in the wrong chat room
Travis
@TravisHi
Oct 10 2015 05:34
good point @jedpimentel
Garrett Schultz
@garettschultz
Oct 10 2015 05:35
What is the exclamation point here for? I understand the equation and that it takes 5 numbers to equal the 120 but whats with the exclamation point? 5! = 1 2 3 4 5 = 120
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:36
This message was deleted
Garrett Schultz
@garettschultz
Oct 10 2015 05:37
so then why put the 5 in front of it?
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:37
sorry, there, it's the "power" function
DJ
@qualitymanifest
Oct 10 2015 05:38
Nope. In this case, the ! Means factorial
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:38
*factorial (not having a good day)
the lack of multiplication signs is a bit weird
Garrett Schultz
@garettschultz
Oct 10 2015 05:39
so what does factorial mean?
Garrett Schultz
@garettschultz
Oct 10 2015 05:41
see this is what makes no sense lol. why even talk about factorials and stuff if all the have to do is say okay 12345=120?
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:43
it's used because it's a fairly common operation in some areas. Basically the same reason we use 5*4 instead of 5+5+5+5
Garrett Schultz
@garettschultz
Oct 10 2015 05:43
I failed every math class in high school so maybe thats why i have no idea what it means because i never understood the concept of using variables because math is using numbers and i always thought using letters and stuff was more "english" rather than "math" so it never made sense when seeing things like a + b - 5 + c = d
Travis
@TravisHi
Oct 10 2015 05:44
maybe check out the khan academy math course @gratschultz2013 if that's the case
might help
Garrett Schultz
@garettschultz
Oct 10 2015 05:44
but why use a exclamation point is what im asking? because thats what makes everyting extremely confusing like whats the purpose of it?
Travis
@TravisHi
Oct 10 2015 05:44
to save time typing I guess
shorthand version
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:46
they had to use something, I'm just glad it's something we have on keyboards
Garrett Schultz
@garettschultz
Oct 10 2015 05:47
function factorialize(num) {
  return num;
}

factorialize(5, '');
Return the factorial of the provided integer.
Where do i even start with this?
Jelani Thompson
@JelaniThompson
Oct 10 2015 05:49
Hey there, I'm learning git right now! Is anyone here familiar with it and able to help?
Thanks in advance :D
CamperBot
@camperbot
Oct 10 2015 05:50
if you want to thank someone, put an @ before their name!
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:50
considering the definition of the factorial function, write some code that'll calculate the factorial of 'num' where 'num' can be any number, then return that value
most people either use a loop or recursion
Garrett Schultz
@garettschultz
Oct 10 2015 05:52
whats a loop and recursion @jedpimentel?
I just need someone to help me figure this out. I dont learn very well by being told what to do, I learn by having examples given to me.
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:54
a recursive function is a function that calls itself, sort of like putting to mirrors together, a loop is a way of iterating a certain ammount of times, you'll probably have to do a google search since it's not exactly the kind of stuff I can say off the top of my head
Solehjon
@Solehjon
Oct 10 2015 05:55
Add a div element below your h3 element.
Guys what i should to do?
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:55
@gratschultz2013 also the codecademy JavaScript course is a lot more talkative when it comes to giving instructions,
Travis
@TravisHi
Oct 10 2015 05:56
@gratschultz2013 maybe this will help?
Garrett Schultz
@garettschultz
Oct 10 2015 05:56
<h3></h3>
<div></div>
Solehjon
@Solehjon
Oct 10 2015 05:57
@gratschultz2013 it doesn't work

@gratschultz2013 <h3 class="text-primary text-center">jQuery Playground</h3>

<div class="row"></div>

Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:58
@TravisHi looks like a good resource.
Travis
@TravisHi
Oct 10 2015 05:58
@jedpimentel khan academy is great
He's done a great thing with it, and it only gets bigger and better!
wonder if FCC was inspired by it
Jose E. Pimentel
@jedpimentel
Oct 10 2015 05:59
@TravisHi don't feel bad if it takes you a while to finish something, usually it just means you're learning more new topics than someone who is just smashing rocks together untill they get a green checkmark from the site
Garrett Schultz
@garettschultz
Oct 10 2015 05:59
@Solehjon which challenge are you on?
Travis
@TravisHi
Oct 10 2015 06:00
@jedpimentel you mean @gratschultz2013 ?
Solehjon
@Solehjon
Oct 10 2015 06:00
@gratschultz2013 you mean my course?Bootstrap
Garrett Schultz
@garettschultz
Oct 10 2015 06:00
on the top left corner it should say the name of the challenge you are on
Solehjon
@Solehjon
Oct 10 2015 06:01
Waypoint: Create a Bootstrap Row
@gratschultz2013 Waypoint: Create a Bootstrap Row
Jose E. Pimentel
@jedpimentel
Oct 10 2015 06:01
@TravisHi aaaah, yes. I shoul probably get off the chat, I have a terrible cold and can't think straight
Garrett Schultz
@garettschultz
Oct 10 2015 06:01
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
  </div>
</div>
Travis
@TravisHi
Oct 10 2015 06:02
ah man, I think coding is the cure for the common cold :p @jedpimentel
Solehjon
@Solehjon
Oct 10 2015 06:02
@gratschultz2013 Thanks a lot, it works
CamperBot
@camperbot
Oct 10 2015 06:02
solehjon sends brownie points to @gratschultz2013 :sparkles: :thumbsup: :sparkles:
:star: 191 | @gratschultz2013 | http://www.freecodecamp.com/gratschultz2013
Garrett Schultz
@garettschultz
Oct 10 2015 06:02
No problem @Solehjon , Love Bootstrap been using it since v1
Im confused guys, I have tried using n! in the quotes, and tried putting in the equation and still cant figure this out. any help would be appreciated.
function factorialize(num) {
  return num;
}

factorialize(5, '');
Travis
@TravisHi
Oct 10 2015 06:06
n would just be a placeholder
Garrett Schultz
@garettschultz
Oct 10 2015 06:06
what do i even type in? and where do i tyyype it in at?
Travis
@TravisHi
Oct 10 2015 06:07
that's what the khan link I posted was to help you understand
Garrett Schultz
@garettschultz
Oct 10 2015 06:09
ya the russian doll example
Solehjon
@Solehjon
Oct 10 2015 06:10
@gratschultz2013 how about this SIr Nest two div class="col-xs-6" elements within your div class="row" element.\
Garrett Schultz
@garettschultz
Oct 10 2015 06:11
@Solehjon ```
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
    </div>
    <div class="col-xs-6">
    </div>

  </div>
</div>
Solehjon
@Solehjon
Oct 10 2015 06:12
@gratschultz2013 Thanks
CamperBot
@camperbot
Oct 10 2015 06:12
solehjon sends brownie points to @gratschultz2013 :sparkles: :thumbsup: :sparkles:
:warning: solehjon already gave gratschultz2013 points
Garrett Schultz
@garettschultz
Oct 10 2015 06:14
@TravisHi, that link is confusiing to me. I am on the first paragraph of the 2nd part "the factorial function" and its already saying 5! = 120 when that is impossible in reality
Travis
@TravisHi
Oct 10 2015 06:15
did you read the wiki link @jedpimentel posted earlier?
Garrett Schultz
@garettschultz
Oct 10 2015 06:18
yes, but again it made the same exact definition about how 5! = 120 and stuff about how (n - 1)*(n-2) stuff like that but thats not possible in math because you cannot subtract letters you can only subtract numbers. Im a complete dummy when it comes to math. Only thing i was good at is history lol
Travis
@TravisHi
Oct 10 2015 06:19
n is a placeholder for any number you want to calculate
Garrett Schultz
@garettschultz
Oct 10 2015 06:20
like why go through all that hassle when you can get the same answer of 120 by just typing 5 to the 5th power?
Travis
@TravisHi
Oct 10 2015 06:20
maybe check out khan academy's math course, it's great
Garrett Schultz
@garettschultz
Oct 10 2015 06:21
but how is math going to help me learn front end web development?
Solehjon
@Solehjon
Oct 10 2015 06:21
@gratschultz2013 Hey Buddy, I didn't understand these course can you help me with this tag(reason is english not so good)Add a div element with the class well inside each of your div elements with the class "col-xs-6"
Travis
@TravisHi
Oct 10 2015 06:22
@gratschultz2013 it helps with javascript/any programming language
Jason
@Jauble
Oct 10 2015 06:23
Anyone know why my $(this).addClass("animated bounce"); isn't working? http://codepen.io/auble220/pen/GpmjGx
Solehjon
@Solehjon
Oct 10 2015 06:26
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
what I have to do?
Garrett Schultz
@garettschultz
Oct 10 2015 06:26
How do they expect a beginner with javascript to understand these bonfires god this seriously makes me want to give up. Because i bet other beginners could get this immediately guaranteed.
ive been on the same problem for almost an hour!!!!!!!!!!!
Travis
@TravisHi
Oct 10 2015 06:27
I've been on the same problem for days
I'll work it out though
Knut Jackowski
@doxanthropos
Oct 10 2015 06:29
@gratschultz2013 Do not give up. The bonfires are designed to make you think and learn. At least as I understand them, they are not built to be done fast.
Garrett Schultz
@garettschultz
Oct 10 2015 06:29
ya but to not even know where to start? i mean i have no idea im just staring at the editor wondering "where do i go from here" and its been like that for 45 min
Knut Jackowski
@doxanthropos
Oct 10 2015 06:30
@gratschultz2013 What bonfire is it?
Solehjon
@Solehjon
Oct 10 2015 06:30
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
Garrett Schultz
@garettschultz
Oct 10 2015 06:31
Factorialize a number
Solehjon
@Solehjon
Oct 10 2015 06:32
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
guys help me
Knut Jackowski
@doxanthropos
Oct 10 2015 06:33
@gratschultz2013 Ah, that can be tricky. I think a good way to start this is to look up more detailed explanations about how factorials are generated generally.
Garrett Schultz
@garettschultz
Oct 10 2015 06:33
@Solehjon specify which challenge it is
Knut Jackowski
@doxanthropos
Oct 10 2015 06:34
@gratschultz2013 Then think about how you would do it on paper, without a computer.
Solehjon
@Solehjon
Oct 10 2015 06:34

@gratschultz2013 Create Bootstrap Wells
Bootstrap has a class called well that can create a visual sense of depth for your columns.

Nest one div element with the class well within each of your col-xs-6 div elements.

Garrett Schultz
@garettschultz
Oct 10 2015 06:34
@doxanthropos thats what ive been doing
but doesnt make any sense at all
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well">

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

      </div>
    </div>
  </div>
</div>
Saicharan N
@saicharannivarthi
Oct 10 2015 06:35
Hello guys, Has anyone tried building the Cat photo app in android phone ?
I tried it but it looks way more different , How can i include Bootstrap in it ?
Solehjon
@Solehjon
Oct 10 2015 06:36
@gratschultz2013 How did you do that, thanks a lot
CamperBot
@camperbot
Oct 10 2015 06:36
solehjon sends brownie points to @gratschultz2013 :sparkles: :thumbsup: :sparkles:
:warning: solehjon already gave gratschultz2013 points
Garrett Schultz
@garettschultz
Oct 10 2015 06:37
@doxanthropos if it was on paper id just draw a gummy bear and keep putting more and more smaller ones insidde one another. But the problem is writing it out in problem form. Like i look at the code and all i can think is "how am i supposed to know what to do when im just an extreme beginner with javascript?"
@saicharannivarthi include the latest bootstrap cdn add this ```
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
Knut Jackowski
@doxanthropos
Oct 10 2015 06:40
@gratschultz2013 When you have done the parts of the course until this point, you know enough JS to solve the problem. I think the hardest part of the bonfires is to learn how to think "algorythmically", how to take knowledge about a process and divide it into little chunks that the computer is able to execute.
Garrett Schultz
@garettschultz
Oct 10 2015 06:41
my problem is, is i forget what i learn the second my eyes are off the page. or i dont understand unless i have an example to go off of.
Knut Jackowski
@doxanthropos
Oct 10 2015 06:43
@gratschultz2013 OK, that's maybe another kind of problem. I know this from my own experience. The way I use to work with it is through repetition. Doing similar exercieses again and again until it sticks. For JS, you could use codecademy.com
Garrett Schultz
@garettschultz
Oct 10 2015 06:48
so @doxanthropos you think i should do the jaascript section of codeacademy first and then try coming back here and trying it again?
Saicharan N
@saicharannivarthi
Oct 10 2015 06:50
@gratschultz2013 , Thanks but , i tried it u pastsing the same code through PhoneGap into my android phone , there all the buttons and images are default , it looks ugly
How to make it look exactly as in the output shown in the tutorials ?
CamperBot
@camperbot
Oct 10 2015 06:50
saicharannivarthi sends brownie points to @gratschultz2013 :sparkles: :thumbsup: :sparkles:
:star: 193 | @gratschultz2013 | http://www.freecodecamp.com/gratschultz2013
Knut Jackowski
@doxanthropos
Oct 10 2015 06:52
@gratschultz2013 It will not hurt. At least for me it was helpful to do some things more than once, just to be able to do them without much going back to the documentation.
@gratschultz2013 But I also think that you probably know enough JS now to do the factorialize bonfire. You need to know: How to write a function, how to write a loop (for or while loop, both will work) and that's it.
Saicharan N
@saicharannivarthi
Oct 10 2015 06:59
@doxanthropos How about Palindrom ?
Garrett Schultz
@garettschultz
Oct 10 2015 07:00
@saicharannivarthi you would need to copy and paste all the CSS that they use in the tutorials. They use CSS to change the styles of all the buttons and everything from the default bootstrap style.
@doxanthropos I will most likely try codeacademy, I will also go back and redo the entire javascript course here on FCC and keep doing it over and over until it becomes plastered in my head.
Knut Jackowski
@doxanthropos
Oct 10 2015 07:02
@saicharannivarthi I would say, it builds on what you will have learned on factorialize. There are a bit more JS pieces needed.
@gratschultz2013 That's probably a good strategy. I like the feeling very much, when I did the jQuery track on Codecademy and they had me type the $(document).ready(function(){};); part in nearly every exercise, not just the tiny bit that was the actual point of the lesson. So it is easier not to forget the basics.
Saicharan N
@saicharannivarthi
Oct 10 2015 07:06
@doxanthropos did u try the catphoto app in u r mobile ?
Knut Jackowski
@doxanthropos
Oct 10 2015 07:07
@saicharannivarthi No, my mobile is rubbish and I nearly only use it to phone or for short messages.
Saicharan N
@saicharannivarthi
Oct 10 2015 07:08
okay :D
@doxanthropos
Garrett Schultz
@garettschultz
Oct 10 2015 07:10
@doxanthropos makes sense. see its mainly the basics i have issues with. but mygoal with programming in general is I am only focusing on learning client side and server side JS. Im already pretty fluent with jQuery, HTML and CSS as i use them on a daily basis so all I need to focus on is learning JS stuff. Trying to become a JS ninja as the senior devs would call it.
Im not interested in like PHP or anything like that. Stuff like Angular.JS, Node.js, express.js, react.js ect
Knut Jackowski
@doxanthropos
Oct 10 2015 07:21
@gratschultz2013 I think it is a good thing, that you know what you want and where you have to learn. If you really want to practice your JS, it will help you to concentrate on that. The bonfires do that in a way, but the waypoints before are a little short. A month or two ago they weren't made by FCC, but contained only links to the relevant parts of the codecademy courses. I still like those better for learning the basics. For the more challenging stuff, FCC is much more advanced.
CamperBot
@camperbot
Oct 10 2015 07:21
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
pooji02
@pooji02
Oct 10 2015 07:59
can anyone help me with "Waypoint: Target the same element with multiple jQuery Selectors " ??
KingAsael
@KingAsael
Oct 10 2015 08:07
I cant figure out waypoint: size your images
How do i apply smaller-image to the img element?
Rex Schrader
@SaintPeter
Oct 10 2015 08:08
@KingAsael You have the class created?
@KingAsael Do you know how to add a class attribute to the image element?
@KingAsael An attribute looks like someAttribute="someValue"
KingAsael
@KingAsael
Oct 10 2015 08:10
.smaller-image {
width:100px;
}
inside the style tag
Rex Schrader
@SaintPeter
Oct 10 2015 08:11
@KingAsael That's right. Do you see how you might add a class attribute, given what I've shown above?
KingAsael
@KingAsael
Oct 10 2015 08:14
hmmm
Got it!!!
Rex Schrader
@SaintPeter
Oct 10 2015 08:16
@KingAsael Awesome!
KingAsael
@KingAsael
Oct 10 2015 08:16
Thank you!
CamperBot
@camperbot
Oct 10 2015 08:16
if you want to thank someone, put an @ before their name!
Rex Schrader
@SaintPeter
Oct 10 2015 08:16
@KingAsael Sure thing!
Sudip Ghosh
@sudip007
Oct 10 2015 08:17
I can't solve the "Create a JavaScript Slot Machine" problem.
Rex Schrader
@SaintPeter
Oct 10 2015 08:18
@sudip007 Those are a bit tricky
@sudip007 Is it the first one? Maybe you can share the code you've written?
@sudip007 just the parts you added
Sudip Ghosh
@sudip007
Oct 10 2015 08:19
@SaintPeter I added this two line return Math.floor(Math.random() * (3 - 1 + 1)) + 1
return Math.random();
Rex Schrader
@SaintPeter
Oct 10 2015 08:21
@sudip007 You don't need return lines, I don't think. You need to assign the random numbers to each of the three variables: slotOne, slotTwo, and slotThree.
@sudip007 return doesn't do assignment, per se, it exits the function with a value.

@sudip007 From the instructions:
"Store the three random numbers in slotOne, slotTwo and slotThree.

Generate the random numbers by using the system we used earlier (an explanation of the formula can be found here):

Math.floor(Math.random() * (3 - 1 + 1)) + 1;"

Sudip Ghosh
@sudip007
Oct 10 2015 08:23
are you saying that I should assign slotOne = 1 or slotOne = Math.floor(Math.random() * (3 - 1 + 1)) + 1
Rex Schrader
@SaintPeter
Oct 10 2015 08:23
@sudip007 The latter. And you need to do the same for the other two variables.
@sudip007 The idea, in general, is to get 3 random numbers, one for each slot.
Sudip Ghosh
@sudip007
Oct 10 2015 08:25
@SaintPeter are you saying I should assign slotOne = 1 or slotOne = Math.floor
Rex Schrader
@SaintPeter
Oct 10 2015 08:26
@sudip007 Take a look at the instructions. They're really quite clear. I can TELL you how to answer the problem, but that doesn't really help you.
Sudip Ghosh
@sudip007
Oct 10 2015 08:28
@SaintPeter I just do that but the code still don't run
Rex Schrader
@SaintPeter
Oct 10 2015 08:29
@sudip007 Which tests are failing?
Sudip Ghosh
@sudip007
Oct 10 2015 08:30
The last one "You should have used Math.floor(Math.random() * (3 - 1 + 1)) + 1; three times to generate your random numbers."
Rex Schrader
@SaintPeter
Oct 10 2015 08:30
@sudip007 ok, what did you assign to the three variables? Did you use the provided formula?
Sudip Ghosh
@sudip007
Oct 10 2015 08:31
@SaintPeter yes I did
Rex Schrader
@SaintPeter
Oct 10 2015 08:31
@sudip007 Please share your code here. Look at these instructions for pasting code correctly.
wiki format
CamperBot
@camperbot
Oct 10 2015 08:31

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

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

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

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

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

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

Sudip Ghosh
@sudip007
Oct 10 2015 08:34
This message was deleted

    slotOne = Math.floor(Math.random() * (3 - 1 + 1)) + 1
    slotTwo = Math.floor(Math.random() * (3 - 1 + 1)) + 1
    slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1
Rex Schrader
@SaintPeter
Oct 10 2015 08:36
@sudip007 You're missing semicolons at the end of each line
Sudip Ghosh
@sudip007
Oct 10 2015 08:37
@SaintPeter thanks mate. You're awesome.
CamperBot
@camperbot
Oct 10 2015 08:37
sudip007 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 946 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Oct 10 2015 08:37
:D
Glad to help
Sudip Ghosh
@sudip007
Oct 10 2015 08:41
@camperbot how to send brownie points to @SaintPeter
Rex Schrader
@SaintPeter
Oct 10 2015 08:41
wiki brownie points
CamperBot
@camperbot
Oct 10 2015 08:41

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Rex Schrader
@SaintPeter
Oct 10 2015 08:41
@sudip007 Also, you already did, above.
Pravin Kerai
@yamd00t
Oct 10 2015 11:13
@sudip007 hey mate
Rishi
@rishivadukul
Oct 10 2015 11:14
hello
Edper
@edper
Oct 10 2015 12:06
hello @rishivadukul
Pekmen
@Pekmen
Oct 10 2015 12:08
Hey guys, I was wondering if I'm allowed to completely redesign Zipline: Build a Personal Portfolio Webpage. That stuff there is horrid .
Mistereo
@Mistereo
Oct 10 2015 12:11
@Pekmen "Reverse engineer the example project's functionality, and also feel free to personalize it." - so yes.
Daniela
@undefinedsymbol
Oct 10 2015 12:19
@Pekmen I guess if you just include the user stories and requirements mentioned in the waypoint it should be ok. Mine is not going to be an exact copy either ;)
Samuil
@Samuil1914
Oct 10 2015 12:21
i need hellp! what to do on chalange:Use a CSS Class to Style an Element
SimunKaracic
@SimunKaracic
Oct 10 2015 12:23
hi guys. so uh, i may have written an infinite loop or something on one of the bonfires. the page became unresponsive and when i try to open it again it just freezes
anyone got a solution for that?
Michael Bomholt
@bomholtm
Oct 10 2015 12:24
@Samuil1914 responded in main chan
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 12:27
function factorial(n) {
  if (n === 0) {
    return 1;
  }

  // This is it! Recursion!!
  return n * factorial(n - 1);
}
factorial(10)
function factorialize(num) {
  var nummArray = [];
    for (var i = 1; i <= num;i++) {
      nummArray.push(i);
    }; 

  if (num === 0) {
    num = 1;
  } else {
      num = nummArray.reduce(function (a, b) {
    return a * b;
  });
  }

  return num;

}
Hello good people. I have a question, this recursion is awesome. Second example is me trying without recursion in mind to solve factorial problem. I'm trying to break it down, step by step how the first example work (recursion), but I fail hard. Can someone do that for me, if he/she is in the mood for that ? :D
Mistereo
@Mistereo
Oct 10 2015 12:31
@JohneyCodeUp to solve this problem without recursion you only need one for/while loop :)
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 12:33
@Mistereo Yes i know that but i want to understand Recursion :D
Mistereo
@Mistereo
Oct 10 2015 12:36
@JohneyCodeUp have no idea how this code can help you.
@JohneyCodeUp don't see any connection with recursion.
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 12:39
@Mistereo the second one it just me showing have stupid I am. The first one is why i want help.
@Mistereo he second one it just me showing have stupid I am. The first one is why i want help.
Mistereo
@Mistereo
Oct 10 2015 12:43
@JohneyCodeUp maybe this link can help you: https://goo.gl/uA1lVj
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 12:46
@Mistereo people must love this open comunity, thanks, i forget about khan. :D
CamperBot
@camperbot
Oct 10 2015 12:46
johneycodeup sends brownie points to @mistereo :sparkles: :thumbsup: :sparkles:
:star: 279 | @mistereo | http://www.freecodecamp.com/mistereo
Simon Frost
@Simon-Frost
Oct 10 2015 12:55
i need hellp! what to do on chalange:Use a CSS Class to Style an Element I am at the same one
@Samuil1914
@Samuil1914 I am stuck at the same one. This would be the first one thta you hav eto think and not just C/P
Simon Frost
@Simon-Frost
Oct 10 2015 13:08
Use CSS Selectors to Style Elements [WIKI]
wiki Use CSS Selectors to Style Elements
CamperBot
@camperbot
Oct 10 2015 13:09

:point_right: waypoint use css selectors to style elements [wiki]

Instead of giving style attributes one by one, we can do this to multiple elements at the same time.

You can create a style element like this: <style></style>.

Inside that style element, you can create a CSS selector for any HTML Elements. For example, if you wanted all h2 elements to be red, your style element would look like this: <style>h2 {color: red;}</style>.

Note that it's important to have both opening and closing curly braces ({ and }) around each element's style. You also need to make sure your element's style is between the opening and closing style tags. Finally, be sure to add the semicolon to the end of each of your element's styles.
:pencil: read more about waypoint use css selectors to style elements on the FCC Wiki

Aaron Freidus
@shadowfool
Oct 10 2015 13:42
anyone still have the link to the old map concat reduce etc. repository tutorial on github
?
Ashraf Patel
@AshrafPatel
Oct 10 2015 13:43
Hello im a noob learning to code and can't get to the next screen its saying your style needs to be red

h2><h2 style="color:red">CatPhotoApp</h2>

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

Sasa
@tanasic
Oct 10 2015 13:43
@4SHR4F can you paste the code corectly and i will try to help you
Ashraf Patel
@AshrafPatel
Oct 10 2015 13:44
Thank You I have pasted the code
CamperBot
@camperbot
Oct 10 2015 13:44
if you want to thank someone, put an @ before their name!
azaleas
@azaleas
Oct 10 2015 13:45
@4SHR4F remove the first h2>
Ashraf Patel
@AshrafPatel
Oct 10 2015 13:45
@tanasic @camperbot Thank You
CamperBot
@camperbot
Oct 10 2015 13:45
4shr4f sends brownie points to @tanasic and @camperbot :sparkles: :thumbsup: :sparkles:
:star: 78 | @tanasic | http://www.freecodecamp.com/tanasic
:star: 328 | @camperbot | http://www.freecodecamp.com/camperbot
Sasa
@tanasic
Oct 10 2015 13:45
it should go like this <h2 style='color: red'>CatPhotoApp</h2>
Ashraf Patel
@AshrafPatel
Oct 10 2015 13:46
@tanasic Oh thanks I was wondering what I was doing once again thanks
CamperBot
@camperbot
Oct 10 2015 13:46
4shr4f sends brownie points to @tanasic :sparkles: :thumbsup: :sparkles:
:warning: 4shr4f already gave tanasic points
Sasa
@tanasic
Oct 10 2015 13:46
@4SHR4F no problem :)
Chiara
@ChiaraCampagnola
Oct 10 2015 13:56
Hi guys! I'm at the "Generate Random Whole Numbers within a Range" Waypoint in JavaScript but I can't really understand how we got to the expression Math.floor(Math.random() * (max - min + 1)) + min. I get what Math.floor and Math.random do but I just can't figure out WHY that expression returns a value between min and max, can anyone explain? Or is it one of those things that we're supposed to just kind of blindly accept? :smile:
Pekmen
@Pekmen
Oct 10 2015 14:05
Is it really required to do Front End challenges in CodePen? I kinda hate writing in it, it seems crammed no matter how I resize my boxes..
opencircles
@opencircles
Oct 10 2015 14:15
Hi
Could seomeone explain why are there two $ in this Jquery expression
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
This is line to change the slot image for the final exercise in the Basic JS
Thanks folks!
CamperBot
@camperbot
Oct 10 2015 14:16
if you want to thank someone, put an @ before their name!
opencircles
@opencircles
Oct 10 2015 14:16
Sure @camperbot
Mistereo
@Mistereo
Oct 10 2015 14:18
@opencircles it's because $('.slot')[0] returns vanilla dom element, so we should wrap it with jquery to have .html helper.
@opencircles you can achieve the same result with: $('.slot').eq(0).html('<img src = "' + images[slotOne-1] + '">');
Mistereo
@Mistereo
Oct 10 2015 14:23
@ChiaraCampagnola Math.random returns random number between 0 and 1 (excluding), so we multiply it by (max - min + 1) to scale this number to range 0..(max-min) then we add min and resulting range became: min...max.
sorry, it seems my english is really bad :)
Mistereo
@Mistereo
Oct 10 2015 14:29
@Pekmen you can write code in your favorite editor and then just C/P to codepen.
fajkovicsasa
@fajkovicsasa
Oct 10 2015 14:46

Hi guys, I think I found a bug In the "Bonfire: Title Case a Sentence"

I do a console.log() to check my results and they are the same as the correct answer should be but I'm not getting any check marks. Here is the code:

function titleCase(str) {

var array = str.split(' ');
var tmpArray;
var array2=[];

for (i = 0; i<array.length; i++) {
tmpArray = array[i].toLowerCase();
var charArray = tmpArray.split('');
charArray[0] = charArray[0].toUpperCase();
array2[i] = charArray.join('');

}

var str="";

for (i=0; i<array2.length; i++) {
str+=array2[i].toString();
str+=' ';

}
console.log(str);
return str;

}

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

Here's the link for the code freecodecamp.com/challenges/bonfire-title-case-a-sentence#?solution=function titleCase(str) {%0A %0A var array %3D str.split(' ')%3B%0A var tmpArray%3B%0A var array2%3D[]%3B%0A %0A for (i %3D 0%3B i<array.length%3B i%2B%2B) {%0A tmpArray %3D array[i].toLowerCase()%3B%0A var charArray %3D tmpArray.split('')%3B%0A charArray[0] %3D charArray[0].toUpperCase()%3B%0A array2[i] %3D charArray.join('')%3B%0A %0A }%0A %0A var str%3D""%3B%0A %0A for (i%3D0%3B i<array2.length%3B i%2B%2B) {%0A str%2B%3Darray2[i].toString()%3B%0A str%2B%3D' '%3B%0A %0A }%0A console.log(str)%3B%0A return str%3B%0A %0A}%0A%0AtitleCase("I'm a little tea pot"%2C "")%3B%0A
Jibanprakash
@Jibanprakash
Oct 10 2015 14:53
can any one help me with the Bonfire: Seek and Destroy?
CamperBot
@camperbot
Oct 10 2015 14:53
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:12
Hi all!! I just started the HTML camp with the first challenge of hello World! but i get this message: $ is not defined. i can't enable : Go to my next challenge. what is it about please
CamperBot
@camperbot
Oct 10 2015 15:12

welcome to FreeCodeCamp @salimbouriah!

Salim BOURIAH
@salimbouriah
Oct 10 2015 15:14
Thanks @camperbot
CamperBot
@camperbot
Oct 10 2015 15:14
salimbouriah sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 329 | @camperbot | http://www.freecodecamp.com/camperbot
Sasa
@tanasic
Oct 10 2015 15:14
@salimbouriah there is no $ in HTML
did you understand what is asked of you in that lesson
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:16
It says i have to change "Hello" to "Hello World". I did it and clicked on the button : Run tests
Sasa
@tanasic
Oct 10 2015 15:16
and what did you get ?
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:16
that's where i get the message : $ is not defined
it is not in the HTML code
Sasa
@tanasic
Oct 10 2015 15:17
strange...
try to clear the browser cache/history
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:17
I'm using google chrome
Ah i see, let me try :)
still the same message
Herman Fassett
@HermanFassett
Oct 10 2015 15:22
That's odd
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:22
is there a way to send a screenshot, i can send you to see
Juan Riquelme
@soulchainer
Oct 10 2015 15:23
![alt text](url screenshot)
You can use imgur to upload the image.
Abhishek
@Abhi493
Oct 10 2015 15:23
@salimbouriah find prt sc button on ur keyboard
Juan Riquelme
@soulchainer
Oct 10 2015 15:23
Hi xD.
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:25
blob
sorry for the second picture !! I'm using two screens
blob
Sasa
@tanasic
Oct 10 2015 15:26
that is strange...
im on win10/chrome combo.. and everything is ok
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:26
I tried with firefox and it didn't work
Mistereo
@Mistereo
Oct 10 2015 15:27
@salimbouriah do you have any errors in dev console?
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:28
Sorry I'm new to the field! what's the dev console ? @Mistereo
Juan Riquelme
@soulchainer
Oct 10 2015 15:28
@salimbouriah If you have plugins, like noscript, privacy badger, ublock... try disabling them and reload the site. I think that happens because you are blocking the jQuery script.
So, like you are blocking it, $ doesn't exists.
Mistereo
@Mistereo
Oct 10 2015 15:29
@salimbouriah try ctrl + shift + j in chrome, and then check console tab.
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:31
Mixed Content: The page at 'https://gitter.im/FreeCodeCamp/FreeCodeCamp/~chat#' was loaded over HTTPS, but requested an insecure image 'http://i.imgur.com/SsvbkDH.png'. This content should also be served over HTTPS.
https://dl.dropboxusercontent.com/u/48751994/code.png Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
that's what i get
I'm in China BTW, hope it's not related with the "Great firewall" !!! I use Astrill VPN to access google, youtube,...
Mistereo
@Mistereo
Oct 10 2015 15:32
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:33
clicked on it
Mistereo
@Mistereo
Oct 10 2015 15:34
is it loaded?
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:34
got a page full of code
Mistereo
@Mistereo
Oct 10 2015 15:35
@salimbouriah hmm, have no idea then, also it seems you opened dev console at gitter tab, try to check it in your bonfire tab :)
maybe you can get some useful info from there.
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:36
http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
chai-jquery.js:16 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ chai-jquery.js:16require.register.exports.use @ chai.js:707inspect @ chai-jquery.js:15(anonymous function) @ chai-jquery.js:19
2chai-jquery.js:16 Uncaught ReferenceError: jQuery is not defined
Chiara
@ChiaraCampagnola
Oct 10 2015 15:36
@Mistereo Thank you! That helped a lot
CamperBot
@camperbot
Oct 10 2015 15:36
chiaracampagnola sends brownie points to @mistereo :sparkles: :thumbsup: :sparkles:
:star: 281 | @mistereo | http://www.freecodecamp.com/mistereo
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:43
blob
Abhishek
@Abhi493
Oct 10 2015 15:44
how much time it takes on a avg to complete freeCodeCamp ?
Pravin Kerai
@yamd00t
Oct 10 2015 15:45
@Abhi493 i have the same que to ask!?
Abhishek
@Abhi493
Oct 10 2015 15:46
bol hari , hari bol
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:46
Thanks a lot @Mistereo @soulchainer @tanasic
CamperBot
@camperbot
Oct 10 2015 15:46
salimbouriah sends brownie points to @mistereo and @soulchainer and @tanasic :sparkles: :thumbsup: :sparkles:
:star: 336 | @soulchainer | http://www.freecodecamp.com/soulchainer
:star: 80 | @tanasic | http://www.freecodecamp.com/tanasic
:star: 282 | @mistereo | http://www.freecodecamp.com/mistereo
Abhishek
@Abhi493
Oct 10 2015 15:46
Thanks @salimbouriah @haribol007 @ChiaraCampagnola @Mistereo @soulchainer @tanasic @HermanFassett
CamperBot
@camperbot
Oct 10 2015 15:46
abhi493 sends brownie points to @salimbouriah and @haribol007 and @chiaracampagnola and @mistereo and @soulchainer and @tanasic and @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 7 | @salimbouriah | http://www.freecodecamp.com/salimbouriah
:star: 283 | @mistereo | http://www.freecodecamp.com/mistereo
:star: 346 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
:star: 81 | @tanasic | http://www.freecodecamp.com/tanasic
:star: 164 | @chiaracampagnola | http://www.freecodecamp.com/chiaracampagnola
:star: 337 | @soulchainer | http://www.freecodecamp.com/soulchainer
:star: 174 | @haribol007 | http://www.freecodecamp.com/haribol007
Pravin Kerai
@yamd00t
Oct 10 2015 15:47
Thanks @Abhi493
CamperBot
@camperbot
Oct 10 2015 15:47
haribol007 sends brownie points to @abhi493 :sparkles: :thumbsup: :sparkles:
:star: 210 | @abhi493 | http://www.freecodecamp.com/abhi493
Abhishek
@Abhi493
Oct 10 2015 15:47
hahaha
Hans van Riet
@hansinla
Oct 10 2015 15:48
@fajkovicsasa did you get an answer yet?
Abhishek
@Abhi493
Oct 10 2015 15:48
5 months
on 80hours/week , kill me!
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:51
My problem fixed ! Just connected using VPN and excluded the freecodecamp.com domain. I don't know why but it works now :) thanks @Abhi493 @Mistereo @soulchainer @tanasic
CamperBot
@camperbot
Oct 10 2015 15:51
salimbouriah sends brownie points to @abhi493 and @mistereo and @soulchainer and @tanasic :sparkles: :thumbsup: :sparkles:
:warning: salimbouriah already gave soulchainer points
:warning: salimbouriah already gave mistereo points
:star: 211 | @abhi493 | http://www.freecodecamp.com/abhi493
:warning: salimbouriah already gave tanasic points
Pravin Kerai
@yamd00t
Oct 10 2015 15:51
Weekends, 10 hours/week, 3 years, lezdoit
Abhishek
@Abhi493
Oct 10 2015 15:52
congrats @salimbouriah , keep coding!
VeeShostak
@VeeShostak
Oct 10 2015 15:52
Need a time machine to put in more hours/ week
Abhishek
@Abhi493
Oct 10 2015 15:52
i hope i will do it next 3 months
Salim BOURIAH
@salimbouriah
Oct 10 2015 15:52
I will @Abhi493 :) thanks
CamperBot
@camperbot
Oct 10 2015 15:52
salimbouriah sends brownie points to @abhi493 :sparkles: :thumbsup: :sparkles:
:warning: salimbouriah already gave abhi493 points
Pravin Kerai
@yamd00t
Oct 10 2015 15:53
@randytorres Welcome
Randy Torres
@randytorres
Oct 10 2015 15:57
@Abhi493 I hope to do it within the next 5 months but it seems like a lot of people have gotten a job after doing just 1 non profit project.
Abhishek
@Abhi493
Oct 10 2015 15:59
wow , thanks for that impressive news @randytorres
CamperBot
@camperbot
Oct 10 2015 15:59
abhi493 sends brownie points to @randytorres :sparkles: :thumbsup: :sparkles:
:star: 2 | @randytorres | http://www.freecodecamp.com/randytorres
Abhishek
@Abhi493
Oct 10 2015 15:59
you motivated me
anyone knows the exact use of array.slice() ?
VeeShostak
@VeeShostak
Oct 10 2015 16:01
@Abhi493 The slice() method returns the selected elements in an array, as a new array object. Also this reference is less technical: http://www.w3schools.com/jsref/jsref_slice_array.asp
Abhishek
@Abhi493
Oct 10 2015 16:02
if i say arry2 = arr1.slice(1);
i got it thanks @VeeShostak
CamperBot
@camperbot
Oct 10 2015 16:04
abhi493 sends brownie points to @veeshostak :sparkles: :thumbsup: :sparkles:
:star: 185 | @veeshostak | http://www.freecodecamp.com/veeshostak
VeeShostak
@VeeShostak
Oct 10 2015 16:04
arry2 returns arr1 starting from index 1
yeah, the examples on there make it easier to understand
Abhishek
@Abhi493
Oct 10 2015 16:05
very true
Europaradise
@europaradise
Oct 10 2015 16:13
This message was deleted
Bob Moree
@bmoree
Oct 10 2015 16:18
Hi, I'm stuck on where art thou, I think, there's something wrong with line 11. Would you guys take a look plz :D
function where(collection, source) {
  var arr = [];

  // for each obj in collection
  for(var obj of collection) {
    //if it has the property in the object
    if(obj.hasOwnProperty(Object.keys(source)) === true) {
      // if the prop has the same val
      if(source[key] === obj[key]) {
        //push the object to arr
        arr.push(obj);
      }
    }
  }
  return arr;
}

where([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 16:18
can someone expail me what does "gi" means in reg exp.
var reg = /ab+c/gi;
Bob Moree
@bmoree
Oct 10 2015 16:19
@JohneyCodeUp check the entire string and don't be case sensitive, i think..
VeeShostak
@VeeShostak
Oct 10 2015 16:19
@JohneyCodeUp g: Perform a global match (find all matches rather than stopping after the first match). and the i: for case- insensitive search
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 16:19
@bmoree that's what i was thinking. Thanks :D
CamperBot
@camperbot
Oct 10 2015 16:19
johneycodeup sends brownie points to @bmoree :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for bmoree
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 16:20
@VeeShostak thank you
CamperBot
@camperbot
Oct 10 2015 16:20
johneycodeup sends brownie points to @veeshostak :sparkles: :thumbsup: :sparkles:
:star: 186 | @veeshostak | http://www.freecodecamp.com/veeshostak
Simon Frost
@Simon-Frost
Oct 10 2015 16:48
Hi all, right im a little stuck on this: Waypoint: Use a CSS Class to Style an Element . All i need to do is have this: Your h2 element should have the class red-text.

...<style>
h2 {
color: red;
}
</style>

<h2>CatPhotoApp</h2>

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

Bob Moree
@bmoree
Oct 10 2015 16:50
@Simon-Frost to give an html element a class you just do this. for example giving a p tag a class:
<p class="class-name"></p>
Sasa
@tanasic
Oct 10 2015 16:50
@Simon-Frost do you know how to apply class to element ?
Henrique Cansela
@henriquetsc
Oct 10 2015 16:51
@Simon-Frost you need to create a classe called "red-text", then apply it to your element!
class*
Just like @bmoree example =]
EngineeredEdge
@EngineeredEdge
Oct 10 2015 16:52
@Simon-Frost , do you know where to declare a styling class? Do you know how to add a class to your element?
Simon Frost
@Simon-Frost
Oct 10 2015 16:52
@bmoree @tanasic @henriquetsc thanks ill have a look and try
CamperBot
@camperbot
Oct 10 2015 16:52
simon-frost sends brownie points to @bmoree and @tanasic and @henriquetsc :sparkles: :thumbsup: :sparkles:
:star: 84 | @tanasic | http://www.freecodecamp.com/tanasic
:star: 74 | @henriquetsc | http://www.freecodecamp.com/henriquetsc
:star: 194 | @bmoree | http://www.freecodecamp.com/bmoree
Sasa
@tanasic
Oct 10 2015 16:52
@Simon-Frost no problem man..
Henrique Cansela
@henriquetsc
Oct 10 2015 16:53
@Simon-Frost glad to help =]
Bob Moree
@bmoree
Oct 10 2015 16:53
@Simon-Frost np :-)
Simon Frost
@Simon-Frost
Oct 10 2015 16:58
not really helping me
I need to have class instead of stlye

<style>
h2 {
color: red;
}
</style>

<h2>CatPhotoApp</h2>

Im not seeming to unerstand the instructions, everything up to here were pretty straight foward
Henrique Cansela
@henriquetsc
Oct 10 2015 16:59
in the style, instead of h2, you should have .red-text
Rex Schrader
@SaintPeter
Oct 10 2015 16:59
@Simon-Frost A class is defined with a . (dot) in front of the name. Like:
.someClass {
 /* attributes here */
}
Henrique Cansela
@henriquetsc
Oct 10 2015 16:59
@Simon-Frost then, you must add the attribute class="red-text", to your h2 element
Rex Schrader
@SaintPeter
Oct 10 2015 17:00
@henriquetsc Try not to just give answers. Show how it works, but not the exact thing that needs to happen - they need to learn it themselves.
Henrique Cansela
@henriquetsc
Oct 10 2015 17:01
@SaintPeter i am sorry, i realize that only after i answered...
Rex Schrader
@SaintPeter
Oct 10 2015 17:02
@henriquetsc It's all good :D - at least you're here, helping out. Can't fault you for that.
Henrique Cansela
@henriquetsc
Oct 10 2015 17:02
@SaintPeter i need to improve my helping skills, thanks for the warning :]
CamperBot
@camperbot
Oct 10 2015 17:02
henriquetsc sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 947 | @saintpeter | http://www.freecodecamp.com/saintpeter
Aditya Subramanian
@adityas71094
Oct 10 2015 17:02
Hey can some one tell me why my html page not work when I put a space between 'action' and '=' in the from tag??
Rex Schrader
@SaintPeter
Oct 10 2015 17:02
@adityas71094 form or from?
Aditya Subramanian
@adityas71094
Oct 10 2015 17:02

form

Hugo
@hugoender
Oct 10 2015 17:03
LMAO
Aditya Subramanian
@adityas71094
Oct 10 2015 17:03
HAHA
Hugo
@hugoender
Oct 10 2015 17:03
@SaintPeter he told you!
Aditya Subramanian
@adityas71094
Oct 10 2015 17:03
no it does not work when I put FORM
Henrique Cansela
@henriquetsc
Oct 10 2015 17:03
lmfao
Rex Schrader
@SaintPeter
Oct 10 2015 17:04
@adityas71094 Haha - so when you say "Does not work", what doesn't work?
Hugo
@hugoender
Oct 10 2015 17:04
@adityas71094 it would help if you pasted your code in here so we can take a look… maybe spot something you havent seen
;)
Rex Schrader
@SaintPeter
Oct 10 2015 17:04
@adityas71094 The form submission?
Aditya Subramanian
@adityas71094
Oct 10 2015 17:05
<form action = "/submit-cat-photo">
but it works when I write <form action= "/submit-cat-photo">
Hugo
@hugoender
Oct 10 2015 17:06
@adityas71094 which waypoint are you on?
want to give it a try and see
Aditya Subramanian
@adityas71094
Oct 10 2015 17:06
@hugoender create a form element
@SaintPeter I dont get the tick when I put a space in between
Kellum
@Kellum
Oct 10 2015 17:07
Good day everyone! I need some assistance with if/else waypoint with JS
Rex Schrader
@SaintPeter
Oct 10 2015 17:07
@adityas71094 Let me take a look at the test code. One moment.
Hugo
@hugoender
Oct 10 2015 17:08
@adityas71094 you are right
Aditya Subramanian
@adityas71094
Oct 10 2015 17:08
@SaintPeter If i just remove space it works...but why??
Hugo
@hugoender
Oct 10 2015 17:08
you should submit this as a bug
Aditya Subramanian
@adityas71094
Oct 10 2015 17:08
@hugoender see I told you guy...
Hugo
@hugoender
Oct 10 2015 17:08
@adityas71094 i think i ran into the same problem when i did that waypoint but forgot to submit bug
Rex Schrader
@SaintPeter
Oct 10 2015 17:09
I'm looking at the tests right now
Aditya Subramanian
@adityas71094
Oct 10 2015 17:09
@hugoender @SaintPeter Not so funny now....
Hugo
@hugoender
Oct 10 2015 17:09
@adityas71094 oh you told me! ;)
Rex Schrader
@SaintPeter
Oct 10 2015 17:09
It's not obvious to me why it's not working
@adityas71094 Which of the 3 tests fails?
Hugo
@hugoender
Oct 10 2015 17:09
@adityas71094 i was laughing at your bold statement :)
Aditya Subramanian
@adityas71094
Oct 10 2015 17:09
@hugoender @SaintPeter html against readable code???
@SaintPeter the second one
Hugo
@hugoender
Oct 10 2015 17:10
@SaintPeter the second test is the one that fails for me when i put the space
DTing
@dting
Oct 10 2015 17:10
assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\", 'Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>.')
Aditya Subramanian
@adityas71094
Oct 10 2015 17:10
@SaintPeter Make sure your form has an action attribute which is set to /submit-cat-photo.
Rex Schrader
@SaintPeter
Oct 10 2015 17:10

@adityas71094 I'm looking at the raw assertions:

assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\"

It's not clear to me at all why that should not work.

Hugo
@hugoender
Oct 10 2015 17:11
@adityas71094 key take away here is that it’s okay to put a space inbetween. It should not adversely affect code. The test just seems to be wonky
Rex Schrader
@SaintPeter
Oct 10 2015 17:11
@adityas71094 Let me make a codepen really quickly to test it "in the real world"
Aditya Subramanian
@adityas71094
Oct 10 2015 17:11
@hugoender i was actually used it as a hash symbol, but it used it as a markdown!!!
Hugo
@hugoender
Oct 10 2015 17:12
@SaintPeter @dting @adityas71094 so it seems as though putting the space after the = is okay
but if you put the space before
its not
in this test
Aditya Subramanian
@adityas71094
Oct 10 2015 17:13
@hugoender yea exactly
Hugo
@hugoender
Oct 10 2015 17:14
@adityas71094 im tellin ya bro… submit that bug report!
Rex Schrader
@SaintPeter
Oct 10 2015 17:14
@adityas71094 I am trying it in Codepen and it works fine
I can't see why it fails in that waypoint
OH OH OH
There is an XSS error on this page
Aditya Subramanian
@adityas71094
Oct 10 2015 17:15
@hugoender cool ..i'll do that
Hugo
@hugoender
Oct 10 2015 17:15
@SaintPeter wtf is that
hugoender @hugoender sits down on floor indian style ready for lecture
Rex Schrader
@SaintPeter
Oct 10 2015 17:16
blob
Aditya Subramanian
@adityas71094
Oct 10 2015 17:16
@hugoender I'll join the class
hugoender @hugoender still confused after looking at that picture
Hugo
@hugoender
Oct 10 2015 17:17
@SaintPeter why is this assert different from the other asserts and why does it break with the space
?
Rex Schrader
@SaintPeter
Oct 10 2015 17:17
@hugoender chill, it's complicated
@hugoender lemme explain
hugoender @hugoender listens intently
hugoender @hugoender is procrastinating on his pomodoro clock zipline
Rex Schrader
@SaintPeter
Oct 10 2015 17:18
It's a security feature. . . . Chrome is looking at the data coming in on the URL. With the new version of the site, your solutions are encoded on the URL. When Chrome sees a form element coming in on the URL AND THEN sees it on the page, it freaks out. It assumes that someone is making a Cross Site Scripting (XSS) attack on the page.
Because, normally, form elements should not be passed in on the URL
hugoender @hugoender raises hand
Rex Schrader
@SaintPeter
Oct 10 2015 17:19
I know that @BerkeleyTrue submitted a fix for this a day or two ago, since it was breaking the site on other things, but it looks like it was not general enough of a fix.
SaintPeter @SaintPeter calls on @hugoender
Hugo
@hugoender
Oct 10 2015 17:19
@SaintPeter but wouldn’t this mean that it should freak out all the time and not just when there is a space on the left side?
Mistereo @Mistereo test
Aditya Subramanian
@adityas71094
Oct 10 2015 17:20
@SaintPeter @hugoender my thoughts exactly
Rex Schrader
@SaintPeter
Oct 10 2015 17:20
@hugoender Right after the release it WAS freaking out everywhere there was a form element. There was a fix pushed out, but it looks like it didn't fix it completely.
Berkeley Martinez
@BerkeleyTrue
Oct 10 2015 17:20
Which challenge is this?
Rex Schrader
@SaintPeter
Oct 10 2015 17:20
@adityas71094 @hugoender The fix is a bit complicated. What they FCC site does is replace all instances of the word form with a placeholder when the data is saved.
Hugo
@hugoender
Oct 10 2015 17:20
@BerkeleyTrue Waypoint: Create a Form Element
Rex Schrader
@SaintPeter
Oct 10 2015 17:21
@BerkeleyTrue Sample Error Condition
@BerkeleyTrue If you have spaces before the = in action="/submit-cat-photo" it give an XSS error.
@BerkeleyTrue Same as the issue before
Kellum
@Kellum
Oct 10 2015 17:22
This message was deleted
CamperBot
@camperbot
Oct 10 2015 17:22
:bulb: to format code use backticks! ``` more info
Berkeley Martinez
@BerkeleyTrue
Oct 10 2015 17:22
yeah, regex
Rex Schrader
@SaintPeter
Oct 10 2015 17:23
@BerkeleyTrue so, /action\s*=\s*/?
Mike G.
@mgraham134
Oct 10 2015 17:23
Anyone available for a JS question?
Hugo
@hugoender
Oct 10 2015 17:24
@mgraham134 everyone is available…shoot
SaintPeter @SaintPeter pushes in front of @hugoender "Me Me ME! Pick me!"
Hugo
@hugoender
Oct 10 2015 17:24
lol
Mike G.
@mgraham134
Oct 10 2015 17:24
@hugoender @SaintPeter ```
Hugo
@hugoender
Oct 10 2015 17:24
@SaintPeter your answers are always more elaborate than mine so i always send them first ;)
Simon Frost
@Simon-Frost
Oct 10 2015 17:24
@SaintPeter im still struggling
Hugo
@hugoender
Oct 10 2015 17:25
@Simon-Frost arent we all
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 17:25
hey good people. Does web sites search using regular expressions but on a server side? Just curious how does the basic search work? Not talking about google search. :D
Mike G.
@mgraham134
Oct 10 2015 17:25
I'm trying to enter the code @hugoender @SaintPeter
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 17:26
@SaintPeter any tips? :D
Hugo
@hugoender
Oct 10 2015 17:26
@mgraham134 help format
help format
CamperBot
@camperbot
Oct 10 2015 17:26

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

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

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

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

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

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

Rex Schrader
@SaintPeter
Oct 10 2015 17:27
@JohneyCodeUp You mean on the browser? I think it's just basic string search. It may use regexp under the hood, but I don't think that's exposed to the user.
@Simon-Frost What's the trouble?
Mike G.
@mgraham134
Oct 10 2015 17:27
if (age is less than 13) {
    console.log("You can play but we take no responsibility.");
} else {
    console.log("Have fun and enjoy this game!");
}
@hugoender @SaintPeter What in the world is wrong with it?
Rex Schrader
@SaintPeter
Oct 10 2015 17:27
@mgraham134 You need to use math symbols. IE: x < y or z > j
Mike G.
@mgraham134
Oct 10 2015 17:28
aha!
Hugo
@hugoender
Oct 10 2015 17:28
@mgraham134 ummm instead of is less than you need to use the logical operator symbols as outlined here: http://www.w3schools.com/js/js_comparisons.asp
Mike G.
@mgraham134
Oct 10 2015 17:28
I was starting to pull hair out haha
Rex Schrader
@SaintPeter
Oct 10 2015 17:28
@mgraham134 While there are some programming languages which use natural language processing, Javascript is not one of them.
Mike G.
@mgraham134
Oct 10 2015 17:28
@SaintPeter @hugoender Making a note of it
Hugo
@hugoender
Oct 10 2015 17:28
@mgraham134 think math!
Mike G.
@mgraham134
Oct 10 2015 17:29
And it works, guys.
Hugo
@hugoender
Oct 10 2015 17:29
@mgraham134 did you doubt us!?
Nikola Mitić
@JohneyCodeUp
Oct 10 2015 17:29
@SaintPeter I'm just trying to find real life example of .search method. :D
Hugo
@hugoender
Oct 10 2015 17:29
;)
Mike G.
@mgraham134
Oct 10 2015 17:29
@hugoender @SaintPeter hahahahaha not at all
@hugoender @SaintPeter Thanks!
CamperBot
@camperbot
Oct 10 2015 17:30
mgraham134 sends brownie points to @hugoender and @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 949 | @saintpeter | http://www.freecodecamp.com/saintpeter
:star: 256 | @hugoender | http://www.freecodecamp.com/hugoender
hugoender @hugoender looks at @SaintPeter’s brownie points and walks away… head down
@hugoender Now now, dude, it's not a zero sum game.
Aditya Subramanian
@adityas71094
Oct 10 2015 17:31
@SaintPeter @hugoender Thanks for helping me out.
CamperBot
@camperbot
Oct 10 2015 17:31
adityas71094 sends brownie points to @saintpeter and @hugoender :sparkles: :thumbsup: :sparkles:
:star: 257 | @hugoender | http://www.freecodecamp.com/hugoender
:star: 950 | @saintpeter | http://www.freecodecamp.com/saintpeter
Kellum
@Kellum
Oct 10 2015 17:31
Hey guys, I'm having trouble with understanding if/else statements and returns. I've been running through this stuff and now I'm at a loss. Any help would be greatly appreciated!
 var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;
function myFunction(){
  // Create an if-else statement here to return "heads" if flip is 0. Otherwise return "tails".

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

  return true;

} else {
    return false;
  }

  // Only change code above this line.
}
Hugo
@hugoender
Oct 10 2015 17:31
@hugoender lol not zero sum but it is a competition!
@Kellum the if statement will always be false because 0 will never be === to 1
Rex Schrader
@SaintPeter
Oct 10 2015 17:32
@Kellum Well, you need to change this to a test of flip
if (0 === 1) {
Hugo
@hugoender
Oct 10 2015 17:32
@Kellum you need the if statement to compare a variable of some sort
Kellum
@Kellum
Oct 10 2015 17:32
Soooo (1 === 2)
?
Hugo
@hugoender
Oct 10 2015 17:32
@Kellum 1 will never be === 2
Rex Schrader
@SaintPeter
Oct 10 2015 17:32
@Kellum Do you know what a variable is?
@Kellum And, more specifically, can you find the variable in the code?
Kellum
@Kellum
Oct 10 2015 17:33
Stored data, right? I think I have the math operators wrong.
Hugo
@hugoender
Oct 10 2015 17:33
@Kellum for the sake of brevity let’s say === means “equal to”… so 1 will never equal 2 because 1 is 1 and 2 is 2.
@Kellum so you need to compare the flip value to 1
or 0
Berkeley Martinez
@BerkeleyTrue
Oct 10 2015 17:34
@SaintPeter /action\s*=
Hugo
@hugoender
Oct 10 2015 17:34
alright need to pick up food… you’re in good hands with @SaintPeter
Aditya Subramanian
@adityas71094
Oct 10 2015 17:34
@Kellum things like 1, 2, 1.5 are constants and when we store these constants in some placeholder , the place holders are called variables
Hugo
@hugoender
Oct 10 2015 17:35
and @adityas71094
:)
Aditya Subramanian
@adityas71094
Oct 10 2015 17:35
@hugoender haha
Kellum
@Kellum
Oct 10 2015 17:36
So
Aditya Subramanian
@adityas71094
Oct 10 2015 17:36
@Kellum is 1 === 1, but 0 can never be === to 1
@Kellum variable === 1 will be true if variable is placeholder which has the value 1 stored in it.
Simon Frost
@Simon-Frost
Oct 10 2015 17:39
<.red-text class="red-text">CatPhotoApp</.red-text>
Kellum
@Kellum
Oct 10 2015 17:39
Got that part, I think I'm having issues with how the code is layed out for this lesson. I understand varibles and their purpose in JS but this waypoint threw me off for some reason. It's like my brain broke down temporarily.
Rex Schrader
@SaintPeter
Oct 10 2015 17:40
@Simon-Frost Wow, ok, nope. You've got the class correct, but you don't need to change you h2 elements.
Aditya Subramanian
@adityas71094
Oct 10 2015 17:41
@Kellum it happens..just keep at it
Rex Schrader
@SaintPeter
Oct 10 2015 17:42
@Simon-Frost Swap back out your <.red-text with <h2
Bob Moree
@bmoree
Oct 10 2015 17:43
@SaintPeter stuck on where art thou bonfire, would you mind taking a look?
Henrique Cansela
@henriquetsc
Oct 10 2015 17:44
Clayton
@cjg040103
Oct 10 2015 17:44
Hello everyone! I need help with the mutations bonfire. Here is my code so far. what do I need to do?
function mutation(arr) {
  var a = arr[1].toUpperCase();
  var b = a.split('');
  var c = arr[0].toUpperCase();
  var d = c.split('');
  var e = d.indexOf(b, [0]);
  if(e === arr[1].length) {
    return true;
  } else {
    return false;
  }
}

mutation(["hello", "hey"], "");
Rex Schrader
@SaintPeter
Oct 10 2015 17:44
@bmoree Sure, lay it on me.
Kellum
@Kellum
Oct 10 2015 17:45
Annnnnnnnnnnnd I think I just figured it out. It just took me a while to get it. Thanks for bearing with my moment of slowness.
var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;
function myFunction(){

if (flip === 0) {
  return "heads";
} else {
    return "tails";
  }
}
CamperBot
@camperbot
Oct 10 2015 17:45
if you want to thank someone, put an @ before their name!
Simon Frost
@Simon-Frost
Oct 10 2015 17:45
@SaintPeter @henriquetsc thanks
CamperBot
@camperbot
Oct 10 2015 17:45
simon-frost sends brownie points to @saintpeter and @henriquetsc :sparkles: :thumbsup: :sparkles:
:warning: simon-frost already gave henriquetsc points
:star: 951 | @saintpeter | http://www.freecodecamp.com/saintpeter
Aditya Subramanian
@adityas71094
Oct 10 2015 17:45
@Kellum good job
Bob Moree
@bmoree
Oct 10 2015 17:45
I know I should've probably figured it out by now, but why is {"a":1} still in this answer, shouldn't the second property have set my putIn variable to false??
  function where(collection, source) {
  var arr = [];
  var keys = Object.keys(source);
  // for each obj in collection
  for(var i=0; i < collection.length;i++) {
    var obj = collection[i];
    var putIn = null;
    // for all props in source
    for(j=0; j < keys.length ; j++) {
      var key = keys[j];
      // if  it has the property
      if(obj.hasOwnProperty(key)) {
        if(obj[key] === source[key]) {
          //push the object to arr
          putIn = true;
        } else { putIn = false; }
      }
    }
    if(putIn === true && arr.indexOf(obj) === -1) {
      arr.push(obj);
    }
  }
  return arr;
}

where([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });
Rex Schrader
@SaintPeter
Oct 10 2015 17:45
@cjg040103 You need to compare the contents of the first array with the second. The length is not really sufficient. You can loop through one or both of the arrays and/or use something like indexOf to search one for the other.
Clayton
@cjg040103
Oct 10 2015 17:46
1 sec i gots an idea. by the way, good 2 c u again.
Kellum
@Kellum
Oct 10 2015 17:46
thank you @adityas71094 @hugoender @SaintPeter
CamperBot
@camperbot
Oct 10 2015 17:46
kellum sends brownie points to @adityas71094 and @hugoender and @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 953 | @saintpeter | http://www.freecodecamp.com/saintpeter
:star: 37 | @adityas71094 | http://www.freecodecamp.com/adityas71094
:star: 258 | @hugoender | http://www.freecodecamp.com/hugoender
Rex Schrader
@SaintPeter
Oct 10 2015 17:47
@bmoree What if if(obj.hasOwnProperty(key)) { is false?
Bob Moree
@bmoree
Oct 10 2015 17:47
@SaintPeter sorry brb...
Abhishek
@Abhi493
Oct 10 2015 17:48
HI ! , m going to do the pomodoro clock but i cant figure out how to do it.
Rex Schrader
@SaintPeter
Oct 10 2015 17:51
@Abhi493 Maybe ask in the /HelpZiplines room?
wiki help rooms
CamperBot
@camperbot
Oct 10 2015 17:51

:point_right: help rooms [wiki]

There are official help rooms for each major section of FCC content:

Chat Room Description
Help get help with our Waypoint challenges from your fellow campers
HelpBonfires get help with our Bonfire challenges from your fellow campers
HelpZiplines get help with our Zipline challenges from your fellow campers
HelpBasejumps get help with our Basejump challenges from your fellow campers
NonprofitProjects get help with your Nonprofit Projects from your fellow campers
CodeReview get constructive criticism and advice on finished code from your fellow campers
YouCanDoThis learning to code is hard - share your feelings and get moral support here

Choose the right room for your question!
:pencil: read more about help rooms on the FCC Wiki

Abhishek
@Abhi493
Oct 10 2015 17:51
helpZiplines
Clayton
@cjg040103
Oct 10 2015 17:51
Alright, I've got this figured out. Now I just need to figure out how to run through each word and see if all of the letters of the second word are in the first. Any ideas?
function mutation(arr) {
  var a = arr[1];
  var b = arr[2];
  var c = a.split('');
  var d = b.split('');

mutation(["hello", "hey"], "");
1 min
Rex Schrader
@SaintPeter
Oct 10 2015 17:52
@cjg040103 You're at bare minimum going to need at least one loop and I suggest using the indexOf function.
Clayton
@cjg040103
Oct 10 2015 17:54
k
Rex Schrader
@SaintPeter
Oct 10 2015 17:54
@cjg040103 Remember what you're doing: Seeing if everythign in the first string is in the second (or maybe vica versa)
@cjg040103 You can't just say "Does this string contain everything that string does", you need to check each character.
Clayton
@cjg040103
Oct 10 2015 17:56
Now what do you think I should do?
function mutation(arr) {
  var a = arr[1];
  var b = arr[2];
  var c = a.split('');
  var d = b.split('');
  for(var i = 0; i < c.length(); i++) {
    var e = c.indexOf(d [0]);
  }


mutation(["hello", "hey"], "");
I know I need an if/then in there somewhere but I don't know how to use it in this particular challenge. What would it look like?
Rex Schrader
@SaintPeter
Oct 10 2015 18:01
@cjg040103 Well, you need to test your e variable somehow. What are the two conditions? When will your function need to return true, when will it need to return false?
Simon Frost
@Simon-Frost
Oct 10 2015 18:02
@henriquetsc many thanks for your help but its not helping me. Im done
CamperBot
@camperbot
Oct 10 2015 18:02
simon-frost sends brownie points to @henriquetsc :sparkles: :thumbsup: :sparkles:
:star: 98 | @henriquetsc | http://www.freecodecamp.com/henriquetsc
Clayton
@cjg040103
Oct 10 2015 18:03
Yes, but I need to know how to use e in the if/then element. With that knowledge I will be extremely close to finishing. @SaintPeter
Henrique Cansela
@henriquetsc
Oct 10 2015 18:03
@Simon-Frost don't give up yet. Show us you code, so we can take a look
Rex Schrader
@SaintPeter
Oct 10 2015 18:03
@cjg040103 Well, take a look at what indexOf returns?
Clayton
@cjg040103
Oct 10 2015 18:03
Okay.
I'm lost.
This is the hardest bonfire I've ever done.
I've been stuck on this for a month.
Clayton
@cjg040103
Oct 10 2015 18:09
got 2 go. l8r
Henrique Cansela
@henriquetsc
Oct 10 2015 18:09
Bye people! Good coding! Thanks for all.
CamperBot
@camperbot
Oct 10 2015 18:09
if you want to thank someone, put an @ before their name!
Mike G.
@mgraham134
Oct 10 2015 18:19
@SaintPeter Do you have anything that helps with syntax? I keep dealing with it.
Rex Schrader
@SaintPeter
Oct 10 2015 18:20
@mgraham134 For bonfires? Or just in general?
Mike G.
@mgraham134
Oct 10 2015 18:20
in general. I hate when I feel like theres no issue but I keep getting syntax errors.
Rex Schrader
@SaintPeter
Oct 10 2015 18:20
Well . . . that's kinda the hard part :D
There are tools called "Linters" which can check your code as you go
The FCC site has some built in
so does: http://repl.it
Mike G.
@mgraham134
Oct 10 2015 18:21
unexpected token ILLEGAL
Rex Schrader
@SaintPeter
Oct 10 2015 18:21
Haha, yeah
In general, you need to make sure you have commas in the right places
semicolons at the ends
and closing your brackes/parentheses in all the right places
Dustin Baker
@DustinBaker22
Oct 10 2015 18:22
@mgraham134 Well if you understand the Sublime Text Editor then you can download the Linter plugin, implement your code, and it shows you any syntax errors... That is what I do from time to time if I'm coming across any issues....
Rex Schrader
@SaintPeter
Oct 10 2015 18:22
Syntax highlighting can also help
Mike G.
@mgraham134
Oct 10 2015 18:22
@SaintPeter @DustinBaker22 yeah I really need to study syntax thoroughly
Just opened repl.it and it's awesome
Rex Schrader
@SaintPeter
Oct 10 2015 18:23
@mgraham134 Atom also has a linter plugin
@mgraham134 I developed all of my Bonfires on repl.it. It's great!
Mike G.
@mgraham134
Oct 10 2015 18:23
favoriting the site now
@DustinBaker22 sublime sounds familiar
Dustin Baker
@DustinBaker22
Oct 10 2015 18:25
repl.it is a great tool
Rex Schrader
@SaintPeter
Oct 10 2015 18:25
@mgraham134 Sublime is probaly the most popular "pure text" text editor out there. It's just shy of an IDE. Atom is an open source upstart from GitHub. It's got probably 95% of the features, only free and open source.
Mike G.
@mgraham134
Oct 10 2015 18:26
@DustinBaker22 @SaintPeter sweet
Jesse
@jctm30
Oct 10 2015 18:27
bf Roman Numeral Converter
CamperBot
@camperbot
Oct 10 2015 18:27

:fire:Bonfire: Roman Numeral Converter :link:

function convert(num) {
 return num;
}

convert(36);

Convert the given number into a roman numeral.

more info:  bf details | bf links | hint

Jesse
@jctm30
Oct 10 2015 18:27
bf details
CamperBot
@camperbot
Oct 10 2015 18:27

:fire:Bonfire: Roman Numeral Converter :link:

function convert(num) {
 return num;
}

convert(36);
Convert the given number into a roman numeral.
All <a href="http://www.mathsisfun.com/roman-numerals.html">roman numerals</a> answers should be provided in upper-case.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
Jesse
@jctm30
Oct 10 2015 18:27
hint
CamperBot
@camperbot
Oct 10 2015 18:27
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Mike G.
@mgraham134
Oct 10 2015 18:28
@SaintPeter @DustinBaker22 Thanks for the sites, fellas! I appreciate the tools.
CamperBot
@camperbot
Oct 10 2015 18:28
mgraham134 sends brownie points to @saintpeter and @dustinbaker22 :sparkles: :thumbsup: :sparkles:
:warning: mgraham134 already gave saintpeter points
:star: 109 | @dustinbaker22 | http://www.freecodecamp.com/dustinbaker22
fiercenomad
@fiercenomad
Oct 10 2015 18:30
bug.PNG
any insight on why this won't validate?
produces the expected result for every example, so far as I can tell ... can copy paste code here if anyone would like to try on theirs
Rex Schrader
@SaintPeter
Oct 10 2015 18:35
@fiercenomad Are you sure abouti < arguements.length - 1`?
@fiercenomad Remove the "" argument from the sample call
fiercenomad
@fiercenomad
Oct 10 2015 18:36
yeah that's why i had it ... don't have a great understanding of how the test cases are imported in
DTing
@dting
Oct 10 2015 18:36
bf destroy
CamperBot
@camperbot
Oct 10 2015 18:36

:fire:Bonfire: Seek and Destroy :link:

function destroyer(arr) {
  // Remove all the values
  return arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.

more info:  bf details | bf links | hint

fiercenomad
@fiercenomad
Oct 10 2015 18:36
makes sense -- it will not exist for subsequent cases i guess
DTing
@dting
Oct 10 2015 18:37
Screen Shot 2015-10-10 at 11.36.48 AM.png
that shows you what your function is called with
fiercenomad
@fiercenomad
Oct 10 2015 18:37
beautiful, thanks guys
CamperBot
@camperbot
Oct 10 2015 18:37
if you want to thank someone, put an @ before their name!
Rex Schrader
@SaintPeter
Oct 10 2015 18:37
@fiercenomad 99% sure that none of the rest of the test cases have the empty string
@fiercenomad np
Jesse
@jctm30
Oct 10 2015 18:41
can someone help me on Bonfire: Roman Numeral Converter? how should i start this
CamperBot
@camperbot
Oct 10 2015 18:41
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Mike G.
@mgraham134
Oct 10 2015 18:48
@SaintPeter You ever had an issue with your sessions not saving on repl.it?
@SaintPeter Disregard. After I logged back in they are there.
Joseph Botros
@josephwasily
Oct 10 2015 18:51
I got question, i created a form inside a bootstrap html page, but i didn't add "form-control" class to any of the input elements, when i click on the submit button the bootstrap warning element popup, how bootstrap injected itself to the page?
:worried:
Mike G.
@mgraham134
Oct 10 2015 18:56
Are you doing the bootstrap lessons?
Which lesson is it exactly?
Joseph Botros
@josephwasily
Oct 10 2015 19:00
Responsive Design with Bootstrap
Mike G.
@mgraham134
Oct 10 2015 19:03
@josephwasily Right. If you notice in the directions, they mention that bootstrap has already been added behind the scenes.
Otherwise, they give you the code to use so you know how to add it manually when you need to.
Ling Li
@ling18
Oct 10 2015 19:05
hi could anyone help with the " Bonfire: Factorialize a Number"? i am kinda stuck, i know what Factorial number means but not sure how to apply to this function, thanks!
Rex Schrader
@SaintPeter
Oct 10 2015 19:06
@ling18 ok, sure
@ling18 Show me the expanded mathematical expression for 5!
Joseph Botros
@josephwasily
Oct 10 2015 19:08
@mgraham134 Thanks
CamperBot
@camperbot
Oct 10 2015 19:08
josephwasily sends brownie points to @mgraham134 :sparkles: :thumbsup: :sparkles:
:star: 154 | @mgraham134 | http://www.freecodecamp.com/mgraham134
Ling Li
@ling18
Oct 10 2015 19:08
5! = 54321
sorry, one sec
Rex Schrader
@SaintPeter
Oct 10 2015 19:08
@ling18 If you use backticks ` it formats your code
wiki format
CamperBot
@camperbot
Oct 10 2015 19:08

:point_right: code formatting [wiki]

Inline code

alt text

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

Code Block

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

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

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

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

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

Ling Li
@ling18
Oct 10 2015 19:08
5! = 5 4 3 2 1
Rex Schrader
@SaintPeter
Oct 10 2015 19:09
I know what you mean
Ling Li
@ling18
Oct 10 2015 19:09
5! times 4 times 3 times 2 time 1
lol
thanks
CamperBot
@camperbot
Oct 10 2015 19:09
if you want to thank someone, put an @ before their name!
Ling Li
@ling18
Oct 10 2015 19:09