These are chat archives for FreeCodeCamp/Help

15th
Nov 2015
Clayton
@cjg040103
Nov 15 2015 00:03
What do you need help with?
Joanne D
@codebyjo
Nov 15 2015 00:06
To be honest, I have no idea what the question is even asking. If var myCar = new Car(); then does myCar.wheels = "4"? And where does the property nickname fit into all this?
Clayton
@cjg040103
Nov 15 2015 00:06
Basically, it wants you to make myCar = new Car and then assign it a property called "nickname" and assign it a string value.
This message was deleted
This message was deleted
This message was deleted
mariocatch
@mariocatch
Nov 15 2015 00:07
@codebyjo objects in javascript can have properties added to them at any time by using the . (dot) operator.
Clayton
@cjg040103
Nov 15 2015 00:08
var Car = function() {
  this.wheels = 4;
  this.engines = 1;
  this.seats = 1;
};

// Only change code below this line.

var myCar = new Car();
myCar.nickname = "Fudge";
mariocatch
@mariocatch
Nov 15 2015 00:08
@codebyjo so if you have an object, let's say var myCar = new Car();, then you can create new properties on the fly by doing things like, myCar.newProperty = "Hello, World";
Clayton
@cjg040103
Nov 15 2015 00:09
@codebyjo That is what I did just now. Try it and tell me if you understand.
Joanne D
@codebyjo
Nov 15 2015 00:09
Okay thanks!
mariocatch
@mariocatch
Nov 15 2015 00:09
@cjg040103 in lieu of giving away answers, try explaining the purpose behind the process as well. people won't learn in the long run if they're handed the answer :)
Joanne D
@codebyjo
Nov 15 2015 00:10
I had the opened the brackets instead and that's why it wasn't working.
And was trying to make wheels = 4 as well (which wasn't necessary).
Clayton
@cjg040103
Nov 15 2015 00:13
That's okay. You're not the only one who makes mistakes. I remember one time I kept failing because I didn't have a semicolon where there was supposed to be.
Joanne D
@codebyjo
Nov 15 2015 00:18
Haha. That's the worst!
Ethan Leyden
@Darksmurf
Nov 15 2015 00:44
I'm stuck on where art thou
  var keys = Object.keys(source);
  for(var element in collection){
    for(var key in keys){
      if(collection[element].hasOwnProperty(key)){
        arr.push(collection[element]);
      }
    }
  }
mariocatch
@mariocatch
Nov 15 2015 00:52
@Darksmurf what question do you have?
bf where art thou
CamperBot
@camperbot
Nov 15 2015 00:53

:fire:Bonfire: Where art thou :link:

function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });

Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument).

more info:  bf details | bf links | hint

Ethan Leyden
@Darksmurf
Nov 15 2015 00:53
um, lets start with, what exactly does Object.keys do, I tried reading the documentation on mdn, but I still dont understand
mariocatch
@mariocatch
Nov 15 2015 00:54
given a dictionary, Object.keys(obj) will return the keys for each item in the dictionary.
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 00:55

i am having trouble with for loops.. heres instructions-- Push the odd numbers from 1 through 9 to myArray using a for loop. heres code----------- var myArray = [];

// Only change code below this line.

for (var i = 1; i < 10; i -= 2) {
myArray.push(i);
}

// Only change code above this line.

andrey
@kaflan
Nov 15 2015 00:55
Hi, im stack in code, maybe we have help me?
I want to make a function that will do bits.
function bit(num){
        var str = '';
    for(var i = 0; i < num; i++){


    }
     return true;
     }
Ethan Leyden
@Darksmurf
Nov 15 2015 00:56
so if there are multiple objects, are all the keys added
andrey
@kaflan
Nov 15 2015 00:56
can some one help to realize ?
DJ
@qualitymanifest
Nov 15 2015 00:57
@cailynerodriguez so you're initializing i at 1 and ending it at 10... but then you're subtracting 2 each time, so i will never reach 10
mariocatch
@mariocatch
Nov 15 2015 00:57
@Darksmurf you have to iterate through each object in the array. but you can gather the keys for each object using Object.keys(obj)
Ethan Leyden
@Darksmurf
Nov 15 2015 00:57
var keys = Object.keys(source);
DJ
@qualitymanifest
Nov 15 2015 00:58
@cailynerodriguez so, if you run that code you will get an infinite loop, since i just keeps subtracting forever since it never reaches 10
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 01:00
@qualitymanifest oh ok! i see what i did wrong. was supposed to have a + sign instead to reach 10. thanks!
CamperBot
@camperbot
Nov 15 2015 01:00
cailynerodriguez sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 376 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Nov 15 2015 01:01
np
Robert J. Domingo
@robdom
Nov 15 2015 01:03
@rick1827 code format
code format
DJ
@qualitymanifest
Nov 15 2015 01:03
i think you mean
help format
CamperBot
@camperbot
Nov 15 2015 01:04

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Robert J. Domingo
@robdom
Nov 15 2015 01:07
thanks @qualitymanifest ! I had a screenshot but couldn't figure out how to get it to display.
CamperBot
@camperbot
Nov 15 2015 01:07
robdom sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 377 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Rick
@rick1827
Nov 15 2015 01:19
Thank you @robdom
CamperBot
@camperbot
Nov 15 2015 01:19
rick1827 sends brownie points to @robdom :sparkles: :thumbsup: :sparkles:
:star: 154 | @robdom | http://www.freecodecamp.com/robdom
Aaron Freidus
@shadowfool
Nov 15 2015 01:19
http://codepen.io/shadowfool/pen/yYRrwE anyone mind taking a look at this, I'm trying to prevent users from putting operations signs in more than once in a row. ie. ++ shouldn't happen but 3+3+3 is fine. Been having a lot of issues with finding the equivalency within my action string. I'm using plus as my test. Also please excuse my crummy formatting, want to get the backed working before I design it.
 $("#plus").click(function(){
   if(action[action.length - 1] == "+"){

   }
   if(action == false){
   }         
   else{
       action += "+";
      $("#dis").text(action);
   }
  });
Bryan Hatton
@bryan-hatton
Nov 15 2015 01:23
@shadowfool This will only help you find, say 3++ but a user could input say 3*+. Should they be allowed to input 3+-5? Also, use === rather than == because == does automatic type conversions which usually is a bad thing.
Aaron Freidus
@shadowfool
Nov 15 2015 01:26
yes 3+-5 is fine, and I've got a way to do that. After I figure out how to do the equivalency I'm going to replace the "+" with a regex that = anything that's not a number( and then add another if statement to account for the minus/negative cases.
CoderCal
@CoderCal
Nov 15 2015 01:26
I forgot how to add a class
nvm
i figured it out
This message was deleted
Aaron Freidus
@shadowfool
Nov 15 2015 01:27
.
Bryan Hatton
@bryan-hatton
Nov 15 2015 01:28
@shadowfool I think you want only one of these branches to trigger, so you should use an else if
if (a < b) {
 doThing();
} else if (a === b) {
 doThang();
} else {
 doDefault();
}

@shadowfool If you forget the else, then multiple things can trigger, for instance

if (a < b) {
 doThing();
}  if (a === b) {
 doThang();
} else {
 doDefault();
}

Will run both doThing() and doDefault if a<b

CoderCal
@CoderCal
Nov 15 2015 01:30
How u guys so good at this?
Aaron Freidus
@shadowfool
Nov 15 2015 01:30
@bryan-hatton ah that makes sense, so my else is triggering no matter what
Bryan Hatton
@bryan-hatton
Nov 15 2015 01:30
@shadowfool pretty much, whenever action isn't falsy
@CoderCal Practice and covert googling (though I am by no means good)
Herman Fassett
@HermanFassett
Nov 15 2015 01:33
Helping here in chat has made me a better coder for sure
zrsmith
@zrsmith75
Nov 15 2015 01:45
Question: In jQuery 17, the code in the example is $('body').addClass('animated fadeout') ... using single quotes, and up to here it has been double quotes. I tried double quotes and it worked the same, and was wondering if both are the same and whether it is just convention to use one over the other?
Herman Fassett
@HermanFassett
Nov 15 2015 01:46
Both work almost exactly the same
If you ever need quotes in a string for example you can use one type to signify string, and one type to be the quotes in the string
For example
var hi = "I said 'Hello World!'";
I like double quotes, some like single quotes... It generally doesn't matter
zrsmith
@zrsmith75
Nov 15 2015 01:48
@HermanFassett Thanks, I figured it was like Python in that respect. Thanks again@
CamperBot
@camperbot
Nov 15 2015 01:48
zrsmith75 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 611 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Nov 15 2015 01:48
Sometimes at least in other languages when defining or testing against a literal character you have to use single quotes, but don't worry about that for now :)
zrsmith
@zrsmith75
Nov 15 2015 01:49
Excellent, thanks again! I will stick to double because I am used to it already with Java.
Herman Fassett
@HermanFassett
Nov 15 2015 01:51
Ah yes, well Java is one of those languages where a char is defined with single quotes ;P
zrsmith
@zrsmith75
Nov 15 2015 01:52
right ...
Herman Fassett
@HermanFassett
Nov 15 2015 01:52
:)
zrsmith
@zrsmith75
Nov 15 2015 01:53
might as well stay consistent when I can ... make the learning a little easier
CoderCal
@CoderCal
Nov 15 2015 02:00
What s anchor text... i forgot
This message was deleted
Jason
@Jauble
Nov 15 2015 02:04
Anyone know what I can do to get my session length and break length divs to stay centered? I tried adding media queries which doesn't look too bad, but I know there's gotta be a better way. http://codepen.io/auble220/pen/rOPBKP
CoderCal
@CoderCal
Nov 15 2015 02:04
This message was deleted
Wha thta mean?
What Tht*
Jason
@Jauble
Nov 15 2015 02:05
an anchor tag is a link tag
CoderCal
@CoderCal
Nov 15 2015 02:05
k
thnks
how i give you pooints?
Jason
@Jauble
Nov 15 2015 02:06
no problem
CoderCal
@CoderCal
Nov 15 2015 02:06
no, how do I give YOU points?
Jason
@Jauble
Nov 15 2015 02:06
@ and then the persons name
CoderCal
@CoderCal
Nov 15 2015 02:06
@Jauble
@Jauble
Jason
@Jauble
Nov 15 2015 02:06
and then thanks
CoderCal
@CoderCal
Nov 15 2015 02:06
your welcome
Jason
@Jauble
Nov 15 2015 02:07
I mean, you type their name and then say 'thanks'
CoderCal
@CoderCal
Nov 15 2015 02:07
ohh lol
@Jauble Thnks
CamperBot
@camperbot
Nov 15 2015 02:07
codercal sends brownie points to @jauble :sparkles: :thumbsup: :sparkles:
:star: 223 | @jauble | http://www.freecodecamp.com/jauble
Jason
@Jauble
Nov 15 2015 02:07
thanks :smile:
CoderCal
@CoderCal
Nov 15 2015 02:07
:)
:D
How do i take a screenshot
srry for asking so many qeustions :3
Jason
@Jauble
Nov 15 2015 02:09
It's ok, that's what this room is for
Are you on a pc?
CoderCal
@CoderCal
Nov 15 2015 02:09
ok
yes
Jason
@Jauble
Nov 15 2015 02:09
You can hold down function and then hit prtsc (print screen)
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 02:10
im having trouble with for loops.. heres the instructions-- Push the odd numbers from 9 through 1 to myArray using a for loop. heres the code---- for (var i = 9; i > 1; i -= 2) {
ourArray.push(i);
Jason
@Jauble
Nov 15 2015 02:10
fn = function
CoderCal
@CoderCal
Nov 15 2015 02:10
What if i dont have an fn key...
Jason
@Jauble
Nov 15 2015 02:10
@cailynerodriguez wiki format
wiki format
CamperBot
@camperbot
Nov 15 2015 02:10

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Alexander Køpke
@alexanderkopke
Nov 15 2015 02:11
you don't need a fn button on windows.. just hit prntscr and picture will copy to clipboard
CoderCal
@CoderCal
Nov 15 2015 02:11
k
Jason
@Jauble
Nov 15 2015 02:12
Oh, that might work too. I have to hit prtsc because its a different button without hitting function
CoderCal
@CoderCal
Nov 15 2015 02:12
This message was deleted
OMG THIS IS SO CONFUSING
srry for caps lock
how would i make a link with the text cat photos
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:13
links you use <a> tags
CoderCal
@CoderCal
Nov 15 2015 02:13
ik
nvm
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:13
so whatever you want to link you put inside <a href="link adress">insert text or image here </a>
Jason
@Jauble
Nov 15 2015 02:15
@cailynerodriguez try changing it to i > 0. You have i > 1, so it will stop at 2
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 02:16
i changed it to 1, still doesnt work
Jason
@Jauble
Nov 15 2015 02:17
you mean 0?
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 02:17
yes thats what i meant.
Jason
@Jauble
Nov 15 2015 02:17
try posting all of your code this way:
wiki format
CamperBot
@camperbot
Nov 15 2015 02:17

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Aaron Freidus
@shadowfool
Nov 15 2015 02:18
@bryan-hatton thanks got it to work finally http://codepen.io/shadowfool/full/yYRrwE/
CamperBot
@camperbot
Nov 15 2015 02:18
shadowfool sends brownie points to @bryan-hatton :sparkles: :thumbsup: :sparkles:
:star: 225 | @bryan-hatton | http://www.freecodecamp.com/bryan-hatton
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 02:18
for (var i = 9; i > 0; i -= 2) {
ourArray.push(i);
}
whats wiki format
Aaron Freidus
@shadowfool
Nov 15 2015 02:19
It's the wiki page for formatting code in chat
Use then shift + enter for a new line, paste your code then shift enter
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:19
what does the ourArray look like?
Jason
@Jauble
Nov 15 2015 02:20
for (var i = 9; i > 0; i -= 2) {
ourArray.push(i);
}
whats wiki format
That way doesn't work for me @shadowfool
Aaron Freidus
@shadowfool
Nov 15 2015 02:21
for (var i = 9; i > 0; i -= 2) { ourArray.push(i); }
ah god it auto fomats
"```"
that then your code then "```"
Jason
@Jauble
Nov 15 2015 02:22
Ya, that's the only way it works for me
Aaron Freidus
@shadowfool
Nov 15 2015 02:22
or press ctrl up m and it'll show you markdown for chat
Jason
@Jauble
Nov 15 2015 02:23
@cailynerodriguez Did you figure it out?
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:29
I am on the "Waypoint: Use a CSS Class to Style an Element" challenge and I dont understand. I have done what it wants me to do but one of the tests is not positive still.
i replaced .red-text definition within the style element block and then applied it to the h2 element. The heading is red but one of the tests is not being passed
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:30
post code please so we can analyze it with you
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:30

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

This is the test thats not passing -- "Your stylesheet should declare a red-text class and have its color set to red."
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:32
seems to look correct
brb I'll look at the challenge
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:32
Ty
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:34
<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>
this is mine and it passes.. I don't see a difference
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:35
why doesnt mine pass?? I can paste images here in this chat? I can post a screen grab showing its not passing...this is bizarre
i will rest it and try again, maybe its just a glitch
*reset
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:35
probably you have to clean the browser cache.. I had a simlar problem once
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:35
ok will report back
Alexander Køpke
@alexanderkopke
Nov 15 2015 02:35
and when I cleaned the browser and tried again ti worked
ok good luck!
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:38
passed when i reset it lol Thanks for your help
mazz44
@mazz44
Nov 15 2015 02:40
Hi. I can't get past Waypoint: Nest an Anchor Element within a Paragraph. Here is the line "<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p> "and here is the error message "Your p element should have the text "View more " (with a space after it)." I see nothing wrong with it.
Matt Leonard
@matty22
Nov 15 2015 02:41
@mazz44 Post all of your code please
mazz44
@mazz44
Nov 15 2015 02:41

That's the only line needed. Here is the rest. <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>

The other code already exists in the challenge.
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:42
I think the problem is you maybe have a space missing? because the error messages explicitly mentions. Is there a space between View more and <a?
Matt Leonard
@matty22
Nov 15 2015 02:42
Yeah, the instructions for this waypoint are a little off.
Instead of adding that <p> at the bottom. Wrap it around the pre-existing <a> tag right after your <h2>
Mason Shin
@minsooshin
Nov 15 2015 02:43
how about to replace <a> next to the <h2> with that <p> I guess
vibhorebhatnagar
@vibhorebhatnagar
Nov 15 2015 02:44
never mind listen to matty, apparently the <a> tag you are supposed to wrap around already exists.
Matt Leonard
@matty22
Nov 15 2015 02:46
Did that work @mazz44 ?
mazz44
@mazz44
Nov 15 2015 02:46
That did it. I replaced the existing anchor line with the one I created. Thank you @matty22
CamperBot
@camperbot
Nov 15 2015 02:46
:star: 235 | @matty22 | http://www.freecodecamp.com/matty22
mazz44 sends brownie points to @matty22 :sparkles: :thumbsup: :sparkles:
Matt Leonard
@matty22
Nov 15 2015 02:47
:thumbsup:
daniel9012
@daniel9012
Nov 15 2015 02:59
booooooooooooooooooooooooooooooooooooooooooooooooooooooo!
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:02
@jauble i stepped away from the computer, but i didnt finish the waypoint. i cant figure it out. heres what i have. www.websitelog.net
whoops not that, this for (var i = 9; i > 0; i -= 2) {
ourArray.push(i);
}
the error msg says myArray should equal 9,7,5,3,1
or if anyone can help me?? counting backwards with a for loop instructions-----Push the odd numbers from 9 through 1 to myArray using a for loop. code-------for (var i = 9; i > 0; i -= 2) {
ourArray.push(i);
}
daniel9012
@daniel9012
Nov 15 2015 03:05
booooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
mariocatch
@mariocatch
Nov 15 2015 03:05
@daniel9012 can you stop please
DJ
@qualitymanifest
Nov 15 2015 03:05
here we go again
iprogrammer15
@iprogrammer15
Nov 15 2015 03:05
hi guys
mariocatch
@mariocatch
Nov 15 2015 03:06
@cailynerodriguez what exercise are you working on? i'll take a look
DJ
@qualitymanifest
Nov 15 2015 03:07
@cailynerodriguez so it sounds like you're pushing them to ourArray when you should be pushing them to myArray...? otherwise that code looks fine
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:08
ah i cant believe i made that mistake.. thank you!! @mariocatch @qualitymanifest
CamperBot
@camperbot
Nov 15 2015 03:08
cailynerodriguez sends brownie points to @mariocatch and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 36 | @mariocatch | http://www.freecodecamp.com/mariocatch
:star: 378 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
iprogrammer15
@iprogrammer15
Nov 15 2015 03:09
i am stuck in challenge Bonfire - 4. Bonfire: palindrome challenge. I got the solution but i am not able to clear 3 instructions. i ll paste my code below. Also please note that when i pass in the values i get the correct boolean value for all. thanks in advance

function palindrome(str) {
// Good luck!

var lstr = str.toLowerCase();
lstr = lstr.replace(/ /g,"");
var cstr = lstr.split("");
var rstr = lstr.split("").reverse();

while(str){
for(var i = 0; i < cstr.length;i++){
if(cstr[i] != rstr[i]){
return false;
}else{
cstr.shift();
rstr.shift();
}
}
return true;
}

}

palindrome("race car");

mariocatch
@mariocatch
Nov 15 2015 03:09
@iprogrammer15 help format
CamperBot
@camperbot
Nov 15 2015 03:09

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Alexander Køpke
@alexanderkopke
Nov 15 2015 03:10
function palindrome(str) {
  // Good luck!

  var lstr = str.toLowerCase();
  lstr = lstr.replace(/ /g,"");
  var cstr = lstr.split("");
  var rstr = lstr.split("").reverse();


 while(str){  
   for(var i = 0; i < cstr.length;i++){
      if(cstr[i] != rstr[i]){
        return false;
      }else{
          cstr.shift();
          rstr.shift();          
      }    
    }
   return true;
  }


}



palindrome("race car");
iprogrammer15
@iprogrammer15
Nov 15 2015 03:10
yees ? @mariocatch
mariocatch
@mariocatch
Nov 15 2015 03:10
@iprogrammer15 i was teaching you how to format your code
iprogrammer15
@iprogrammer15
Nov 15 2015 03:10
ok thanks @mariocatch @alexanderkopke
CamperBot
@camperbot
Nov 15 2015 03:10
iprogrammer15 sends brownie points to @mariocatch and @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 37 | @mariocatch | http://www.freecodecamp.com/mariocatch
:star: 223 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
mariocatch
@mariocatch
Nov 15 2015 03:11
@iprogrammer15 it's difficult to read code that is just pasted in here without formatting (as @alexanderkopke did for you), but it's more important you learn how to do it rather than someone else doing it for you :)
DJ
@qualitymanifest
Nov 15 2015 03:11
@iprogrammer15 you need to use your regex to get rid of punctuation
really, to get rid of all non-word characters and underscores
iprogrammer15
@iprogrammer15
Nov 15 2015 03:12
thanks @qualitymanifest .. i will @mariocatch :)
CamperBot
@camperbot
Nov 15 2015 03:12
iprogrammer15 sends brownie points to @qualitymanifest and @mariocatch :sparkles: :thumbsup: :sparkles:
:warning: iprogrammer15 already gave mariocatch points
:star: 379 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Nov 15 2015 03:14
no problem. last thing i will say - although your code will work as soon as you get rid of punctuation, there isn't a need for a loop in this one
iprogrammer15
@iprogrammer15
Nov 15 2015 03:14
bear with me if the code is not efficient or good.. :P learning to code.
mariocatch
@mariocatch
Nov 15 2015 03:15
@iprogrammer15 i've been developing for over 11 years and i'm still learning as well :) we are all always learning, so no worries.
iprogrammer15
@iprogrammer15
Nov 15 2015 03:15
thanks for the help guys @mariocatch @qualitymanifest
CamperBot
@camperbot
Nov 15 2015 03:15
iprogrammer15 sends brownie points to @mariocatch and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: iprogrammer15 already gave qualitymanifest points
:warning: iprogrammer15 already gave mariocatch points
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:16
im trying to generate random fractions with JS, not sure where to put the Math.random()... instructions...........Change myFunction to return a random number instead of returning 0. code........... '''
CamperBot
@camperbot
Nov 15 2015 03:16
:bulb: to format code use backticks! ``` more info
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:17

unction myFunction() {

// Only change code below this line.

return 0;

// Only change code above this line.
}

(function(){return myFunction();})();

*function myFunction(){
iprogrammer15
@iprogrammer15
Nov 15 2015 03:19

'''@cailynerodriguez
unction myFunction() {

// Only change code below this line.

return 0;

// Only change code above this line.
}

(function(){return myFunction();})();
*function myFunction(){'''

CamperBot
@camperbot
Nov 15 2015 03:19
:bulb: to format code use backticks! ``` more info
iprogrammer15
@iprogrammer15
Nov 15 2015 03:19

'''
function myFunction() {

// Only change code below this line.

return 0;

// Only change code above this line.
}

(function(){return myFunction();})();
*function myFunction(){

CamperBot
@camperbot
Nov 15 2015 03:19
:bulb: to format code use backticks! ``` more info
mariocatch
@mariocatch
Nov 15 2015 03:20

@cailynerodriguez here's the instructions in that lesson:

JavaScript has a Math.random() function that generates a random decimal number.
Change myFunction to return a random number instead of returning 0.

iprogrammer15
@iprogrammer15
Nov 15 2015 03:20
fail formatting
mariocatch
@mariocatch
Nov 15 2015 03:20
@cailynerodriguez take special note of those 2 lines i just quoted.
it's telling you that javascript has a function built in for you that gives you a random decimal number
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:20
i understand it.. i just am not sure where to place it correctly.
mariocatch
@mariocatch
Nov 15 2015 03:21
and then it asks you to change the line of code within myFunction that is currently returning 0.
so you would need to replace that line of code, and instead use the Math.random() function
Mason Shin
@minsooshin
Nov 15 2015 03:21
between the block of // Only change code below this line. and // Only change code above this line.
mariocatch
@mariocatch
Nov 15 2015 03:22
the lessons tell you exactly where to place the code. ie:
function myFunction() {

  // Only change code below this line.

  return 0; // <--- modify this line 

  // Only change code above this line.
}
Mason Shin
@minsooshin
Nov 15 2015 03:22
code change will be happend inside of those comments
Alexander Køpke
@alexanderkopke
Nov 15 2015 03:23
in fact only replace the 0
Cailyn Rodriguez
@cailynerodriguez
Nov 15 2015 03:23
@minsooshin @mariocatch thanks, i got it! @alexanderkopke
CamperBot
@camperbot
Nov 15 2015 03:23
cailynerodriguez sends brownie points to @minsooshin and @mariocatch and @alexanderkopke :sparkles: :thumbsup: :sparkles:
:warning: cailynerodriguez already gave mariocatch points
:star: 225 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
:star: 173 | @minsooshin | http://www.freecodecamp.com/minsooshin
Madhu Bhargava
@madhuspot
Nov 15 2015 04:06
<h4 #right-well>
      </h4>
Is this the right way to add id to h4 tag?
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:07
nope
<h4 id="right-well">Sometext</h4>
@madhubhargava you use # in css styles, not in html markup
Madhu Bhargava
@madhuspot
Nov 15 2015 04:10
@andrei-sheina got it. Thanks
CamperBot
@camperbot
Nov 15 2015 04:10
madhubhargava sends brownie points to @andrei-sheina :sparkles: :thumbsup: :sparkles:
:star: 106 | @andrei-sheina | http://www.freecodecamp.com/andrei-sheina
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:11
@madhubhargava Не за что
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:27
```
function filterByArguments(value) {
  if(arguments[1] !== value)
    return value;
}
hello guys may I ask if that filter is correct?
I have currently two arguments
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:31
@francisOnDecaf what do you want to this filter to do?
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:32
function filterByArguments(value) {
  if(arguments[1] != value)
    return value;
}

function destroyer(arr) {
  // Remove all the values
  array_given = arguments[0];
  new_arr = array_given.filter(filterByArguments);

  return new_arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
here's the whole @andrei-sheina
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:33
@francisOnDecaf can you please provide the task of what you need to do
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:33
I would like to pass arguments[0] in the filterByArguments function
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:37
@francisOnDecaf first of all, you can't just pass filterByArguments into array_given.filter(). You are passing function's body inside Array.filter()
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:38
oh, okay, so there's no way I can pass the argument value on filter?
because arguments1 and arguments2 in the filterByArguments() is not the same in destroyer()
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:39
function filterByArguments(value) {
  if(arguments[1] != value)
    return value;
}

function destroyer(arr) {
  // Remove all the values
  array_given = arguments[0];
  new_arr = array_given.filter(filterByArguments(arguments[i]));

  return new_arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
@francisOnDecaf you can do it like that
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:40
i'll try
says not a function
2 is not a function. 2 is the value of arguments1
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:43
@francisOnDecaf what task is it? What are trying to achieve as a result?
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:51
bonfire seek and destory
CamperBot
@camperbot
Nov 15 2015 04:51
Sorry, can't find a bonfire called seek and destory. [ Check the map? ]
Andrei Sheina
@andrei-sheina
Nov 15 2015 04:51
@francisOnDecaf oh sorry, actually it's okay and it's right to pass filterByArguments into Array.filter()
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:55
bonfire seek and destroy
CamperBot
@camperbot
Nov 15 2015 04:55

: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

Francis Albert Calas
@francisOnDecaf
Nov 15 2015 04:56
yes, but how can I locally pass my arguments var into filterByArguments
Francis Albert Calas
@francisOnDecaf
Nov 15 2015 05:01
I've already solved it but I placed my main logic in destroyer()
Jazmine
@medusanxs
Nov 15 2015 05:03
Howdy, all
Latasha
@tasha2008
Nov 15 2015 05:07
hello world ;)
CamperBot
@camperbot
Nov 15 2015 05:07

welcome to FreeCodeCamp @tasha2008!

Raymund Sinlao
@RaySinlao
Nov 15 2015 05:44
I'm trying to get freecodecamp started locally. I followed the startup instructions but this is what is showing up in npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'run', 'first-time' ]
2 info using npm@2.14.4
3 info using node@v0.12.7
4 verbose node symlink /usr/local/bin/node
5 verbose run-script [ 'prefirst-time', 'first-time', 'postfirst-time' ]
6 info prefirst-time freecodecamp@0.1.0
7 info first-time freecodecamp@0.1.0
8 verbose unsafe-perm in lifecycle true
9 info freecodecamp@0.1.0 Failed to exec first-time script
10 verbose stack Error: freecodecamp@0.1.0 first-time: `npm run create-rev && echo '
10 verbose stack
10 verbose stack seeding database
10 verbose stack
10 verbose stack ' && node seed && node seed/nonprofits`
10 verbose stack Exit status 1
10 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
10 verbose stack     at EventEmitter.emit (events.js:110:17)
10 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
10 verbose stack     at ChildProcess.emit (events.js:110:17)
10 verbose stack     at maybeClose (child_process.js:1015:16)
10 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid freecodecamp@0.1.0
12 verbose cwd /Users/raysinlao/Desktop/FreeCodeCamp
13 error Darwin 14.4.0
14 error argv "node" "/usr/local/bin/npm" "run" "first-time"
15 error node v0.12.7
16 error npm  v2.14.4
17 error code ELIFECYCLE
18 error freecodecamp@0.1.0 first-time: `npm run create-rev && echo '
18 error
18 error seeding database
18 error
18 error ' && node seed && node seed/nonprofits`
18 error Exit status 1
19 error Failed at the freecodecamp@0.1.0 first-time script 'npm run create-rev && echo '
19 error
19 error seeding database
19 error
19 error ' && node seed && node seed/nonprofits'.
19 error This is most likely a problem with the freecodecamp package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error     npm run create-rev && echo '
19 error
19 error seeding database
19 error
19 error ' && node seed && node seed/nonprofits
19 error You can get their info via:
19 error     npm owner ls freecodecamp
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]
It's probably with the way I am setting up the .env file. Any ideas?
Jazmine
@medusanxs
Nov 15 2015 05:55
Is /usr/bin/local/node there?
sorry
/usr/bin/local/npm
Depending on your environment, maybe the paths are incorrect. I'm not sure, however, the 'error' is kinda vague? I guess
Did you run it manually?
@RaySinlao ^^
You could check your user's known paths, and see if that is listed. Might help.
D/S
@dantesolis
Nov 15 2015 06:04
Hey there peeps
I have a small problem. Quite stupid really but I can’t seem to be able to reference a pic
question how to make a background-image cover and full-width in css
this is what I have at the moment
body { background: url("img/single-candle.jpg") no-repeat center center fixed; }
but I can’t get it to appear
alan1001110
@alan1001110
Nov 15 2015 06:11
@dantesolis Have you tried putting the whole URL address in. For example, "http://www.somesite/images/single-candle.jpg"?
D/S
@dantesolis
Nov 15 2015 06:12
@alan1001110 but I’m referencing it from my own file system. The pic is inside the img folder
Herman Fassett
@HermanFassett
Nov 15 2015 06:13
Is your css in a styles folder?
D/S
@dantesolis
Nov 15 2015 06:13
yes
alan1001110
@alan1001110
Nov 15 2015 06:13
Also, you should set "background-image"
Herman Fassett
@HermanFassett
Nov 15 2015 06:13
No should be background like that
D/S
@dantesolis
Nov 15 2015 06:14
the folder is called csss not style but the file inside it is style.css I can reference evrything else inside that file, except the background image
Herman Fassett
@HermanFassett
Nov 15 2015 06:14
Are your images in your styles folder or outside
D/S
@dantesolis
Nov 15 2015 06:15
inside an img folder
Herman Fassett
@HermanFassett
Nov 15 2015 06:15
Have you tried url("/img/single-candle.jpg") or maybe url("../img/single-candle.jpg") or something like that... Not sure off the top of my head, but you can't access img folder like that unless it's in your styles folder.
I think it's most likely the ../img/single-candle.jpg that accesses a folder in parent folder
Jazmine
@medusanxs
Nov 15 2015 06:16
@HermanFassett correct.
h4r1m4u
@h4r1m4u
Nov 15 2015 06:17
@dantesolis if your file structure is like this:
/css/style.css
/img/single-candle.jpg
index.html
then what @HermanFassett says is correct
"../img/single-candle.jpg"
D/S
@dantesolis
Nov 15 2015 06:18
@HermanFassett @medusanxs and @h4r1m4u THANKS!!!! I got it to work
CamperBot
@camperbot
Nov 15 2015 06:18
dantesolis sends brownie points to @hermanfassett and @medusanxs and @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 612 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
:star: 207 | @medusanxs | http://www.freecodecamp.com/medusanxs
:star: 669 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 15 2015 06:18
sweet
Herman Fassett
@HermanFassett
Nov 15 2015 06:18
;)
D/S
@dantesolis
Nov 15 2015 06:18
what @medusanxs said made it work. Thank you thank you so much..
CamperBot
@camperbot
Nov 15 2015 06:18
dantesolis sends brownie points to @medusanxs :sparkles: :thumbsup: :sparkles:
:warning: dantesolis already gave medusanxs points
D/S
@dantesolis
Nov 15 2015 06:19
one more question what sort of animation I can use to make the top of the candle (the candle light flicker?)
Jazmine
@medusanxs
Nov 15 2015 06:23
think you'd need an animated sprite.
The animation would affect the whole picture, otherwise.
Not just the candle.
Herman Fassett
@HermanFassett
Nov 15 2015 06:24
If you really really wanted you could just make the whole candle with css and have the flame just css anim
D/S
@dantesolis
Nov 15 2015 06:24
that’s actually what I want
exactly what I want
Herman Fassett
@HermanFassett
Nov 15 2015 06:25
Here's someone's flame codepen http://codepen.io/dazulu/pen/fGFyj
D/S
@dantesolis
Nov 15 2015 06:25
but I don’t even know where to begin
Jazmine
@medusanxs
Nov 15 2015 06:25
Hey, you learn something err'day thanks, @HermanFassett
CamperBot
@camperbot
Nov 15 2015 06:25
medusanxs sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 613 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Herman Fassett
@HermanFassett
Nov 15 2015 06:26
There are a few animated candle codepens if you search
D/S
@dantesolis
Nov 15 2015 06:26
thanks @HermanFassett, I guess for the rest of the candle I could just use html5 canvas?
CamperBot
@camperbot
Nov 15 2015 06:26
dantesolis sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:warning: dantesolis already gave hermanfassett points
Herman Fassett
@HermanFassett
Nov 15 2015 06:27
You could use whatever you want really. Here's another example where I think just styled divs are used: http://codepen.io/agensjono/pen/dzFEq
CamperBot
@camperbot
Nov 15 2015 06:27
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Herman Fassett
@HermanFassett
Nov 15 2015 06:28
@sauravkarki2 you'll have to remove all punctuation stuff
Leaving only alphanumeric chars
Jazmine
@medusanxs
Nov 15 2015 06:28
@sauravkarki2 Yea - I'm working on this too. You'll need to get rid of stuff like spaces. Like "race car" only works if its "racecar"
D/S
@dantesolis
Nov 15 2015 06:29
@HermanFassett thanks once again
CamperBot
@camperbot
Nov 15 2015 06:29
dantesolis sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:warning: dantesolis already gave hermanfassett points
Herman Fassett
@HermanFassett
Nov 15 2015 06:29
Yep
Not like I made the candles... :P
saurav
@sauravkarki2
Nov 15 2015 06:29
@HermanFassett im sorry i couldnt understand
Herman Fassett
@HermanFassett
Nov 15 2015 06:30
@sauravkarki2 you have to remove everything that isn't a-z or 0-9 from your string including spaces
saurav
@sauravkarki2
Nov 15 2015 06:30
@medusanxs yah im facing the same problem with my code so how can we ignore spaces ??
Herman Fassett
@HermanFassett
Nov 15 2015 06:30
You could do this by using match with regex, or replace with regex and replacing with nothing
Jazmine
@medusanxs
Nov 15 2015 06:34
@HermanFassett is correct. There are links to replace in the Bonfire.
@sauravkarki2 ^
saurav
@sauravkarki2
Nov 15 2015 06:40

@HermanFassett function palindrome(str) {
str = str.replace(/\s+/g, "");

if( str == str.split("").reverse().join("") ){

 return true;

 }

else{
return false;
}

}
palindrome("eye");

@HermanFassett i tried this but didnt work
Herman Fassett
@HermanFassett
Nov 15 2015 06:40
Good start @sauravkarki2 but you'll need to remove more than spaces... stuff like .,/)-_ anything like that
It helps if you replace an inverse of alphanumeric chars,
Mason Shin
@minsooshin
Nov 15 2015 06:42
@sauravkarki2 if you take a look at the instruction and test case carefully, there is another condition for special letters
you may need to get rid of special characters to ignore them in comparisom
Jazmine
@medusanxs
Nov 15 2015 06:53
This is where I am stuck too. lol
My husband told me I had to expand, and couldn't one-line it most likely :(
My only response was http://i.imgur.com/IHTYCXi.gif
saurav
@sauravkarki2
Nov 15 2015 06:58
hehe @medusanxs :0
:0
Manish Giri
@Manish-Giri
Nov 15 2015 07:03
is code golfing a good thing to follow?
Herman Fassett
@HermanFassett
Nov 15 2015 07:05
Not if you want to work on a team
Not if you want your code to be read by others
You can try to make your code as short as possible, but have nice spacing, good variable names, and comments
I codegolf a little on the bonfires just for fun :P
Manikanth
@manikanth1024
Nov 15 2015 07:17
i want to give the parent of the #target1 element a bgcolor of red
Here's the code:
<script>
$("document").ready(function(){
$("#left-well").parent().css("background-color","red");
$("#target1").parent().css("background-color","red");
});
</script>

<div class="container-fluid">
<h3>JQuery Playground</h4>
<div class="col-xs-6">
<h4>#Left-well</h4>
<div class="well" id="left-well">
<button id="#target1" class="btn btn-default target">#target1</button>
</div>

</div>

what do i need to do?
Andrei Sheina
@andrei-sheina
Nov 15 2015 07:19
looks like you've already did it
saurav
@sauravkarki2
Nov 15 2015 07:19

@HermanFassett
function palindrome(str) {
str = str.replace(/[^\w\s]|_/g, "").replace(/\s+/g,"");

if( str == str.split("").reverse().join("") ){
return true;
}
else{
return false;
}
}
palindrome("eye");

still two left to correct!!
@HermanFassett
  1. palindrome("A man, a plan, a canal. Panama") should return true.
  2. palindrome("My age is 0, 0 si ega ym.") should return true.
Manikanth
@manikanth1024
Nov 15 2015 07:20
but its not showing right one @andrei-sheina
Markus Kiili
@Masd925
Nov 15 2015 07:21
@sauravkarki2 replace that whole if block with: return str===str.split("").reverse().join("");
Herman Fassett
@HermanFassett
Nov 15 2015 07:22
@sauravkarki2 your regex is actually working (though some of it is unnecessary) but you also need to turn str toLowerCase! I'd recommend doing that the first step
Andrei Sheina
@andrei-sheina
Nov 15 2015 07:22
@manikanth1024
$("#target1").parent().css("background-color", "red");
looks like you've missed empty space after comma
Manikanth
@manikanth1024
Nov 15 2015 07:24
i tried but not get it
saurav
@sauravkarki2
Nov 15 2015 07:25
nd it worked @HermanFassett
thanks mann...
CamperBot
@camperbot
Nov 15 2015 07:25
sauravkarki2 sends brownie points to @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 614 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Manikanth
@manikanth1024
Nov 15 2015 07:25
can u check ur solution and can u send me it?
Jazmine
@medusanxs
Nov 15 2015 07:26
Gratz, @sauravkarki2
saurav
@sauravkarki2
Nov 15 2015 07:27
@manikanth1024 put @ and the person name to whom u wanna ask your question... :)
@medusanxs :)
Manikanth
@manikanth1024
Nov 15 2015 07:27
any one who know my prob's solution
saurav
@sauravkarki2
Nov 15 2015 07:31

@Masd925
function palindrome(str) {
str = str.toLowerCase();

str = str.replace(/[^\w\s]|_/g, "").replace(/\s+/g,"");

return str === str.split("").reverse().join("");

}
palindrome("eye");

:smile: if block was not necessary at all.......thank you !!

CamperBot
@camperbot
Nov 15 2015 07:31
sauravkarki2 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 289 | @masd925 | http://www.freecodecamp.com/masd925
Andrei Sheina
@andrei-sheina
Nov 15 2015 07:32
@manikanth1024 lol
@manikanth1024
Your code:
<button id="#target1" class="btn btn-default target">#target1</button>
remove # from id
:)
and use markdown please when post code here
Manikanth
@manikanth1024
Nov 15 2015 07:37
ya i tried and i got but one more error is "only use jquery to add these classes to element" how to solve it>
thank u@andrei
samcyn
@samcyn
Nov 15 2015 07:39
hi i don't understand this ''hello world exercise' any help
CamperBot
@camperbot
Nov 15 2015 07:39

welcome to FreeCodeCamp @samcyn!

samcyn
@samcyn
Nov 15 2015 07:39
i m pretty new to everything here
thanks camperbot
Manikanth
@manikanth1024
Nov 15 2015 07:42
i got @andrei-sheina
Z.G.Hao
@akidox
Nov 15 2015 07:42
I entered '$(".target:even").addClass("animated shakes")'
but
Manikanth
@manikanth1024
Nov 15 2015 07:42
Andrei Sheina
@andrei-sheina
Nov 15 2015 07:44
@manikanth1024 yw
Tara Thierry
@TaraT1
Nov 15 2015 07:44
Welcome @samcyn
Z.G.Hao
@akidox
Nov 15 2015 07:44
the first and third buttons of the left column,and second button of right column shaked
is this right?
samcyn
@samcyn
Nov 15 2015 07:45
thanks @TaraT1 GREETINGS
CamperBot
@camperbot
Nov 15 2015 07:45
samcyn sends brownie points to @tarat1 :sparkles: :thumbsup: :sparkles:
:star: 185 | @tarat1 | http://www.freecodecamp.com/tarat1
Z.G.Hao
@akidox
Nov 15 2015 07:47
I entered '$(".target:even").addClass("animated shakes”)’,
but the first and third buttons of the left column,and second button of right column shaked
is that it should be?
Tara Thierry
@TaraT1
Nov 15 2015 07:48
@samcyn What the hello world exercise exposes us to is how the code editor, exercises and comments work. So, when you press submit or Control-Enter, the left frame will give feedback.
sachin kamble
@sachinskamble
Nov 15 2015 07:48
creating a radio button
<lable><input type="radio" name="indoor-outdoor">indoor</lable>
is that right
Z.G.Hao
@akidox
Nov 15 2015 07:49
I entered $(“.target :even”).addClass(“animated shake”)
but the first and third buttons of the left column,and second button of right column shaked
is that it should be?
Andrei Sheina
@andrei-sheina
Nov 15 2015 07:49
@sachinskamble <label> not <lable>
Iyare Usen
@Iyare
Nov 15 2015 07:49
@sachinskamble not really. it's <label> not <lable>
sachin kamble
@sachinskamble
Nov 15 2015 07:50
thanks I see my all mistakes from the spelling
thank you for the hint
samcyn
@samcyn
Nov 15 2015 07:51

THANKS @TaraT1 this is what's up
ACTUAL EXPECTED
────────────────────────────────────────────────────────────────────────────────

"" != "HELLO WORLD"
!= ""

────────────────────────────────────────────────────────────────────────────────

CamperBot
@camperbot
Nov 15 2015 07:51
samcyn sends brownie points to @tarat1 :sparkles: :thumbsup: :sparkles:
:warning: samcyn already gave tarat1 points
Manikanth
@manikanth1024
Nov 15 2015 07:51
yes its true@akidox
Z.G.Hao
@akidox
Nov 15 2015 07:53
so jQuary counts from right to left?
@manikanth1024
Manikanth
@manikanth1024
Nov 15 2015 07:55
ya
h4r1m4u
@h4r1m4u
Nov 15 2015 07:56
@akidox @manikanth1024 no, it doesn't count from right to left. but with the CSS selectors, it respects the CSS way of doing things and CSS starts indexing from 1. unlike javascript which indexes from 0
Manikanth
@manikanth1024
Nov 15 2015 07:57
ok
thank u pal even am new to this jquery@h4r1m4u
h4r1m4u
@h4r1m4u
Nov 15 2015 07:58
no problem
Manikanth
@manikanth1024
Nov 15 2015 07:59
can u explain it?
can u explain it? @h4r1m4u
Z.G.Hao
@akidox
Nov 15 2015 08:03
it’s css selector in jQuary right?so it follows the Javascript's way counts from 0?
question from here --Waypoint: Target Even Numbered Elements Using jQuery
Manish Giri
@Manish-Giri
Nov 15 2015 08:11
bonfire chunky monkey
CamperBot
@camperbot
Nov 15 2015 08:11

:fire:Bonfire: Chunky Monkey :link:

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

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

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

more info:  bf details | bf links | hint

Manish Giri
@Manish-Giri
Nov 15 2015 08:14
@HermanFassett Oh!! I thought code-golfing was a thing everyone was doing these days!
Bryan Hatton
@bryan-hatton
Nov 15 2015 08:15
I have a question for someone who is good with browser security... would you like to hear it?
Manish Giri
@Manish-Giri
Nov 15 2015 08:15
This message was deleted
samcyn
@samcyn
Nov 15 2015 08:15
@TaraT1 and @camperbot i did everything right i only forgot to save that's why i was hooked
Herman Fassett
@HermanFassett
Nov 15 2015 08:16
@Manish-Giri it can be shortened by using for I guess since the increment can be in the loop itself
This message was deleted
Look at it, I will delete it just 'cause hate posting full solutions in a help chat
Manish Giri
@Manish-Giri
Nov 15 2015 08:17
got it
you can delete it
glad to know I am halway on the right track at least, using array.slice()
Herman Fassett
@HermanFassett
Nov 15 2015 08:18
Yeah anyway I have to go, cya
Manish Giri
@Manish-Giri
Nov 15 2015 08:18
adios
Z.G.Hao
@akidox
Nov 15 2015 08:27
it’s css selector in jQuary right?so it follows the Javascript's way counts from 0? @h4r1m4u
question from here --Waypoint: Target Even Numbered Elements Using jQuery
Jazmine
@medusanxs
Nov 15 2015 08:30
@akidox You can answer the question by creating a small script, and test it. I think @h4r1m4u stepped away.
Z.G.Hao
@akidox
Nov 15 2015 08:31
yeah,thanks @medusanxs
CamperBot
@camperbot
Nov 15 2015 08:31
akidox sends brownie points to @medusanxs :sparkles: :thumbsup: :sparkles:
:star: 209 | @medusanxs | http://www.freecodecamp.com/medusanxs
Jazmine
@medusanxs
Nov 15 2015 08:33
This article lumps javascript into starts at 0 index: http://skillcrush.com/2013/01/17/why-programmers-start-counting-at-zero/
GangstaCoder
@GangstaCoder
Nov 15 2015 08:42
$($('.slot')[0]).html('<img src = "' + images[slotOne-1]+'">');
$($('.slot')1).html('<img src = "' + images[slotTwo-1]+'">');
$($('.slot')2).html('<img src = "' + images[slotThree-1]+'">');
Hi All. Can someone explain this code in 179? We are selecting selectors? and I dont understand the second half of the lines.
Right now I am just typing the code accordingly cos I am told to...not understanding
Jason
@Jauble
Nov 15 2015 09:01
@GangstaCoder you're missing brackets around your 1 1 and 2 [2]
@GangstaCoder or maybe it's just the chat room
Rex Schrader
@SaintPeter
Nov 15 2015 09:05
@GangstaCoder I suggest you cut and paste the code EXACTLY from the sample instructions and then JUST modify the variables and indexes. The test cases for this one are very persnickity. It's an issue we're aware of and are making changes to test infrastructure to make the tests better . . . but they're not ready yet.
@GangstaCoder In particular, I think you removed some spaces that need to be there for the test to pass.
shubheksha
@shubheksha
Nov 15 2015 09:13
Can someone help me with Pomodoro clock? In the example given to replicate, they've used Angular JS, but I've no clue about it at all.
Shane Gifford
@IMODEIDEN
Nov 15 2015 09:26
Hello World :D
CamperBot
@camperbot
Nov 15 2015 09:26

welcome to FreeCodeCamp @IMODEIDEN!

Shane Gifford
@IMODEIDEN
Nov 15 2015 09:26
,,,
:gun:
Vamsi nagendra
@VamsiNagendra
Nov 15 2015 09:27
Hello World
CamperBot
@camperbot
Nov 15 2015 09:27

welcome to FreeCodeCamp @VamsiNagendra!

Shane Gifford
@IMODEIDEN
Nov 15 2015 09:28
Welcome @VamsiNagendra
Manish Giri
@Manish-Giri
Nov 15 2015 09:29
function isBigEnough(value) {
  return value >= 10;
}
var filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
// filtered is [12, 130, 44]
can someone help me understand - how is each array element passed as the isBigEnough’s argument each time?
samcyn
@samcyn
Nov 15 2015 09:40
             ACTUAL                                 EXPECTED                

────────────────────────────────────────────────────────────────────────────────

"HELLO WORLD" != "185"
"[ '/home/ubuntu/.nvm/versions/node/v4.1.1/bin/node'," != ""
" '/home/ubuntu/workspace/program.js'," !=
" '94'," !=
" '91' ]" !=
"185" !=
"" !=

────────────────────────────────────────────────────────────────────────────────
any reason for this

h4r1m4u
@h4r1m4u
Nov 15 2015 09:59

@akidox @manikanth1024 sorry guys, i had to step away. i didn't phrase my initial input clearly enough, so let me elaborate:

:even and :odd are jquery specific selectors and because jquery is just a javascript library and javascript indexes from 0, :even will (confusingly) select the 1st (index = 0), the 3rd (index = 2), the 5th (index = 4), etc. elements, while :odd will select the 2nd (index = 1), 4th (index = 3), etc. elements.

CSS, on the other hand, indexes from 1, so if you're using the CSS selectors :nth-child(even) and :nth-child(odd)these will work the other way round - :nth-child(even) will select the 2nd, the 4th, etc. elements, while :nth-child(odd) will select the 1st, the 3rd, etc.

where it gets even more confusing is that even in jquery you can use the CSS selectors. for example, you could have this selector in your code: $('div:nth-child(odd)'). this will work the way CSS does and select the 1st, 3rd, etc. div. but if you use $('div:odd'), you'll get the 2nd, the 4th, etc. div

i hope this explains it

@shubhekshajalan you don't need to use angular for the pomodoro, it's not a requirement. it can be written in vanila javascript or jquery, plus the HTML/CSS portion
sagar
@sagarbhaila
Nov 15 2015 10:06
can someone help me the method getgare of myBike should be accessible outside the object.
Aleksander Gębicki
@Takumar
Nov 15 2015 10:34
@sagarbhaila you have to make it public, use "this" when declaring method.
Anaet Hossain Rezve
@anaethossain
Nov 15 2015 10:38
hi, can anyone tell me the solution of this waypoint ? Iterate over Arrays with map
David
@c-restha
Nov 15 2015 10:40
can someone help me to solve split your bootstrap row...
Aleksander Gębicki
@Takumar
Nov 15 2015 10:40
@anaethossain what is your problem? Do you have some code now?
Anaet Hossain Rezve
@anaethossain
Nov 15 2015 10:40
i can't complete this problem :
Aleksander Gębicki
@Takumar
Nov 15 2015 10:43
@anaethossain map() is similar to loop iterating on an array. I takes single element of array and passes it to internal function, which can do something with that value. At the end map() returns new array which you should save in a variable.
@anaethossain and @c-restha you cannot get answer if you don't give question.
GangstaCoder
@GangstaCoder
Nov 15 2015 10:52
@Jauble The code is correct ...its the chatroom that modified it
@SaintPeter Ok...it does concern me. there is a whole bunch of code either side of the playzone that we are just skimming past
Craig Morrison
@frogmorton
Nov 15 2015 11:27
@c-restha what have you tried?
Z.G.Hao
@akidox
Nov 15 2015 11:29
I’m fully understand now,but a little problem,when we use ‘ instead of “ in our jQuery selectors? @h4r1m4u
sagar
@sagarbhaila
Nov 15 2015 11:35
@Takumar i did but still not working
Aleksander Gębicki
@Takumar
Nov 15 2015 11:43
@sagarbhaila show your code (paste text here).
sagar
@sagarbhaila
Nov 15 2015 11:48

// Only change code below this line.

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

this.setGear = function(){
return setGear;
};

// Only

Aleksander Gębicki
@Takumar
Nov 15 2015 11:54
@sagarbhaila think about names of this functions. Now you created two methods which do the same - return something.
Function with "set" in its name should set some variable (property) in your case: "gear" property to some value.
Function with "get" in name should return "gear" so you coult get information from your object about how many gears does your object have:
greenCar.setGear(5);  // your method now will do: "gear = 5;"
console.log("How many gears do my car has? It has " + greenCar.getGear() + " gears.");
Also, do you have properties: "getGear" and "setGear" in your object? No, you create methods with that names, that's why you shouldn't return "getGear" and "setGear".
Aleksander Gębicki
@Takumar
Nov 15 2015 12:00
@sagarbhaila how are you doing?
h4r1m4u
@h4r1m4u
Nov 15 2015 12:09
@akidox you can generally use them interchangeably, it's a matter of personal preference. i prefer the single quotes because i don't need to press shift to type the character. when you code the whole day, it makes quite a difference.
the only time it really matters is when you're dealing with strings. for example, if you were invoking the .text() method and had a string with single quotes in it, you'd use the double quotes to wrap the string: .text("This is my string with the ' character."). if you wanted to use the single quotes to wrap the string here, you could, but you'd have to escape the quote character in the string: .text('This is my string with the \' character.'). the same applies the other way round too: .text('This is my string with " character.') and .text("This is my string with \" character.")
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:15
is this correct angular? I'm trying to find out if the problem is my app.js or my html
var myApp = angular.module('myApp', []);

myApp.controller('mainController', function() {

    this.handle = '';

    this.lowercasehandle = function() {
        return ('lowercase')(this.handle);
    };

    this.characters = 5;

    this.rules = [

        { rulename: "Must be 5 characters" },
        { rulename: "Must not be used elsewhere" },
        { rulename: "Must be cool" }

    ];

    console.log(this.rules);

});
GangstaCoder
@GangstaCoder
Nov 15 2015 12:20
@rivaanbechan Did you crack 187? i just got to it
mariocatch
@mariocatch
Nov 15 2015 12:30
@TheHighPriestess what problem are you seeing?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:30
well...nothing happens.
of course..the problem could be in my html..
mariocatch
@mariocatch
Nov 15 2015 12:31
@TheHighPriestess that is just an app and controller definition. nothing happens with those alone
@TheHighPriestess what is your html?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:31
<body>

        <header>
            <nav class="navbar navbar-default">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand" href="/">AngularJS</a>
                </div>

                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#"><i class="fa fa-home"></i> Home</a></li>
                </ul>
            </div>
            </nav>
        </header>

        <div class="container">

            <div ng-controller="mainController as mainCon">

                <div>
                    <label>What is your twitter handle?</label>
                    <input type="text" ng-model="handle" />
                </div>

                <div class="alert" ng-class="{ 'alert-warning': handle.length < characters, 'alert-danger': handle.length > characters }" ng-if="handle.length !== characters">

                    <div ng-show="handle.length < characters">
                        You have less than 5 characters!
                    </div>
                    <div ng-show="handle.length > characters">
                        You have more than 5 characters!
                    </div>

                </div>

                <hr />

                <h1>twitter.com/{{ this.lowercasehandle() }}</h1>

                <h3>Rules</h3>
                <ul>
                    <li ng-repeat="rule in rules">
                        {{ this.rule.rulename }}
                    </li>
                </ul>

            </div>

        </div>

    </body>
mariocatch
@mariocatch
Nov 15 2015 12:32
looks like you're not applying your ng-app to the html body
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:33
See....I'm using two difference sources to learn Angular....Codeschool and a course someone recommended. They do things differently...so I took this code and tried to modify it using Codeshool's way of doing things...to see if I understand it..and I clearly don't.
@mariocatch ok..that's weird...because it worked before I changed some things...and I didn't get rid of ng-app
mariocatch
@mariocatch
Nov 15 2015 12:34
does it work after you add it back in?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:34
ok..i found it..it's here: <html lang="en-us" ng-app="myApp">
so it is there
so that's not the problem..it is there
mariocatch
@mariocatch
Nov 15 2015 12:35
try adding it to the body instead of html tag
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:35
nothing happens..same thing
mariocatch
@mariocatch
Nov 15 2015 12:37
i'll have to test this out :) been over a yaer since i've touched angular
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:37
It's confusing. Codeschool goes way too fast..and this other course is way to theoretical
renren89
@renren89
Nov 15 2015 12:38
anyone using sublime text 3 know how to make lines seem infinite? Code sometimes end up a bit too long but I like having the code I am writing in the middle of my page
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:39
you mean...like having the code wrap?
renren89
@renren89
Nov 15 2015 12:43
not too sure what code wrap is tbh
never altered any settings on sublime before, except indentations
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 12:45
Is this what you're looking for perhaps?
Vince
@Vince33
Nov 15 2015 12:54
Hello every body !
was wondering if anyone has some knowledge on responsive imgs
?
Was having some trouble getting an image to fit the width of a parent container on small screen or iPhone 4 in emulator
renren89
@renren89
Nov 15 2015 12:59
@TheHighPriestess oh, didn't mean that I don't think. I want to be able to scroll down despite not having any code below when the code reaches the bottom of my screen
Vince
@Vince33
Nov 15 2015 13:01
@renren89 I think you can just add some space to the end of your file
or just hit return a couple times on the last line
Z.G.Hao
@akidox
Nov 15 2015 13:03
thanks a lot @h4r1m4u
CamperBot
@camperbot
Nov 15 2015 13:03
akidox sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 670 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
renren89
@renren89
Nov 15 2015 13:04
@Vince33 I am trying to customize it so I don't have to do that.
Vince
@Vince33
Nov 15 2015 13:04
ahh got you sorry didn't see the whole thread
GangstaCoder
@GangstaCoder
Nov 15 2015 13:15

Can anyone advise on 189 please? This is what I have:

newArray = array.reverse(function() {return newArray; });

Marius Garbea
@MariusGarbea
Nov 15 2015 13:28
hello guys!
i am trying to make an image slider but i can't get it to work
any help would be awesome!
Alexander Køpke
@alexanderkopke
Nov 15 2015 13:34
@GangstaCoder put var in front of newArray
GangstaCoder
@GangstaCoder
Nov 15 2015 13:35
@alexanderkopke i did...didnt paste fully.
var newArray = array.reverse(function(){
return newArray;
});
instructions a bit light on this one....
Coira Ellison
@Coira
Nov 15 2015 13:37
@GangstaCoder have a look here first https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse and see if yuo can work out how to use reverse
Alexander Køpke
@alexanderkopke
Nov 15 2015 13:37
Ah now I see just use array.reverse();
GangstaCoder
@GangstaCoder
Nov 15 2015 13:39
ha! That works!....who knew they wanted it so simple?...Thx
@Coira Thx...will go there
CamperBot
@camperbot
Nov 15 2015 13:39
gangstacoder sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 309 | @coira | http://www.freecodecamp.com/coira
GangstaCoder
@GangstaCoder
Nov 15 2015 13:39
@alexanderkopke Thx
CamperBot
@camperbot
Nov 15 2015 13:39
gangstacoder sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 227 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Coira Ellison
@Coira
Nov 15 2015 13:40
mdn's pretty useful if you have a function you don't know how to use
GangstaCoder
@GangstaCoder
Nov 15 2015 13:40
brownie points?....can you trade them for bitcoin or like cappucinos or something?
Coira Ellison
@Coira
Nov 15 2015 13:40
nope, can't even eat them!
GangstaCoder
@GangstaCoder
Nov 15 2015 13:42
will have to speak to "management" about this...
Mani
@maniprataprana
Nov 15 2015 13:44
friends checkout my campernews project
http://codepen.io/maniprataprana/pen/dYaoVy
jpjenkins
@jpjenkins
Nov 15 2015 13:45
has anyone found a good way to do Bonfire: truncate a string?
I have 3 if's
I don't like it
I feel I'm missing something that'd be more efficient
h4r1m4u
@h4r1m4u
Nov 15 2015 13:46
@akidox you're most welcome. i really appreciate your attitude, by the way. very thirsty for knowledge and open to advice at the same time. keep it up and you'll learn a ton in a very short time.
jpjenkins
@jpjenkins
Nov 15 2015 13:48
@h4r1m4u how did you end up solving truncate a string?
h4r1m4u
@h4r1m4u
Nov 15 2015 13:49
@jpjenkins with if/else as well
jpjenkins
@jpjenkins
Nov 15 2015 13:50
ahk, it's like all the others have little secret methods except this one
how's your tictactoe game coming along?
h4r1m4u
@h4r1m4u
Nov 15 2015 13:50
sometimes there isn't an elegant solution and you have to resort to the basics :)
haven't started tic tac toe yet
too much work lately
Z.G.Hao
@akidox
Nov 15 2015 13:51
thanks for saying that😁 @h4r1m4u
CamperBot
@camperbot
Nov 15 2015 13:51
akidox sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: akidox already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Nov 15 2015 13:51
@akidox thanks for being that way. makes helping you and others like you in the chat very rewarding
CamperBot
@camperbot
Nov 15 2015 13:51
h4r1m4u sends brownie points to @akidox :sparkles: :thumbsup: :sparkles:
:star: 160 | @akidox | http://www.freecodecamp.com/akidox
jpjenkins
@jpjenkins
Nov 15 2015 13:51
you're so close too! :)
h4r1m4u
@h4r1m4u
Nov 15 2015 13:52
yea! i powered through everything then work got in the way. and the tic tac toe feels substantial enough that i don't want to start it and then put it off again
want to find time to do it in one swing
Z.G.Hao
@akidox
Nov 15 2015 13:54
😊😊😊
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 13:59
Question about the full stack ziplines: How much time should I be spending attempting to learn Angular BEFORE I start on those ziplines? Codeschool's Angular course is very, very brief.
or rather...the full stack basejumps
jpjenkins
@jpjenkins
Nov 15 2015 14:17
@TheHighPriestess when did you start this course?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 14:21
@jpjenkins July, I think
jpjenkins
@jpjenkins
Nov 15 2015 14:22
Just asking because you seem to have made a lot of progress since the last time I saw you here :)
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 14:23
@jpjenkins oh...well, I made it all the way through the front-end part of it
but angular is totally new to me
I have learned a lot overall...
jpjenkins
@jpjenkins
Nov 15 2015 14:24
I was recommended a course, I sent you a link if you want to dig deep into angular
Yeah it's some amount of learning done in such a short amount of time
congrats :P
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 14:28
@jpjenkins well...I had a bit of a head start in that I already had some knowledge of front-end dev...but I still learned a lot
@jpjenkins thank you
CamperBot
@camperbot
Nov 15 2015 14:28
thehighpriestess sends brownie points to @jpjenkins :sparkles: :thumbsup: :sparkles:
:star: 227 | @jpjenkins | http://www.freecodecamp.com/jpjenkins
Bartosz
@Kwiatu
Nov 15 2015 14:53
hello
i have a question to you
at first waypoint of responsive web design i have to do "Make sure you have nested all HTML elements in .container-fluid." Which all html elements??
Majd900
@Majd900
Nov 15 2015 14:55
@Kwiatu All elements on the code/page.
Bartosz
@Kwiatu
Nov 15 2015 14:56
so i have to make example page??
i don't understand...
Majd900
@Majd900
Nov 15 2015 14:58
Just simply put all the tags in container-fluid.
Bartosz
@Kwiatu
Nov 15 2015 14:58
the tags from previos work?
h4r1m4u
@h4r1m4u
Nov 15 2015 14:59
@Kwiatu by HTML elements, they mean everything that's not in between your <style> and </style> tags
Majd900
@Majd900
Nov 15 2015 14:59
@Kwiatu Should be like this.
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

  .smaller-image {
    width: 100px;
  }
  .container-fluid {


  }
</style>
<div class="container-fluid">

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

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

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



<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  </div>
</form>
See the<div class="container-fluid"> came at the first ( After style )
Bartosz
@Kwiatu
Nov 15 2015 15:00
ok thank you, i understand now
Majd900
@Majd900
Nov 15 2015 15:01
;)
jpjenkins
@jpjenkins
Nov 15 2015 15:10
can someone enlighten me
why would this not work:
function mutation(arr) {
  var firstWord = arr[0].toLowerCase().split('');
  var secondWord = arr[1].toLowerCase().split('');

  secondWord.map(function(letter){
    if(firstWord.indexOf(letter) === -1){
      return false;
    }
  });
  return true;
}

mutation(["hello", "hey"]);
But this does:
function mutation(arr) {
  firstWord = arr[0].toLowerCase().split('');
  secondWord = arr[1].toLowerCase().split('');

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

    if (firstWord.indexOf(secondWord[i]) === -1) {
      return false;
    }

  } // close loop

  return true;
}

mutation(["hello", "hey"]);
isn't the map function at the top essentially the same as what I'm doing with the for-loop?
jpjenkins
@jpjenkins
Nov 15 2015 15:19
ah, because returning within map is actually trying to return a value back to the secondWord variable
Am I right? I think sooo
Molly Eichar
@terra-bites
Nov 15 2015 15:51
I'm sure it's simple, but what's my problem here? <div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2> </div>
<div class="col-xs-4"><a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div> ... they appear on the same line, as the task demands, so what am I missing? Anyone??
Jonathan
@jonathantimm
Nov 15 2015 16:02
hey all, does anyone see a problem with this code?
var motorBike = {

  // Only change code below this line.
    "wheels":2,
    "engines":1,
    "seats":1
};
I'm getting a parser error
Never mind guys. For some reason there was an extra closing bracket at the bottom of the page, that's why
Alem
@alemneh
Nov 15 2015 16:13
trying to print a list of the keys and values but line 8 in my javascript says json.map is not a function? http://codepen.io/alemneh/pen/WQLLqR
Coira Ellison
@Coira
Nov 15 2015 16:15
@alemneh map's only for arrays i think
Alem
@alemneh
Nov 15 2015 16:18
@Coira thats right I forgot thanks!
CamperBot
@camperbot
Nov 15 2015 16:18
alemneh sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 310 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Nov 15 2015 16:18
:)
Jait Jacob
@jaitjacob
Nov 15 2015 16:28
how does camperbot know when to send brownie points?
Jonathan
@jonathantimm
Nov 15 2015 16:31
when people say thanks @jaitjacob
CamperBot
@camperbot
Nov 15 2015 16:31
jonathantimm sends brownie points to @jaitjacob :sparkles: :thumbsup: :sparkles:
:star: 15 | @jaitjacob | http://www.freecodecamp.com/jaitjacob
Jait Jacob
@jaitjacob
Nov 15 2015 16:31
thanks @jonathantimm
CamperBot
@camperbot
Nov 15 2015 16:31
jaitjacob sends brownie points to @jonathantimm :sparkles: :thumbsup: :sparkles:
:star: 310 | @jonathantimm | http://www.freecodecamp.com/jonathantimm
Jait Jacob
@jaitjacob
Nov 15 2015 16:32
oh wow
thats cool
im new here :)
Alexander Køpke
@alexanderkopke
Nov 15 2015 16:32
camperbot is our guarding angel.. Watching our every move :sparkles:
it also has help functions
wiki
CamperBot
@camperbot
Nov 15 2015 16:33
usage:
wiki $topic info on that topic
topics for a list of topics
CaffeineQueen
@CaffeineQueen
Nov 15 2015 16:43
Is Gitter having a problem today? It keeps freezing on me
Marius Garbea
@MariusGarbea
Nov 15 2015 16:43
hi guys
how can i position a div in the middle of the page
both width and height
Nick Snow
@nicholasrsnow
Nov 15 2015 16:48
I need some help ... Waypoint: Make Unique Objects by Passing Parameters to our Constructor lets me pass with this code when it is asking for output "{wheels:3,seats:1,engines:2}" but the output shows "{wheels:4,seats:1,engines:1}".... what am i doing wrong to make it still show 4,1,1 for the output?

var Car = function() {
//Change this constructor
this.wheels = 4;
this.seats = 1;
this.engines = 1;
};

//Try it out here
var myCar = new Car(3,1,2);
var Car = function(wheels, seats, engines){
this.wheels = wheels;
this.seats = seats;
this.engines = engines;
};

// Only change code above this line

(function() {return JSON.stringify(myCar);})();

or is it a bug?
Alexander Køpke
@alexanderkopke
Nov 15 2015 16:53
seems like you repeat the constructor twice
the second var Car constructor is the right one.. this one lets you pass (3, 1, 2); when making an instance of the the Car constructor
the first constructor sets the default number of wheels to 4, seats to 1, etc.. the second constructor lets you set the number of wheels, seats, engines with: var myCar = new Car(3, 1, 2);
Nick Snow
@nicholasrsnow
Nov 15 2015 16:57
so is var Car = function(wheels, seats, engines) redundant?
Alexander Køpke
@alexanderkopke
Nov 15 2015 16:58
I would say the first one is redundant because you don't want a default setting of wheels, seats, engines
Delete or change the first one and move the second one up to the top
var Car = function(wheels, seats, engines){
this.wheels = wheels;
this.seats = seats;
this.engines = engines;
};
var myCar = new Car(3,1,2);
this will set myCar.wheels to 3, myCar.seats to 1, and myCar.engines to 2
GangstaCoder
@GangstaCoder
Nov 15 2015 17:02
@maniprataprana looks cool. I read a good article on it - How to get any job you want
Nick Snow
@nicholasrsnow
Nov 15 2015 17:04
@alexanderkopke Awesome, thanks for the help!
CamperBot
@camperbot
Nov 15 2015 17:04
nicholasrsnow sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 228 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:04
:+1:
Alem
@alemneh
Nov 15 2015 17:11
Chrome google is giving me issues with getting my geolocation and I enabled it in the dev tools has anyone had the same issue?
Johnathon Sykes
@seesykescode
Nov 15 2015 17:17

needing a little bit of help trying to remove spaces with .replace() on Bonfire: Check for Palindrones

I would have thought this would have worked with the expresison I used
'''
str=str.toLowerCase().replace(/^\w\s/g);
'''

CamperBot
@camperbot
Nov 15 2015 17:17
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Johnathon Sykes
@seesykescode
Nov 15 2015 17:18
oops
Molly Eichar
@terra-bites
Nov 15 2015 17:18
Can anybody debug this for me: <input type="text form-control" placeholder="cat photo URL" required>
<button class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
</div>
Johnathon Sykes
@seesykescode
Nov 15 2015 17:19

lets try that again

needing a little bit of help trying to remove spaces with .replace() on Bonfire: Check for Palindrones

I would have thought this would have worked with the expresison I used

str=str.toLowerCase().replace(/^\w\s/g);

but spaces are still showing up. Im sure I'm going about this wrong but i guess my lack of understanding on regex is sorta blocking the answer for me.

CamperBot
@camperbot
Nov 15 2015 17:19
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Johnathon Sykes
@seesykescode
Nov 15 2015 17:19
bonfire check for palindromes
CamperBot
@camperbot
Nov 15 2015 17:19

:fire:Bonfire: Check for Palindromes :link:

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



palindrome("eye");

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

more info:  bf details | bf links | hint

Johnathon Sykes
@seesykescode
Nov 15 2015 17:20
@terra-bites which lession is this?
Lesson even :/ need more coffee
BrancePearson
@BrancePearson
Nov 15 2015 17:25
I am on the Slot machine waypoint and I am confused as to how I assign the slots a number.
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:27
ok you see that the slotOne, slotTwo, slotThree variables have been created at the top?
they have var in front of them
BrancePearson
@BrancePearson
Nov 15 2015 17:27
Yep
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:28
and in the instructions you see the formula for producing a random number
now you must equate those two like so: slotOne = Math.floor(Math.random() * (3-1+1)) +1;
and so on
do that with all three variables
BrancePearson
@BrancePearson
Nov 15 2015 17:29
That's it!? That seems to easy.
haha
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:29
xD
the hard part is usually knowing how
BrancePearson
@BrancePearson
Nov 15 2015 17:30
I guess I'm making this harder then it has to be on myself.
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:30
we all do that
BrancePearson
@BrancePearson
Nov 15 2015 17:30
@alexanderkopke Thanks! Cheers!
CamperBot
@camperbot
Nov 15 2015 17:30
brancepearson sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 229 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 15 2015 17:30
:+1:
CoderCal
@CoderCal
Nov 15 2015 17:37
' @bryan-hatton What does that mean?
Manish Giri
@Manish-Giri
Nov 15 2015 17:51
Uncaught TypeError: arr.includes is not a function
    at remove (<anonymous>:3:8)
    at <anonymous>:2:12
    at Object.InjectedScript._evaluateOn (<anonymous>:875:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:808:34)
    at Object.InjectedScript.evaluate (<anonymous>:664:21)
any idea why includes doesn't work
jaspreetpreety
@jaspreetpreety
Nov 15 2015 17:52
i am not sure what i am doing wrong, when applying a class to image, there are multiple classes and it is only displaying the first class for image
Coira Ellison
@Coira
Nov 15 2015 17:53
@Manish-Giri more code? are you sure arr is an array?
Manish Giri
@Manish-Giri
Nov 15 2015 17:54
var arr = [1,2,3,4,5];
function remove(n) {
if(arr.includes(n)) {
return false; }
return true;
}
arr.filter(remove);
@Coira I was thinking that function remove() will know what arr is
CoderCal
@CoderCal
Nov 15 2015 17:56
how u take the picture
Manish Giri
@Manish-Giri
Nov 15 2015 17:57
@CoderCal do you mean the formatted code?
CoderCal
@CoderCal
Nov 15 2015 17:58
i geuss?
like its plain text, but has colors
var arr = [1,2,3,4,5];
function remove(n) {
if(arr.includes(n)) {
return false; }
return true;
}
arr.filter(remove);
Manish Giri
@Manish-Giri
Nov 15 2015 17:58
it's not a picture. I formatted it with three backticks
CoderCal
@CoderCal
Nov 15 2015 17:59
nvm
Manish Giri
@Manish-Giri
Nov 15 2015 17:59
see the markdown help for more
CoderCal
@CoderCal
Nov 15 2015 17:59

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

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

<img src="http://bit.ly/fcc-running-cats" class="img-responsive">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary">Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info">Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger">Delete</button>
</div>
</div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>

Iyare Usen
@Iyare
Nov 15 2015 17:59
what is bootstrap really all about?...I don't get the concept
cnkramer
@cnkramer
Nov 15 2015 18:00
I'm getting stuck on the Waypoint: Make Instances of Objects with a Constructor Function challenge
CoderCal
@CoderCal
Nov 15 2015 18:00
whats the number
cnkramer
@cnkramer
Nov 15 2015 18:00
I've got all the items checked besides The property nickname of myCar should be a string.
CoderCal
@CoderCal
Nov 15 2015 18:00
like what number challenge
Coira Ellison
@Coira
Nov 15 2015 18:00
@Manish-Giri oh hm, version of chrome i'm using is 46, and needs 47
check your version of chrome?
CoderCal
@CoderCal
Nov 15 2015 18:00
Any other kids wanna pair with me?
cnkramer
@cnkramer
Nov 15 2015 18:01
173
CoderCal
@CoderCal
Nov 15 2015 18:01
k
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:02
Thanks coderCal. But how do i have both classes applied to my image - thick-green-border and smaller-image?
unfortunately, whatever class i have it first in order before my src, it is only capturing that
Rex Schrader
@SaintPeter
Nov 15 2015 18:03
@jaspreetpreety Are you sure that you're closing your class definition properly?
@jaspreetpreety IE: .classname { /* CSS Here */ }
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:04

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

}
</style>

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

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

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

CoderCal
@CoderCal
Nov 15 2015 18:04
u type
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:05

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

}
</style>

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

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

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

CoderCal
@CoderCal
Nov 15 2015 18:05
<img class="thick-green-border smaller-image"><img src="url">
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:06
ok, thanks. let me try that
CoderCal
@CoderCal
Nov 15 2015 18:06
ur welcome
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:07
thanks. it worked. so i believe i didnt need '"' before all the classes
thanks i was a big help
CoderCal
@CoderCal
Nov 15 2015 18:07
no
for example
cnkramer
@cnkramer
Nov 15 2015 18:07
@CoderCal nevermind, figured my issue out :smile:
CoderCal
@CoderCal
Nov 15 2015 18:07
<blablabla class=" class 1 class 2 class 3"
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:09
thanks @CoderCal
CamperBot
@camperbot
Nov 15 2015 18:09
jaspreetpreety sends brownie points to @codercal :sparkles: :thumbsup: :sparkles:
:star: 85 | @codercal | http://www.freecodecamp.com/codercal
Matt Leonard
@matty22
Nov 15 2015 18:13
Can someone explain the relationship between jQuery that's at the bottom of my index.html page and how I can use that to call Js from an external file?
Diego Ingaramo
@diegoingaramo
Nov 15 2015 18:21
Hi code campers, how are you doing ?
Alem
@alemneh
Nov 15 2015 18:24
I tried to grab info from the openweather api when I made an api call how do I select the value of weather i tried json.list.weather.main but the console says that weather is not defined? http://codepen.io/alemneh/pen/WQLLqR
@diegoingaramo Welcome!
Majd900
@Majd900
Nov 15 2015 18:27
oh god just realized how jquery is so difficult
if jquery is hard af... then i wonder how js will be *_^?
renren89
@renren89
Nov 15 2015 18:34
@matty22 do you mean you want jquery to call another .js file?
Paul de Wouters
@pdewouters
Nov 15 2015 18:37
Alem
@alemneh
Nov 15 2015 18:39
@pdewouters Thanks! very helpful!
CamperBot
@camperbot
Nov 15 2015 18:39
alemneh sends brownie points to @pdewouters :sparkles: :thumbsup: :sparkles:
:star: 233 | @pdewouters | http://www.freecodecamp.com/pdewouters
Matt Leonard
@matty22
Nov 15 2015 18:48

@renren89 Well Ive decided to go another route, but I still can't get a jQuery click event to run other JS. Here's my codepen

http://codepen.io/matty22/pen/RWvroq

Rex Schrader
@SaintPeter
Nov 15 2015 18:50
@matty22 Javascript is not being loaded on your page. Check your dev console.
@matty22 You can add the script includes in the settings page, under Javascript.
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:51
another ignorant question
I am struggling with Your p element should have the text "View more " (with a space after it).
Rex Schrader
@SaintPeter
Nov 15 2015 18:52
@matty22 None of elements in your <head> can be loaded from there. Especially since they are shown as local/relative urls, like css/bootstrap.min.css
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:52
i cant get it right with a element
Matt Leonard
@matty22
Nov 15 2015 18:52
Ahh...I should add that I've stuck it in codepen just for sharing. I'm doing this locally.
Rex Schrader
@SaintPeter
Nov 15 2015 18:52
@jaspreetpreety Can you share just the p elemtn with us here?
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:52

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

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

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

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

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

Rex Schrader
@SaintPeter
Nov 15 2015 18:54
@jaspreetpreety View More must be inside the same <p> element as the anchor tag. See this tag:
<a href="http://www.freecatphotoapp.com">cat photos</a>?
Wrap IT in P tags, with the text. Don't create a new link.
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:55
<p> <a href = "http://www.freecatphotoapp.com"> </a> View more </p>
unfortunately, this doesnt work either
Matt Leonard
@matty22
Nov 15 2015 18:57
@jaspreetpreety You needn't have added a second <a> tag that's the same as the one already existent in your code two lines above it. Remove the duplicate.
Rex Schrader
@SaintPeter
Nov 15 2015 18:58
@jaspreetpreety View More goes before the link. You also either removed or didn't place the link text of cat photos. This should be included verbatium inside your p element:
<a href="http://www.freecatphotoapp.com">cat photos</a>
@jaspreetpreety Do this: Reset your code.
@jaspreetpreety THEN, add a p tag AROUND the existing link element
jaspreetpreety
@jaspreetpreety
Nov 15 2015 18:59
thanks. it worked. sorry I know they are quite ignorant questions
but cant help
Michael Randell
@MichaelRandell
Nov 15 2015 19:00
var flip = Math.floor(Math.random() (1 - 0 + 1)) + 0; *Can someone explain this line of code for me? It is for a coin flip game
thanks~
Rex Schrader
@SaintPeter
Nov 15 2015 19:01
@MichaelRandell random returns a decimal fraction between 0 and 1, IE: 0.2342 or 0.63434. We need to turn that into an integer, either a solid 0 or a solid 1
Michael Randell
@MichaelRandell
Nov 15 2015 19:02
ohh ok, the random is between 0 and 1 then....ok thanks @SaintPeter
CamperBot
@camperbot
Nov 15 2015 19:02
michaelrandell sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1544 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Nov 15 2015 19:02
@MichaelRandell What the code does is multiplies the faction by 2, then rounds down. If the fraction is less than 0.5, the whole number will be less than 1, and rounded down to 0, if the number is 0.5 or greater, the whole number will be rounded down to 1.
Michael Randell
@MichaelRandell
Nov 15 2015 19:07
I see....! Great.Thanks @SaintPeter
CamperBot
@camperbot
Nov 15 2015 19:07
michaelrandell sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: michaelrandell already gave saintpeter points
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:21
hello guys i need some help with javascript, anyone available?
Paul de Wouters
@pdewouters
Nov 15 2015 19:26
@AnbuKakashi shoot
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:26
im stuck on the last 3 challenges
add your javascript slots
that challenge
im really not sure what to do since im not sure is tge machine code supposed to load
i cant see the slot machine or the code
its liek this
Paul de Wouters
@pdewouters
Nov 15 2015 19:29
can you click the reset button?
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:31
lol it loaded the code, ill rty to solve it now, if i cant ill ask here
thank you @pdewouters
CamperBot
@camperbot
Nov 15 2015 19:31
anbukakashi sends brownie points to @pdewouters :sparkles: :thumbsup: :sparkles:
:star: 234 | @pdewouters | http://www.freecodecamp.com/pdewouters
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:38
Is it possible to upload a screenshot here for a question?
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:39
you have to make one , save it then drag it to chat
Rex Schrader
@SaintPeter
Nov 15 2015 19:39
@TheHighPriestess Yes, use something like the windows 7 snipping tool, then copy and paste it in.
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:39
or take a picture with gyazo or smthn similar
Rex Schrader
@SaintPeter
Nov 15 2015 19:39
@TheHighPriestess just ctrl-v will paste.
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:39
i drag it here?
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:39
yeah wher u type
Rex Schrader
@SaintPeter
Nov 15 2015 19:39
@TheHighPriestess or paste it
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:39
ok...let me try
Joe
@JoeBello
Nov 15 2015 19:40
Hello all, I think may have found an issue (more of a typo than a bug), unless I'm not understanding correctly. As far as I've read I'm supposed to bring said issue here.
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:40
i have it saved as a file
AnbuKakashi
@AnbuKakashi
Nov 15 2015 19:40
drag it to where you type
Rex Schrader
@SaintPeter
Nov 15 2015 19:41
@UsernameWasTaken Yup - can you share the waypoint name and your code?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:41
Untitled-1.png
This message was deleted
oops...sorry...did that twice
my question is....
Rex Schrader
@SaintPeter
Nov 15 2015 19:42
@TheHighPriestess You can delete a message you don't want by hovering over the ... to the right of the message.
Joe
@JoeBello
Nov 15 2015 19:42
@SaintPeter Sorry, accidentally exited. It's Bonfire: Where Do I Belong?
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:42
in the .js file it's not "review"....it's "reviews". Where did "review"(singular) come from?
Joe
@JoeBello
Nov 15 2015 19:42
and my issue is that one of the examples given is: "Likewise, where([20,3,5], 19) should return 2 because it is less than 20 (index 2) and greater than 5 (index 1)."
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:43
the object has a property called "reviews"
Joe
@JoeBello
Nov 15 2015 19:43
Now I thought, based on the example result, that the example array should be [3,5,20], and not [20,3,5].
Elizabeth Hatleli
@TheHighPriestess
Nov 15 2015 19:43
this is difficult to explain...
it's from CodeSchool
Ed Sztukowski
@Burgustu
Nov 15 2015 19:44
Can anyone give me some hints on bf Mutations
bf mutations
CamperBot
@camperbot
Nov 15 2015 19:44

:fire:Bonfire: Mutations :link:

function mutation(arr) {
  return arr;
}

mutation(['hello', 'hey']);

Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.

more info:  bf details | bf links | hint

Ed Sztukowski
@Burgustu
Nov 15 2015 19:44
I feel like I’m almost there
but am having difficulty closing it out
Rex Schrader
@SaintPeter
Nov 15 2015 19:45
@UsernameWasTaken You're right, that does look like a bug. At very least it's confusing. 20 is not index 2. Go ahead and file an issue (use the bug button) and we'll get it fixed.
Joe
@JoeBello
Nov 15 2015 19:45
Cool. Thanks for the help.
Ed Sztukowski
@Burgustu
Nov 15 2015 19:45
here’s my code…i have it pushing into an emptyArray to just check that it’s working correctly, but don’t know how to write the code so it returns true or false
Rex Schrader
@SaintPeter
Nov 15 2015 19:45
@UsernameWasTaken Be sure to give your example, explanation. Thanks for bringing it here first.
CamperBot
@camperbot
Nov 15 2015 19:45
saintpeter sends brownie points to @usernamewastaken :sparkles: :thumbsup: :sparkles:
:star: 201 | @usernamewastaken | http://www.freecodecamp.com/usernamewastaken
Ed Sztukowski
@Burgustu
Nov 15 2015 19:45
// JavaScript Document

function mutation(arr) {

  var emptyArray = [];
  var falseArray = [];

    for (var i = 0; i < arr[1].length; i++) {
      if (arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase() > -1 )) {
      emptyArray.push(arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase()));
    } 

 }


  return emptyArray;
}

mutation(["hello", "hey"]);
As I have it now, emptyArray will return the correct numbers I’m expecting
but I’ve been trying for about 45 minutes now to take that info and return true/false with it, depending if the array contains all positive or negative numbers
Cosimo Bressi
@cbressijr
Nov 15 2015 19:49

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

ourArray.pop(); // ourArray now equals ["Stimpson", "J"]

ourArray.push(["happy", "joy"]); // ourArray now equals ["Stimpson", "J", ["happy", "joy"]]

var myArray = ["John", 23, ["cat", 2]];

myArray.pop();

// Only change code below this line.

myArray.push("dog", 3);

// Only change code above this line.

(function(z){return 'myArray = ' + JSON.stringify(z);})(myArray);

Any ideas what I missed? there.
Christina
@christhemoviegeek
Nov 15 2015 19:51
hi all, can anyone help with everything is true bonfire?
jpjenkins
@jpjenkins
Nov 15 2015 19:52
@Burgustu try:
var emptyArray = emptyArray.push(arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase()));
Ed Sztukowski
@Burgustu
Nov 15 2015 19:53
@jpjenkins That’s what I have currently
I need to find a way to check that all of the indexes of emptyArray are positive
and that if any of them are negative, it should return false
jpjenkins
@jpjenkins
Nov 15 2015 19:53
well, first
i would take all those functions out the loop
Ed Sztukowski
@Burgustu
Nov 15 2015 19:54
oh I see
jpjenkins
@jpjenkins
Nov 15 2015 19:54
makes it incredibly confusing to decipher what's happening each iteration
Plus, not v efficient :)
codedawg
@khandawg
Nov 15 2015 19:55
hello world
CamperBot
@camperbot
Nov 15 2015 19:55

welcome to FreeCodeCamp @khandawg!

jpjenkins
@jpjenkins
Nov 15 2015 19:55
.indexOf(arr[1][i]
what's that?
and why have you got a 'falsearray'?
lots of confusing things going on there :) tidy it up n if you don't have it then I'll have a look
you have the right idea
Ed Sztukowski
@Burgustu
Nov 15 2015 19:57
delete falseArray, that was leftover. My bad! indexOf(arr[1][i] looks at the second index of arr and the first letter of that.
jpjenkins
@jpjenkins
Nov 15 2015 19:57
does it?
renren89
@renren89
Nov 15 2015 19:58
@jpjenkins ya it's a little hard to read
renren89
@renren89
Nov 15 2015 19:58
what is the exact goal here? I couldn't pick it up in the previous posts
Ed Sztukowski
@Burgustu
Nov 15 2015 19:58
well the first, then second, then third, etc etc
jpjenkins
@jpjenkins
Nov 15 2015 19:59
it's the bonfire: mutations
Ed Sztukowski
@Burgustu
Nov 15 2015 19:59
bf mutations
CamperBot
@camperbot
Nov 15 2015 19:59

:fire:Bonfire: Mutations :link:

function mutation(arr) {
  return arr;
}

mutation(['hello', 'hey']);

Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.

more info:  bf details | bf links | hint

Arifuzzaman-Arif
@Arifuzzaman-Arif
Nov 15 2015 20:00
Hello everyone, I just have joined here
Christina
@christhemoviegeek
Nov 15 2015 20:02
how to post code?
Ed Sztukowski
@Burgustu
Nov 15 2015 20:02
type ```
then end it with ```
Christina
@christhemoviegeek
Nov 15 2015 20:03
var sample = "code";
@Burgustu thank you!!!
CamperBot
@camperbot
Nov 15 2015 20:03
christhemoviegeek sends brownie points to @burgustu :sparkles: :thumbsup: :sparkles:
:star: 208 | @burgustu | http://www.freecodecamp.com/burgustu
jpjenkins
@jpjenkins
Nov 15 2015 20:06
explain format
CamperBot
@camperbot
Nov 15 2015 20:06

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

Joel Jensen
@jcjensenjr
Nov 15 2015 20:07
having trouble with waypoint
Christina
@christhemoviegeek
Nov 15 2015 20:09
var sample = 'code';
var mits = 'jelly';
Majd900
@Majd900
Nov 15 2015 20:15
Hello guys :D!
How's coding yo ^_^?
Wonkun Kim
@wongni
Nov 15 2015 20:18
How do I nest an 'i' component in my button element?
  <button class="btn btn-block btn-primary"><i class="fa fa-thumb-up"></i>Like</button>
this doesn't work for me
Majd900
@Majd900
Nov 15 2015 20:18
Guys, why whenever i write a jquery code it says "missing ) after argument list"
Rex Schrader
@SaintPeter
Nov 15 2015 20:18
@wongni That looks rightish to me
@Majd900 Sample code?
Majd900
@Majd900
Nov 15 2015 20:19
@SaintPeter ?
Rex Schrader
@SaintPeter
Nov 15 2015 20:19
@Majd900 Sorry, can you share your code? We can't tell you where you're missing a ) unless we can see it
Majd900
@Majd900
Nov 15 2015 20:20
@SaintPeter Oh nvm fixed it, thanks :D
CamperBot
@camperbot
Nov 15 2015 20:20
majd900 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1551 | @saintpeter | http://www.freecodecamp.com/saintpeter
SaintPeter @SaintPeter bows
Aleksander Gębicki
@Takumar
Nov 15 2015 20:20
@wongni you can enter one space before "Like" to separate thumbs-up icon from text:></i> Like<, it looks better.
Wonkun Kim
@wongni
Nov 15 2015 20:21
@Takumar I missed 's' at the end of 'thumb' lol Thanks anyway
CamperBot
@camperbot
Nov 15 2015 20:21
wongni sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 770 | @takumar | http://www.freecodecamp.com/takumar
Marcos Ostria
@compsci78
Nov 15 2015 20:21
@jcjensenjr What is your problem?
Joel Jensen
@jcjensenjr
Nov 15 2015 20:21
@compsci78 nevermind i figured it out. thankyou for responding
Majd900
@Majd900
Nov 15 2015 20:22
What is the use of "remove" in jquery... i can just simply remove it from HTML
Any specific function?
Ryne Richardson
@RyneRichardson
Nov 15 2015 20:23
Can't seem to "nest your text input element within a form element"
Aleksander Gębicki
@Takumar
Nov 15 2015 20:23
@Majd900 you can select an element and dynamically remove it from your page i.e. after clicking button.
Marcos Ostria
@compsci78
Nov 15 2015 20:24
@Majd900 You are removing an element so it would need to reference an element on the page.
Rex Schrader
@SaintPeter
Nov 15 2015 20:24
@Majd900 If you're trying to dynamically alter a page, it may make sense to remove HTML from the page.
Majd900
@Majd900
Nov 15 2015 20:24
@Takumar @compsci78 @SaintPeter Oh Okay thanks fellas ;o
CamperBot
@camperbot
Nov 15 2015 20:24
majd900 sends brownie points to @takumar and @compsci78 and @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: majd900 already gave saintpeter points
:star: 278 | @compsci78 | http://www.freecodecamp.com/compsci78
:star: 772 | @takumar | http://www.freecodecamp.com/takumar
CaffeineQueen
@CaffeineQueen
Nov 15 2015 20:25
Where can I add in somewhere to lower case or ignore case?
function mutation(arr) {




  var str0 = arr[0];  //hello
  var str1 = arr[1];  //hey

  arr0 = str0.split('');  //h e l l o
  arr1 = str1.split('');  //h e y

var answer = [];
  for(var i = 0; i < arr1.length; i++)
  answer.push(arr0.indexOf(arr1[i]));




  if (answer.indexOf(0) === -1) 
  {return true;
} else {
  return false;
}
}
mutation(["Alien", "line"]);
Majd900
@Majd900
Nov 15 2015 20:26
Guys if .clone() between the brackets is empty.. what does it mean?
CaffeineQueen
@CaffeineQueen
Nov 15 2015 20:26
or figure out where I went wrong
Marcos Ostria
@compsci78
Nov 15 2015 20:26
@CaffeineQueen I would do it before assigning it to your str variables or right after the assignment.
Aleksander Gębicki
@Takumar
Nov 15 2015 20:27
@CaffeineQueen you can do it i.e here. :arr0 = str0.toLowerCase().split('');
Rex Schrader
@SaintPeter
Nov 15 2015 20:27
@CaffeineQueen When you split those out into str0 and str1, just add toLowerCase()
Marcos Ostria
@compsci78
Nov 15 2015 20:28
@CaffeineQueen @Takumar's solution reduces lines of code too. :)
CaffeineQueen
@CaffeineQueen
Nov 15 2015 20:28
@Takumar that worked
thank you @Takumar
CamperBot
@camperbot
Nov 15 2015 20:28
caffeinequeen sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 773 | @takumar | http://www.freecodecamp.com/takumar
Marcos Ostria
@compsci78
Nov 15 2015 20:29
@Takumar I love chaining!
Aleksander Gębicki
@Takumar
Nov 15 2015 20:29
@compsci78 :-)
Majd900
@Majd900
Nov 15 2015 20:30
Guys if i put this ("background-color""blue"); .. not like this ("background-color", "blue"); would it stay the same?
Rex Schrader
@SaintPeter
Nov 15 2015 20:30
@Majd900 You need the comma because its two seperate arugments passed tot he function
@Majd900 the first argument is the attribute, the second argument is the value
Majd900
@Majd900
Nov 15 2015 20:31
@SaintPeter Oh but i just tried with the comma.. it worked.
CaffeineQueen
@CaffeineQueen
Nov 15 2015 20:31
I'm so close
Justin Dieter
@JDieter12
Nov 15 2015 20:32
Anyone good with ASP.net and all of that stuff?
Majd900
@Majd900
Nov 15 2015 20:33
$("#left-well").parent().css("background-color", "red");
Irina
@2Irina2
Nov 15 2015 20:33
Hello!
Majd900
@Majd900
Nov 15 2015 20:33
And says i have to make the background red where it's already red.
Irina
@2Irina2
Nov 15 2015 20:33
Could anyone help me with my portfolio webpage?
CaffeineQueen
@CaffeineQueen
Nov 15 2015 20:33
Yay!! I finished Mutations!!
Aleksander Gębicki
@Takumar
Nov 15 2015 20:34
@Majd900 is it background colour of parent of left-well?
Majd900
@Majd900
Nov 15 2015 20:34
@Takumar Oh nvm :D fixed it.
Irina
@2Irina2
Nov 15 2015 20:34
It's almos done. I just can't seem to contract all the 4 buttons in the navigation bar into one
Majd900
@Majd900
Nov 15 2015 20:34
@Takumar Called out for #target1 not #left-well
Rex Schrader
@SaintPeter
Nov 15 2015 20:35
@2Irina2 OMG, I am in love with your colors!
@2Irina2 That top image is amazing.
Irina
@2Irina2
Nov 15 2015 20:35
Ah thank you! Yes I've always loved the red and black combination :)
Majd900
@Majd900
Nov 15 2015 20:35
@2Irina2 Wow nice website :D!
Irina
@2Irina2
Nov 15 2015 20:36
You can go through the code and find its URL. Got it from google :D
Rex Schrader
@SaintPeter
Nov 15 2015 20:36
@2Irina2 You mean you want them to be conjoined? Like one continious button?
Irina
@2Irina2
Nov 15 2015 20:36
Yes, I want them to become one single button and it would be nice to have a drop down menu once you click on it
Majd900
@Majd900
Nov 15 2015 20:36
@2Irina2 But how did you do this.. the hovering thing
?
Ryne Richardson
@RyneRichardson
Nov 15 2015 20:37
can i get some help nesting a text input element within a form element?
Irina
@2Irina2
Nov 15 2015 20:37
I tried looking on the example code and did my best but still i have no idea what's not right
@Majd900 what hover thingy? ^_^
Majd900
@Majd900
Nov 15 2015 20:38
@2Irina2 The picture :clap: :D
@2Irina2 You need the Bootstrap.js to get these, I think
Irina
@2Irina2
Nov 15 2015 20:39
@Majd900 I got the link from google and applied a black mask over it with 0.something transparency
Majd900
@Majd900
Nov 15 2015 20:39
@2Irina2 Oh cool :D!!
@2Irina2 Since when you started to learn coding?
Irina
@2Irina2
Nov 15 2015 20:40
@Majd900 thanks
CamperBot
@camperbot
Nov 15 2015 20:40
2irina2 sends brownie points to @majd900 :sparkles: :thumbsup: :sparkles:
:star: 120 | @majd900 | http://www.freecodecamp.com/majd900
Irina
@2Irina2
Nov 15 2015 20:40
@SaintPeter thank you for the link.. I'll look through it :)
CamperBot
@camperbot
Nov 15 2015 20:40
2irina2 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 1552 | @saintpeter | http://www.freecodecamp.com/saintpeter
Justin Dieter
@JDieter12
Nov 15 2015 20:40
I have a homework assignment, and it is on something that they didn’t teach, and I have no clue about. I was hoping someone could help point me in the write direction…… "Edit the Week One login page to be able to take on server-side processing by incorporating it into a .NET solution. Create one method that the server takes a piece of code or data from the user client-side, manipulates it server side after post back, and then provides the manipulated data back to the user."
Majd900
@Majd900
Nov 15 2015 20:40
Guys what is $(".target:nth-child(3)")
Irina
@2Irina2
Nov 15 2015 20:40
@Majd900 Well.. I joined FreeCodeCamp this summer and i fell in love with it
Majd900
@Majd900
Nov 15 2015 20:40
@2Irina2 Oh like 4-6 months?
I know that this $(".target:nth-child(3)") is a selector but what is nth ?
Irina
@2Irina2
Nov 15 2015 20:42
@Majd900 My first completed waypoint : 10 July :D
Ed Sztukowski
@Burgustu
Nov 15 2015 20:44
nth is whatever is in the parenthesis
Majd900
@Majd900
Nov 15 2015 20:46
wow i'm so bad in jquery .. check this hahaha
$("#target2:button-child()").addClass("animated bounce");
Alexander Køpke
@alexanderkopke
Nov 15 2015 20:52
does it work?
Majd900
@Majd900
Nov 15 2015 20:54
@alexanderkopke No :(
I will never understand jquery, it's extremely hard.
Z.G.Hao
@akidox
Nov 15 2015 20:54
Is
Majd900
@Majd900
Nov 15 2015 20:55
I don't even know what is representing inside the paranthesis
I think ill go with youtube first before continuing my waypoints :panda_face:
Alexander Køpke
@alexanderkopke
Nov 15 2015 20:57
this is what mine looks like but I don't know if it is the same lesson
$('.target:nth-child(2)').addClass('animated bounce');
Majd900
@Majd900
Nov 15 2015 20:57
Codecademy is good for learning Jquery?
Cosimo Bressi
@cbressijr
Nov 15 2015 20:58
Test
Alexander Køpke
@alexanderkopke
Nov 15 2015 20:58
try it and then come back.. can't hurt to "shop" around :)
Majd900
@Majd900
Nov 15 2015 20:59
@alexanderkopke Haha have you ever tried it?
Alexander Køpke
@alexanderkopke
Nov 15 2015 20:59
yeah but I don't remember any of it because long ago
Cosimo Bressi
@cbressijr
Nov 15 2015 21:00
I entered the array and I am certain it is correct, any ideas? ''' myArray.push("dog", 3);'''
CamperBot
@camperbot
Nov 15 2015 21:00
:bulb: to format code use backticks! ``` more info
Cosimo Bressi
@cbressijr
Nov 15 2015 21:00
Nvm> I found my error.
travis
@tmack23
Nov 15 2015 21:02
kj
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:04
@Majd900 ok I just looked at codecademy and it says I was doing jQ there 2 years ago lol
Majd900
@Majd900
Nov 15 2015 21:04
@alexanderkopke Haha wow
:D
@alexanderkopke Do you find that JQ is easy?
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:06
not really but I finished the codecademy course.. it is estimated to take 3 hours to finish I read just now
Majd900
@Majd900
Nov 15 2015 21:06
Alright ill head over to sleep, 1;05 nighty here :p cya
wow
:D
thats too short
are you sure?
haha ok then ill try codecademy tmw @alexanderkopke thanks for your help :D!!!!!
CamperBot
@camperbot
Nov 15 2015 21:07
majd900 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 230 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:07
sleep well! :)
David Madrigal
@dsinjm
Nov 15 2015 21:08
I am having trouble with <h2 style="color: blue">CatPhotoApp</h2>. It says to change the color to red. I did that and it keeps on saying to change my h2 element to red.
travis
@tmack23
Nov 15 2015 21:08
njj
Cosimo Bressi
@cbressijr
Nov 15 2015 21:10
<h2 style="color: red">CatPhotoApp</h2> so it is like this in your editor?
David Madrigal
@dsinjm
Nov 15 2015 21:11
Yeah
Still says that it is wrong.
Ashraf Patel
@AshrafPatel
Nov 15 2015 21:11
hello im doing the java bit and im on now consructors i got a question so far i done variables strings now constructors i dont know when to use each one though any help?
Aleksander Gębicki
@Takumar
Nov 15 2015 21:12
@dsinjm do you still have to use inline style, or maybe it should be in external section: <style> ... </style> which waypoint it is?
@dsinjm or maybe you miss only semicolon style="color: red;"
Cosimo Bressi
@cbressijr
Nov 15 2015 21:12
@dsinjm Yeh. it may be missing something.
Cornita Pinchinat
@orkist
Nov 15 2015 21:14
Hello I am stuck trying to do Waypoint: Target Elements by Class Using jQuery.
David Madrigal
@dsinjm
Nov 15 2015 21:14
I'll try it again .Thanx. It is the CatPhotoApp waypoint.
Ashraf Patel
@AshrafPatel
Nov 15 2015 21:15
hello im doing the java bit and im on now consructors i got a question so far i done variables strings now constructors i dont know when to use each one though any help?
Z.G.Hao
@akidox
Nov 15 2015 21:15
Is gitter based on Let’s Chat?
Aleksander Gębicki
@Takumar
Nov 15 2015 21:16
@dsinjm do you still have paragraph <p> with Kitty ipsum. You haven't removed anything from code? I checked the waypoint and it works with or without semicolon.
David Madrigal
@dsinjm
Nov 15 2015 21:17
yeah I still have the paragraph. The code is still intact.
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:17
@orkist what does your code look like and what is the problem?
Aleksander Gębicki
@Takumar
Nov 15 2015 21:18

@dsinjm maybe it will be faster to use "Reset" button, clear your code and add "style" again. I don't see any place where error may hide.
you have:

<h2>..</h2>
<p>...</p>

and that's all.

Cornita Pinchinat
@orkist
Nov 15 2015 21:19
@alexanderkopke I figured out how to get the question correct
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
});
</script>
Michael Randell
@MichaelRandell
Nov 15 2015 21:20
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">'); @question: Why am I all of a sudden using '... ' instead of "..."? @ compared to exercise before---->$($(".slot")[0]).html(slotOne);
Cornita Pinchinat
@orkist
Nov 15 2015 21:20
but I don't understand why I am using $(".well")
here and used $("button") before
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:20
.well is selecting the class well
"button" selects the buttons
Cornita Pinchinat
@orkist
Nov 15 2015 21:21
so were adding a class to a class?
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:21
yes
Cornita Pinchinat
@orkist
Nov 15 2015 21:21
okay thank you!
Alexander Køpke
@alexanderkopke
Nov 15 2015 21:22
:)
Cornita Pinchinat
@orkist
Nov 15 2015 21:22
@alexanderkopke Thank You!
CamperBot
@camperbot
Nov 15 2015 21:22
orkist sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 231 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Michael Randell
@MichaelRandell
Nov 15 2015 21:23
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">'); @question: Why am I all of a sudden using '... ' instead of "..."? @ compared to exercise before---->$($(".slot")[0]).html(slotOne);
Justin Dieter
@JDieter12
Nov 15 2015 21:23
I’m in need of some help with a homework assignment. I have not studied or was i given materials on how……"Edit the Week One login page to be able to take on server-side processing by incorporating it into a .NET solution. Create one method that the server takes a piece of code or data from the user client-side, manipulates it server side after post back, and then provides the manipulated data back to the user."
Michael Randell
@MichaelRandell
Nov 15 2015 21:23
hey guys, if anyone has time and can explain..
Hans van Riet
@hansinla
Nov 15 2015 21:36
@MichaelRandell In general they’re interchangeable as long as you don’t mix and match them. Here they’re used to break up strings and adding string snippets. The argument of src= needs to include quotation marks, but at the same time the string is broken up to insert a variable. In that case you use the single quote (if you started with double quotes) if that makes sense.
Nigel Grey
@nigelgrey
Nov 15 2015 21:44
hello everyone, I know this is probably very easy but I'm new. How do I nest all HTML elements in .container-fluid?
Aleksander Gębicki
@Takumar
Nov 15 2015 21:45
@nigelgrey just put them inside <div> .. </div> section which have 'container-fluid' class assigned to.
Nigel Grey
@nigelgrey
Nov 15 2015 21:46
@Takumar awesome thank you
CamperBot
@camperbot
Nov 15 2015 21:46
nigelgrey sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 775 | @takumar | http://www.freecodecamp.com/takumar
Joel Jensen
@jcjensenjr
Nov 15 2015 21:46
@nigelgrey your html elements need to be inside your opening and closing <div> tags
seonajoo26
@seonajoo26
Nov 15 2015 21:47

I'm working on Filter Arrays with Filter

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

// Only change code below this line.

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

what am i doing wrong?!
Aleksander Gębicki
@Takumar
Nov 15 2015 21:48
@seonajoo26 do you know how filter() works?
Your function(val)... will return true or false values. If it returns true, the value 'val' will remain in your array, otherwise it will be removed.
So you only need to think about values in your array.
Will 3 and 4 be removed from your array?
@seonajoo26 are you there?
Is 3 < 5 true or false?
Hans van Riet
@hansinla
Nov 15 2015 22:07
@Takumar Don’t you hate it when that happens?
Aleksander Gębicki
@Takumar
Nov 15 2015 22:09
@hansinla when you spend some time answering and don't get answer from person who asked? :-) Yes, sometimes.
Hans van Riet
@hansinla
Nov 15 2015 22:09
@Takumar Yes that.
Joel Jensen
@jcjensenjr
Nov 15 2015 22:09
Im having trouble with Waypoint: Add your JavaScript Slot Machine Slots?
Aleksander Gębicki
@Takumar
Nov 15 2015 22:10
@hansinla even worse is, when you write a long answer, and realize that the same person asked on two more channels and someone else answered this question already :-)
Joel Jensen
@jcjensenjr
Nov 15 2015 22:10
could someone possible walk me through this?
*possibly
Irina
@2Irina2
Nov 15 2015 22:11
Hi there@
!
Anyone that could help me with my portfolio page?
seonajoo26
@seonajoo26
Nov 15 2015 22:11
@Takumar gotcha. I figured it out. Thank you
CamperBot
@camperbot
Nov 15 2015 22:11
seonajoo26 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 776 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Nov 15 2015 22:12
@seonajoo26 good job. I thought that you left home already :-)
heemet
@heemet
Nov 15 2015 22:12
I'm at waypoint 110, 111 working with jQuery -- just wondering does anyone have a good explanation as to why i'm using jQuery to add CSS? why not just use CSS directly?
Irina
@2Irina2
Nov 15 2015 22:12
I tried making a dropdown menu but when i click it, nothing happens... :/
Aleksander Gębicki
@Takumar
Nov 15 2015 22:13
@jcjensenjr what's your problem?
@heemet you use jQuery to add something dynamic. Something that changes when someone clicks on a button or moves mouse (hover over your object).
heemet
@heemet
Nov 15 2015 22:14
@Takumar dynamic how? just doon't get what's more dynamic than css directly...
Joel Jensen
@jcjensenjr
Nov 15 2015 22:15
@Takumar well i seem to be missing the mark completely haha. Not exactly sure how to format this code
heemet
@heemet
Nov 15 2015 22:16
@Takumar i meant, the jQuery seems to just pull up a piece of CSS that tells my buttons to bounce. Doesn't that mean it's the CSS that's adding the dynamic part?
Aleksander Gębicki
@Takumar
Nov 15 2015 22:16
@jcjensenjr use three backticks ``` before and after your pasted code. Remember to type this backticks in single line (not with other text).
@heemet yes, but what if you want to change colour of paragraph to yellow after first click of button "Change colour", to green after next click and so on, can you do it with CSS itself? (I'm trying to find example :-) )
renren89
@renren89
Nov 15 2015 22:18
@heemet dropdown is more or so a "dynamic" change so you'll be looking at a bit of javascript. The closest you can get would be :active but I don't think you would want to hold down a click to access your menu. Grammar edit
heemet
@heemet
Nov 15 2015 22:19
@Takumar ah, i don't know. so you're saying i can build more complex arguments into jQuery to express CSS only under certain conditions...
Joel Jensen
@jcjensenjr
Nov 15 2015 22:19
@Takumar if(slotOne === slotTwo && slotTwo === slotThree){ return "It's A Win";}
This message was deleted
Aleksander Gębicki
@Takumar
Nov 15 2015 22:20
@jcjensenjr you can edit your messages.
Albin Otterhäll
@dumbl3d0re
Nov 15 2015 22:21
Can someone explain to me what they want for output from exercise 43 from the "Basic Javascript" lesson?
Joel Jensen
@jcjensenjr
Nov 15 2015 22:21
@Takumar how would you like me to edit it? I apologize if i am clueless lol. I am new to this
lholdsworth
@lholdsworth
Nov 15 2015 22:22
Can anyone help with why this code is not being accepted:
var newArray = array.reverse(function(){
return newArray;
});
Aleksander Gębicki
@Takumar
Nov 15 2015 22:22
@jcjensenjr you have three periods to the right from your message: ... you can click them to edit your post if you like to make changes to it.
lholdsworth
@lholdsworth
Nov 15 2015 22:23
it works in the result but says "You should use the reverse method" so wont pass
renren89
@renren89
Nov 15 2015 22:23
you use it like: newArray.reverse()
Aleksander Gębicki
@Takumar
Nov 15 2015 22:23
@lholdsworth reverse() method doesn't have any parameters.
renren89
@renren89
Nov 15 2015 22:23
so maybe var newArray = array.reverse();
lholdsworth
@lholdsworth
Nov 15 2015 22:24
doh :) seems obvious now
thanks
Aleksander Gębicki
@Takumar
Nov 15 2015 22:24
@jcjensenjr I have to look at the waypoint to check what you have to do in it.
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:26
hello
i need help with the following code

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

// Only change code below this line.

var newArray = oldArray.filter(function(val){
return (val=>5) ;
})

// Only change code above this line.

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

error message is saying oldArray.filter not a function
renren89
@renren89
Nov 15 2015 22:27
it isnt
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:27
ok
renren89
@renren89
Nov 15 2015 22:27
sorry bit hard to read
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:27
the example says to declare like that

array = array.filter(function(val) {

return val % 2 === 0;

});

mariocatch
@mariocatch
Nov 15 2015 22:28
help format
CamperBot
@camperbot
Nov 15 2015 22:28

:point_right: code format [wiki]

Inline code

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

Code Block

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

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

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

How to Code

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

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

mariocatch
@mariocatch
Nov 15 2015 22:28
@Arnobhridoy format your code in the chat if you want help easier :)
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:29
thanks @mariocatch
CamperBot
@camperbot
Nov 15 2015 22:29
arnobhridoy sends brownie points to @mariocatch :sparkles: :thumbsup: :sparkles:
:star: 43 | @mariocatch | http://www.freecodecamp.com/mariocatch
renren89
@renren89
Nov 15 2015 22:29
@Arnobhridoy sorry, what exactly are you trying to do? Or what is it asking you to do
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:30
i am trying to filter arrays with filter
renren89
@renren89
Nov 15 2015 22:31
so according to val % 2 === 0 you are looking for numbers divisible by 2?
Joel Jensen
@jcjensenjr
Nov 15 2015 22:31
@takumar okay thanks
CamperBot
@camperbot
Nov 15 2015 22:31
jcjensenjr sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 777 | @takumar | http://www.freecodecamp.com/takumar
Arnob Hridoy
@Arnobhridoy
Nov 15 2015 22:31
yes
i am looking for number greater than 5
@renren89