These are chat archives for FreeCodeCamp/Help

30th
Jan 2016
Michael Poutre
@M1kep
Jan 30 2016 00:00
<input type="text" placeholder="cat photo URL">
in between the two from tags?
Richard
@RichardGTech
Jan 30 2016 00:00
Do I need to put it in the form tag?
Zachary Odden
@oddenzac
Jan 30 2016 00:00
hey guys how would i do this?
Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.
Michael Poutre
@M1kep
Jan 30 2016 00:01
ya @ProfessorMagus cause it said to next it inside the form
and @Funlovn007 which challenge are you on?
Cause taht should be wroking
@oddenzac i THINK itd be like remainder = 11 % 3
Zachary Odden
@oddenzac
Jan 30 2016 00:02
i tried that and had no luck :(
Richard
@RichardGTech
Jan 30 2016 00:02
didn't work
Zachary Odden
@oddenzac
Jan 30 2016 00:03
wait nvm i figured it out! thanks for the help anyways @M1kep
CamperBot
@camperbot
Jan 30 2016 00:03
oddenzac sends brownie points to @m1kep :sparkles: :thumbsup: :sparkles:
:star: 130 | @m1kep | http://www.freecodecamp.com/m1kep
Andrea
@Funlovn007
Jan 30 2016 00:03
@M1kep Turn an Image into a Link. I thought I had it down, but it is not going through
Michael Poutre
@M1kep
Jan 30 2016 00:04
@ProfessorMagus
<form action="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL">
</form>
What are you putting right now?
@Funlovn007 hmmm, this is what i used:
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 00:05
hi I need help I need enter action="/submit-cat-photo where do I put this on my page to go through
Michael Poutre
@M1kep
Jan 30 2016 00:05
@Funlovn007 oooh ti htink i foudn the issue
Richard
@RichardGTech
Jan 30 2016 00:06
Wow....
I feel dumb
Michael Poutre
@M1kep
Jan 30 2016 00:06
this happens alot in these tiugns, when they explain it they using a differnt url
Andrea
@Funlovn007
Jan 30 2016 00:06
@M1kep ok?
Michael Poutre
@M1kep
Jan 30 2016 00:06
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
@Funlovn007 use "https://bit.ly/fcc-relaxing-cat" instaed of running cvat
Andrea
@Funlovn007
Jan 30 2016 00:06
@M1kep Gotcha. Thanks
CamperBot
@camperbot
Jan 30 2016 00:06
funlovn007 sends brownie points to @m1kep :sparkles: :thumbsup: :sparkles:
:star: 131 | @m1kep | http://www.freecodecamp.com/m1kep
Michael Poutre
@M1kep
Jan 30 2016 00:07
@ProfessorMagus what was the issue?
Richard
@RichardGTech
Jan 30 2016 00:07
@M1kep I thought they had to be separate lines
edgar
@codemyassoff
Jan 30 2016 00:11
i need help i dont understand the Link to External Pages with Anchor Elements
This message was deleted
Adrian Chira
@adrianchira
Jan 30 2016 00:12
you need to enter this in your button action="/submit-cat-photo where do I @Rebeccagunner88
Michael Poutre
@M1kep
Jan 30 2016 00:12
@codemyassoff what part are you struggling with
Richard
@RichardGTech
Jan 30 2016 00:13
Ok this is pretty cool!
Michael Poutre
@M1kep
Jan 30 2016 00:13
@adrianchira you do that instide your first <button> tags
jadd
@koopsta
Jan 30 2016 00:13
is there like a freecodecamp for swift
Michael Poutre
@M1kep
Jan 30 2016 00:13
same place you'd assign classes and stuff
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 00:13
is it under <input
Richard
@RichardGTech
Jan 30 2016 00:17
AND I'm stuck again
WAIT!! I may not be looking close enough
Yep! I fixed it!
Michael Poutre
@M1kep
Jan 30 2016 00:18
Haha yay @ProfessorMagus :D
Adrian Chira
@adrianchira
Jan 30 2016 00:19
@Rebeccagunner88 no it’s not under <input, it’s right after <form
@M1kep you are right, thanks
CamperBot
@camperbot
Jan 30 2016 00:20
adrianchira sends brownie points to @m1kep :sparkles: :thumbsup: :sparkles:
:star: 144 | @m1kep | http://www.freecodecamp.com/m1kep
Richard
@RichardGTech
Jan 30 2016 00:20
@M1kep Hey so I got a question... And i'm sure I'm going to get the same answer.... I've really been trying to remember ALL the exercises I've done so far and sometimes I feel like I don't remember them at ALL
Adrian Chira
@adrianchira
Jan 30 2016 00:22
@ProfessorMagus it’s a muscle, the more you use it the stronger it gets so the more you remember.
Richard
@RichardGTech
Jan 30 2016 00:23
@adrianchira Ahh.
Michael Poutre
@M1kep
Jan 30 2016 00:24
@ProfessorMagus ya, pretty much what i do is if I forget someitng I always will google it, and then do it. Once tyou start doing little projectas and stuff itll really help you remember
And if you ever really forget
Google is tyour froind
for example, "How to put a text input in a form"
Richard
@RichardGTech
Jan 30 2016 00:26
Ok... Now I'm trying to make my <div> element the gray-backround class... I tried putting it within my styles
Michael Poutre
@M1kep
Jan 30 2016 00:27
So as with the rest of the class things, jst put it right after the first div bfore the clsoing >
so
```
<div class="blah">
Richard
@RichardGTech
Jan 30 2016 00:27
Ohhhhhhh
Do I want to do it within my style tags?
Michael Poutre
@M1kep
Jan 30 2016 00:34
Nope, you just declare teh class within your style tags
Unless tey want you to style all the div tags
Adam Snetiker
@ajsnetiker
Jan 30 2016 00:35

@ProfessorMagus

Do what @M1kep said, and in your style tags goes…

.blah {
color: #0000ff;
etc.
}

and if you want ALL the div tags, then the html should be <div> and the style should be

div {
….
….
}

Adria Alvarado
@n3rdvana
Jan 30 2016 00:36

Hi I was having some trouble with the following problem:

// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  if (myObj.hasOwnProperty(checkProp)){
   return checkProp; 
  } else if (myObj.hasOwnProperty(checkProp)){
    return checkObj;
  } else {
    return "Not Found";
  }
}


// Test your code by modifying these values
checkObj("gift");

It's asking me to "Modify the function checkObj to test myObj for checkProp. If the property is found, return that property's value. If not, return "Not Found"." I've been trying everything but I can't figure it out

Richard
@RichardGTech
Jan 30 2016 00:37
Create a class called gray-background with the background-color of gray. Assign this class to your div element.
this is what it is asking me to do
I've been trying
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 00:37
@n3rdvana why you have an Else if
Adria Alvarado
@n3rdvana
Jan 30 2016 00:38
@COANelmejor I tried it out to see if it would work
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 00:38
@n3rdvana you can use bracket notation to access the Object
Michael Poutre
@M1kep
Jan 30 2016 00:39
@ProfessorMagus like @ajsnetiker said, do .gray-background {
}
in your systes ting
and add class = "grey-background"
to the div
Adam Snetiker
@ajsnetiker
Jan 30 2016 00:39

@ProfessorMagus

without giving you the answer…

  1. in your style tag, identify the name of the class with as “.name”
  2. in the brackets, specify a background-color of gray
then you’re done
Qats22
@Qats22
Jan 30 2016 00:40
Hello guys, well i'm really new to programming , i'm trying to learn JAVA, then i see this type of 'Command' that is the modulo, this one = % , I don't understand it , can someone help me with it? Sorry my bad english.
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 00:40
@n3rdvana like this
function checkObj(checkProp) {
  // Your Code Here
  if (myObj.hasOwnProperty(checkProp)){
   return myObj[checkProp]; 
  } else {
    return "Not Found";
  }
}
Adria Alvarado
@n3rdvana
Jan 30 2016 00:43
@COANelmejor wow thanks so much! I've been trying to figure it out for a while, I appreciate the help!
CamperBot
@camperbot
Jan 30 2016 00:43
n3rdvana sends brownie points to @coanelmejor :sparkles: :thumbsup: :sparkles:
:star: 306 | @coanelmejor | http://www.freecodecamp.com/coanelmejor
Richard
@RichardGTech
Jan 30 2016 00:43
Can't get it to work I'll figure it out later
Adam Snetiker
@ajsnetiker
Jan 30 2016 00:43

@Qats22 the % will give you the REMAINDER after the first number goes INTO the second. Alternatively, it’ll give the reamineder when the second number is divided by the first.

For example,

a = 2;
b = 3;
c = 3 % 2;

c = 1 in this case, because 3/2 is 1, with a REMAINDER of 1.

If you have something like 24 and 8, it would return 0 because 8 goes into 24 evenly and there’s no remainder at all

Christian Obed Arana navas
@COANelmejor
Jan 30 2016 00:44
@n3rdvana You're welcome... at your service... Tell me if you need more help :D
Adam Snetiker
@ajsnetiker
Jan 30 2016 00:45

@ProfessorMagus

just fill in class-name and color here

<div class = “class-name”>

<style>
.class-name {
background-color: color;
}
</style>

Qats22
@Qats22
Jan 30 2016 00:45
@ajsnetiker Ohhh! Now i understand that! Really thanks for taking your time to help me!
CamperBot
@camperbot
Jan 30 2016 00:45
qats22 sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 275 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
kamkam123
@kamkam123
Jan 30 2016 00:50
how do you put an element inside another element (nesting)
Franco Zapata
@Francozt01
Jan 30 2016 00:53
@kamkam123 <div> <p>P tags are nested inside the Div tags</p> </div>
you write ur div tags and put inside the ones u want to nest <open div> here you write ur elements to be nested inside this div <p tags></p> <section></setion> <button tags></button> etc. </closing div>
CarrKeys
@CarrKeys
Jan 30 2016 00:57
// Setup
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

var secondTree = ""; // Change this line
How do I acess the second objec of an array?
Franco Zapata
@Francozt01
Jan 30 2016 00:58
@CarrKeys using dot notation or bracket notation
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 00:58
@CarrKeys Using bracket notation
myPlants[1]
@CarrKeys for this case is better to use bracket notation, but in other case se dot notation @Francozt01 you're right
CarrKeys
@CarrKeys
Jan 30 2016 01:00
@COANelmejor Wow that's strange. That was the first thing I used, and the first time it told me 'myPlants is not defined'.
Got the answer now. It was... var secondTree = myPlants[1].list[1];
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 01:01
maybe the capital letters was wrong
@CarrKeys Good
Franco Zapata
@Francozt01
Jan 30 2016 01:01
@CarrKeys that's how i did it :D
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 01:01
That is the answer :D
CarrKeys
@CarrKeys
Jan 30 2016 01:01
I can't remember what I typed in before, haha. Thanks for the help @Francozt01 @COANelmejor
CamperBot
@camperbot
Jan 30 2016 01:01
carrkeys sends brownie points to @francozt01 and @coanelmejor :sparkles: :thumbsup: :sparkles:
:star: 307 | @coanelmejor | http://www.freecodecamp.com/coanelmejor
:star: 506 | @francozt01 | http://www.freecodecamp.com/francozt01
Franco Zapata
@Francozt01
Jan 30 2016 01:02
@CarrKeys np :+1:
Christian Obed Arana navas
@COANelmejor
Jan 30 2016 01:02
@CarrKeys You're welcome :D
edgar
@codemyassoff
Jan 30 2016 01:08
how do you Replace the value of your a element's href attribute with a #
Adam Snetiker
@ajsnetiker
Jan 30 2016 01:09
@codemyassoff a href=“#"
@codemyassoff that means the link won’t go to another page. It’s also the sign for an ID, which can be in a separate section further down the page that you’d normally have to scroll to. If you assign an id to section such as “a href=“#contact” then you can jump right to that section without scrolling if you click there. In other words, not all links have to go to a separate web page or website!
edgar
@codemyassoff
Jan 30 2016 01:13
@ajsnetiker how do you assign an ID
Kevin Elser
@CoffeeCodeKevin
Jan 30 2016 01:13
function every(collection, pre) {
  // Is everyone being true?
  for (i=0; i<collection.length;i++) {
    if(isNaN(collection[i][pre])) {
      return false;
    }
    if (collection[i][pre] === null || collection[i][pre]===0 || collection[i][pre]==="" || collection[i][pre]===undefined) {
      return false;
    }
    if (i == collection.length-1 && collection[i].hasOwnProperty(pre) && collection[i][pre] !== false) {
      return true;
    }
    if (collection[i].hasOwnProperty(pre) && collection[i][pre] !== false) {
      continue;
    }
  }

}

every([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
I'm struggling to figure out why this returns false.
Adam Snetiker
@ajsnetiker
Jan 30 2016 01:13
@codemyassoff don’t worry about that yet, you don’t need to…was just telling you that’s what it’s used for. If you HAD section Id, you would use href=“#id”, but for what it’s telling you to do the answer is just a href=“#"
Kevin Elser
@CoffeeCodeKevin
Jan 30 2016 01:13
It has something to do with isNan, but I don't understand why isNan is making the given collection false with the argument
edgar
@codemyassoff
Jan 30 2016 01:16
@ajsnetiker THANKS
CamperBot
@camperbot
Jan 30 2016 01:16
codemyassoff sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 276 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
andyskelly
@andyskelly
Jan 30 2016 01:17
this is making me crazy. im trying to burn through the early lessons to get to new concepts and that may be where i am stumbling. but its not letting me past this lesson even though im thinking this is correct.
(these are concepts "I thought" i already knew) haha
this is the code <p>View more <a href="http://freecatphotoapp.com">cat photos</a></p>
im gettting errors on
You need an a element that links to "http://www.freecatphotoapp.com".
Your a element should be nested within your new p element.
Your p element should have the text "View more " (with a space after it).
am i missing something?
Adam Snetiker
@ajsnetiker
Jan 30 2016 01:21
@andyskelly yeah, YOUR link is missing the www
that’s why it’s marking it wrong
andyskelly
@andyskelly
Jan 30 2016 01:21
GAH
thank you
fresh eyes
Nhat Khanh
@lednhatkhanh
Jan 30 2016 01:21
Please help me solve this with Profile Lookup, my code here
function lookUp(firstName, prop){
// Only change code below this line
  for(var i = 0;i < contacts.length;i++){
    if(contacts[i]["first name"] !== firstName) return "No such contact";
    else if(!contacts[i][prop]) return "No such property";
    return contacts[i][prop];
  }
// Only change code above this line
}
Adam Snetiker
@ajsnetiker
Jan 30 2016 01:21
np, noticed it right away. If it were my code it would’ve taken 3 hours also
andyskelly
@andyskelly
Jan 30 2016 01:21
"off the hook"
the success message
haha thanks
weirdly i thought i copied that from the instructions
Adam Snetiker
@ajsnetiker
Jan 30 2016 01:22
sure. That’s what makes programming frustrating. I’ve said “I hate programming” MANY times, but i’m trying to get through it instead of switching careers
Nhat Khanh
@lednhatkhanh
Jan 30 2016 01:23
Please help me solve this with Profile Lookup, my code's here
function lookUp(firstName, prop){
// Only change code below this line
  for(var i = 0;i < contacts.length;i++){
    if(contacts[i]["first name"] !== firstName) return "No such contact";
    else if(!contacts[i][prop]) return "No such property";
    return contacts[i][prop];
  }
// Only change code above this line
}
kelly
@kwhms
Jan 30 2016 01:32
Hi - question on codepen. I'm trying to test that my links work. I switch to debug view and click on my button and nothing happens. Can I test in this way?
Nhat Khanh
@lednhatkhanh
Jan 30 2016 01:32
anybody?
Shannon Riester
@shriester
Jan 30 2016 01:35
@M1kep I've got another question on Java if you are feeling kind again today
kelly
@kwhms
Jan 30 2016 01:36
Trying to test in codepen <button type="button" class="btn btn-primary active"><i class="fa fa-twitter"></i><a href="https://twitter.com">Twitter</a></button>
it looks different in the preview but nothing happens when I click
Chris Dziewa
@chrisdziewa
Jan 30 2016 01:37
@kwhms what's your codepen url?
kelly
@kwhms
Jan 30 2016 01:39
actually, I think its working now. I moved the button inside the anchor and in debug mode it works.
Nhat Khanh
@lednhatkhanh
Jan 30 2016 01:51
some one please help me solve Profile Lookup
help me solve Profile Lookup:
function lookUp(firstName, prop){
// Only change code below this line
  var i = 0;
  var temp;
  var exist = false;
  while(i<contacts.length){
    if(contacts[i].firstName){
      exist = true;
      temp = i;
      break;
    }
    i++;
  }
  if(exist === false) return "No such contact";
  else if(!contacts[temp][prop]) return "No such property";
  return contacts[temp][prop];
}
greg
@wearenotgroot
Jan 30 2016 02:01
@kwhms there is a bootstrap navbar if you want
@kwhms ----->bootstrap components http://getbootstrap.com/components/
amiickg
@amiickg
Jan 30 2016 02:07
Hi. someone please help with Escape Sequence Strings
var myStr = "backslash tab tab carriage-return new-line"; // Change this line
Manish Giri
@Manish-Giri
Jan 30 2016 02:09
@amiickg what’s your question
greg
@wearenotgroot
Jan 30 2016 02:11
@kwhms check your private message :smile:
amiickg
@amiickg
Jan 30 2016 02:14
@Manish-Giri The instruction said to encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
greg
@wearenotgroot
Jan 30 2016 02:20
@lednhatkhanh did you get any help?
Manish Giri
@Manish-Giri
Jan 30 2016 02:23
@amiickg do you know which characters mean a backslash, or tab
Adam Snetiker
@ajsnetiker
Jan 30 2016 02:25

@Manish-Giri here’s a hint, look at the chart and put those sequences in your string

https://msdn.microsoft.com/en-us/library/2yfce773%28v=vs.94%29.aspx

Manish Giri
@Manish-Giri
Jan 30 2016 02:26
@ajsnetiker actually, @amiickg is the one who needs help, if you look back
Adam Snetiker
@ajsnetiker
Jan 30 2016 02:26
CarrKeys
@CarrKeys
Jan 30 2016 02:28

Can someone help me with the 'Record Collection' challenge?
Find Record Collection.

My question is that for the function, am I making an If, then, else statement?

find Record Collection
CamperBot
@camperbot
Jan 30 2016 02:28

find record collection

:zero: checkpoint record collection

Michael
@davidfutch
Jan 30 2016 02:29
Im not quite sure I understand the direction. I have text above the wells, but im not getting a green check
Manish Giri
@Manish-Giri
Jan 30 2016 02:30
@CarrKeys you need one main if-else. Inside the first if, you need another if-else.
CarrKeys
@CarrKeys
Jan 30 2016 02:31
@Manish-Giri An if-else inside an if-else?
Oh! You mean this ' || '
Manish Giri
@Manish-Giri
Jan 30 2016 02:32
@CarrKeys
if() {
  if() {}
  else { }
}
else {}
Jason Ulaner
@julaner
Jan 30 2016 02:32
how do you create a bootstrap button under a image? Thanks!
<img src="http://bit.ly/fcc-running-cats" class="img-responsive" >
<button type= "btn" </button>
CarrKeys
@CarrKeys
Jan 30 2016 02:33
@Manish-Giri Wow I've never done that before. I would think it would be this.
if ( arguement || arguement )
Michael
@davidfutch
Jan 30 2016 02:34
julaner, im not sure since im beginning, but try replacing the type with a class
<button class= "btn"></btn>
Jason Ulaner
@julaner
Jan 30 2016 02:34
@davidfutch I will give that a shot, thank you!
CamperBot
@camperbot
Jan 30 2016 02:34
julaner sends brownie points to @davidfutch :sparkles: :thumbsup: :sparkles:
:star: 128 | @davidfutch | http://www.freecodecamp.com/davidfutch
Rekha Gupta
@codingclass
Jan 30 2016 02:35
how do you add backgroung color to id attribute
Manish Giri
@Manish-Giri
Jan 30 2016 02:35
@codingclass with JS?
Rekha Gupta
@codingclass
Jan 30 2016 02:35
HTML CSS
Manish Giri
@Manish-Giri
Jan 30 2016 02:36
@codingclass
#yourID {
background-color: red;
}
Rekha Gupta
@codingclass
Jan 30 2016 02:39
using this in form element
HARISH PANDAMANENI
@harish436
Jan 30 2016 02:39
<script>
  $(document).ready(function() {
    $("#target1").parent().css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
$("#left-well").parent().css("background-color", "red")

  });
</script>

<!-- Only change code above this line. -->

<body>
  <div class="container-fluid">
    <h3 class="text-primary text-center">jQuery Playground</h3>
    <div class="row">
      <div class="col-xs-6">
        <h4>#left-well</h4>
        <div class="well" id="left-well">
          <button class="btn btn-default target" id="target1">#target1</button>
          <button class="btn btn-default target" id="target2">#target2</button>
          <button class="btn btn-default target" id="target3">#target3</button>
        </div>
      </div>
      <div class="col-xs-6">
        <h4>#right-well</h4>
        <div class="well" id="right-well">
          <button class="btn btn-default target" id="target4">#target4</button>
          <button class="btn btn-default target" id="target5">#target5</button>
          <button class="btn btn-default target" id="target6">#target6</button>
        </div>
      </div>
    </div>
  </div>
</body>
Your left-well element should have a red background.
edgar
@codemyassoff
Jan 30 2016 02:44
how do you Create an input element of type text below your lists.
Vanessa
@monarch11
Jan 30 2016 02:46
Hi
greg
@wearenotgroot
Jan 30 2016 02:47
@monarch11 hello
Vanessa
@monarch11
Jan 30 2016 02:47
I have a question. They gave me these instructions: Instructions
Fix the variable declarations and assignments so their names use camelCase.
Here is my code:
Instructions
Fix the variable declarations and assignments so their names use camelCase.
oops sorry lol!
// Declarations
var studlyCapvar;
var properCamelCase;
var titleCaseOver;

// Assignments
studlyCapvar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;
Manish Giri
@Manish-Giri
Jan 30 2016 02:48
@monarch11 are you getting errors?
Vanessa
@monarch11
Jan 30 2016 02:49
I'm lost because I typed the variables in camel code but only 9000 shows up
greg
@wearenotgroot
Jan 30 2016 02:49
@monarch11 which waypoint is this?
Vanessa
@monarch11
Jan 30 2016 02:49
Basic Javascript
In the front end development certification
"Understanding Case Sensitivity in Variables"
greg
@wearenotgroot
Jan 30 2016 02:51
@monarch11 try refreshing the page
Manish Giri
@Manish-Giri
Jan 30 2016 02:52
@monarch11 did you change any of the variable names?
greg
@wearenotgroot
Jan 30 2016 02:53
@monarch11 your code look correct
Vanessa
@monarch11
Jan 30 2016 02:53
I tried refreshing the page it didnt work
greg
@wearenotgroot
Jan 30 2016 02:54
@monarch11 ah
@monarch11 the culprit is this one ----------> var studlyCapVar; <-------------------this one is the correct one
Vanessa
@monarch11
Jan 30 2016 02:54
Oh I see what happened the variable "studlyCapvar" was supposed to be "studlyCapVar"
lol
greg
@wearenotgroot
Jan 30 2016 02:55
@monarch11 :smile:
Vanessa
@monarch11
Jan 30 2016 02:55
that is odd but OK I found the issue
greg
@wearenotgroot
Jan 30 2016 02:56
@monarch11 it's beacause it is supposed to be studlyCapitalVariable --> they just made it shorter ----> studlyCapVar
Rekha Gupta
@codingclass
Jan 30 2016 02:59

cat-photo-element {

background-color: green;
} how to add this to existing id
Jestin
@jestintab
Jan 30 2016 03:00

suppose ur id name iis cat-photo
Then its like,

cat-photo {background-color: green;

}

@codingclass ^^^
Rekha Gupta
@codingclass
Jan 30 2016 03:01
this woulkd be in style elemnt
jyeez16
@jyeez16
Jan 30 2016 03:01
// Setup
function phoneticLookup(val) {
 var result = "";

  // Only change code below this line

 var lookup = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank",
    "": undefined
  };


  // Only change code above this line
  return result;
}
var lookup = "";
// Change this value to test
phoneticLookup("alpha");
Hi sorry I pasted my code first - can anyone help with this challenge? - Convert the switch statement into a lookup table called lookup. Use it to lookup val and return the associated string.
Jestin
@jestintab
Jan 30 2016 03:02
@codingclass yeah it should in the style tags
Juan Sierra
@juan-sierra
Jan 30 2016 03:02
@codingclass whats the name of the id you are trying to style?
cat-photo-element? @codingclass
quick heads up @codingclass to add style to an id you have use the hashtag like this
<style>
#cat-photo-element  {
   background-color: blue;
}
<style>

<h1 id=“cat-photo-element”>Example</h1>
edgar
@codemyassoff
Jan 30 2016 03:07
hi i need help
Juan Sierra
@juan-sierra
Jan 30 2016 03:07
hi @codemyassoff what problem are you stuck on?
edgar
@codemyassoff
Jan 30 2016 03:08
i am stuck on the Create a Text Field
i do not know how to Create an input element of type text below your lists.
@jsierragarcia
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:10
@codemyassoff <input type="text">
Juan Sierra
@juan-sierra
Jan 30 2016 03:10
Ok @codemyassoff lets take a step back and re-read
Patrick Thibault
@tiboclan
Jan 30 2016 03:11
Prioritize One Style Over Another exercise , i'm not able to have pink-text

<style>
2
body {
3
background-color: black;
4
font-family: Monospace;
5
color: green;
6
.pink-text {
7
color: pink;
8
}
9
}
10
</style>
11

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

Juan Sierra
@juan-sierra
Jan 30 2016 03:12
Hey at @tiboclan it would be easier if you put your code between tildes
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:14
I'm in "Stand in Line" in JS, and I can't go further anymore

function queue(arr, item) {
// Your code here

return item(1); // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

Professor
@wenliyoon
Jan 30 2016 03:14
hi everyone
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:14
queue([], 1) should return 1
queue([2], 1) should return 2
queue([5,6,7,8,9], 1) should return 5
After queue(testArr, 10), myArr[4] should be 10
smarts
@smarts
Jan 30 2016 03:15
can someone help me with the size-your-images challenge?
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:15
The above four are required, and first one is satisfied. At first, queue([2],1) means, the third number in the testArr and picks up one, is it correct?
Manish Giri
@Manish-Giri
Jan 30 2016 03:15
@hellomichiyabu you need to push item into arr, then shift first element from arr
@smarts what’s the question
Juan Sierra
@juan-sierra
Jan 30 2016 03:16
@smarts sure
hello @wenliyoon how are you doing
smarts
@smarts
Jan 30 2016 03:16
thanks
would it be easiest if i pasted my code snippet?
my question is "i did what the challenge requires, but the tests don't pass"
Juan Sierra
@juan-sierra
Jan 30 2016 03:17
@smarts yes, just make sure you put it between tildes, let me know if you need help with that
Patrick Thibault
@tiboclan
Jan 30 2016 03:17
need help with that lol
Juan Sierra
@juan-sierra
Jan 30 2016 03:17
hmm ok @smarts lets look at your code
smarts
@smarts
Jan 30 2016 03:17
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

<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>
Professor
@wenliyoon
Jan 30 2016 03:17
hi @jsierragarcia i am good. i am still stuck on beginning
smarts
@smarts
Jan 30 2016 03:18
oops
i see it now
Professor
@wenliyoon
Jan 30 2016 03:18
how are you doing @jsierragarcia
smarts
@smarts
Jan 30 2016 03:18
i need .smaller-image
i'm dumb. thanks!
Juan Sierra
@juan-sierra
Jan 30 2016 03:18
awesome lol @smarts
edgar
@codemyassoff
Jan 30 2016 03:18
@harish436 but were do i place it
Juan Sierra
@juan-sierra
Jan 30 2016 03:19
yeah just remember that id’s use # and classes .
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:19
@Manish-Giri Change "var testArr=[1,2,3,4,5]"? to "var testArr=[1,2,2,4,5}"?
Patrick Thibault
@tiboclan
Jan 30 2016 03:19
how did you put your screen here @smarts
Juan Sierra
@juan-sierra
Jan 30 2016 03:19
@wenliyoon I’m doing great, what problem are you stuck on
smarts
@smarts
Jan 30 2016 03:19
i copied the code from the challenge
and then put ``` on the lines above and below it
Patrick Thibault
@tiboclan
Jan 30 2016 03:20
ok

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

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

CamperBot
@camperbot
Jan 30 2016 03:20
:bulb: to format code use backticks! ``` more info
Patrick Thibault
@tiboclan
Jan 30 2016 03:20
lol oops
edgar
@codemyassoff
Jan 30 2016 03:20

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" 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>

Juan Sierra
@juan-sierra
Jan 30 2016 03:22
@tiboclan find the number 1 at the top left of your keyboard and you’ll find the tilde
Donald
@codescout811
Jan 30 2016 03:23
Hi can somebody help me in radio buttons?
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:23
Somebody help!
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:23
@codescout811 yes
Juan Sierra
@juan-sierra
Jan 30 2016 03:23
@codescout811 yes, what’s the issue
Patrick Thibault
@tiboclan
Jan 30 2016 03:24

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

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

Juan Sierra
@juan-sierra
Jan 30 2016 03:24
@hellomichiyabu yes, what’s the issue
Vanessa
@monarch11
Jan 30 2016 03:24
Hey can I ask a question?
Does anyone here know why this returns as null?
function convert(celsius) {
  // Only change code below this line
var celcius;
var fahrenheit = celcius * 9 / 5 + 32;

  // Only change code above this line
  if ( typeof fahrenheit !== 'undefined' ) {
    return fahrenheit;
  } else {
    return 'fahrenheit not defined';
  }
}

// Change the inputs below to test your code
convert(30);
Donald
@codescout811
Jan 30 2016 03:25
Your page should have two radio button elements.
Give your radio buttons the name attribute of indoor-outdoor.
Each of your two radio button elements should be nested in its own label element.
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:25
@jsierragarcia I'm stuck in the "Stand in Line". The code is

function queue(arr, item) {
// Your code here

return item; // Change this line
}
// Test Setup
var testArr = [1,2,2,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

noncentz
@noncentz
Jan 30 2016 03:25
because of the !==
greg
@wearenotgroot
Jan 30 2016 03:26
@monarch11 because of var celcius
Manish Giri
@Manish-Giri
Jan 30 2016 03:26
@monarch11 you’re using var celcius
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:26
I don't answer "queue([2],1) should return 2", and other questions...
noncentz
@noncentz
Jan 30 2016 03:26
and redeclaring a variable like manish said
Manish Giri
@Manish-Giri
Jan 30 2016 03:26
@monarch11 celcius is undefined, use celsius
greg
@wearenotgroot
Jan 30 2016 03:26
@monarch11 you are supposed to use the function parameter
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:27
@jsierragarcia I don't answer "queue([2],1) should return 2", and other questions..
Manish Giri
@Manish-Giri
Jan 30 2016 03:27

@hellomichiyabu

arr.push(item);

this is for your first task

Vanessa
@monarch11
Jan 30 2016 03:27
oh how silly....
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:27
@codescout811 <label><input type="radio" name="indoor-outdoor"> Indoor</label>
Vanessa
@monarch11
Jan 30 2016 03:27
OK thank you @Manish-Giri
CamperBot
@camperbot
Jan 30 2016 03:27
monarch11 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 613 | @manish-giri | http://www.freecodecamp.com/manish-giri
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:28
@codescout811
http://www.freecodecamp.com/challenges/responsively-style-radio-buttons#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-8%22%3E%0A%20%20%20%20%20%20%3Ch2%20class%3D%22text-primary%20text-center%22%3ECatPhotoApp%3C%2Fh2%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22img-responsive%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cimg%20src%3D%22http%3A%2F%2Fbit.ly%2Ffcc-running-cats%22%20class%3D%22img-responsive%22%3E%0A%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-primary%22%3E%3Ci%20class%3D%22fa%20fa-thumbs-up%22%3E%3C%2Fi%3E%20Like%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-info%22%3E%3Ci%20class%3D%22fa%20fa-info-circle%22%3E%3C%2Fi%3E%20Info%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20class%3D%22col-xs-4%22%3E%0A%20%20%20%20%20%20%3Cbutton%20class%3D%22btn%20btn-block%20btn-danger%22%3E%3Ci%20class%3D%22fa%20fa-trash%22%3E%3C%2Fi%3E%20Delete%3C%2Fbutton%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%3C%2Fdiv%3E%0A%20%20%3Cp%3EThings%20cats%20%3Cspan%20class%3D%22text-danger%22%3Elove%3A%3C%2Fspan%3E%3C%2Fp%3E%0A%20%20%3Cul%3E%0A%20%20%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%20%20%3C%2Ful%3E%0A%20%20%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%20%20%3Col%3E%0A%20%20%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%20%20%3C%2Fol%3E%0A%20%20%3Cform%20fccfaa%3D%22%2Fsubmit-cat-photo%22%3E%0A%20%20%20%20%3Cdiv%20class%3D%22row%22%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Indoor%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22radio%22%20name%3D%22indoor-outdoor%22%3E%20Outdoor%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Loving%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Lazy%3C%2Flabel%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3Cdiv%20class%3D%22col-xs-6%22%3E%0A%20%20%20%20%3Clabel%3E%3Cinput%20type%3D%22checkbox%22%20name%3D%22personality%22%3E%20Crazy%3C%2Flabel%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3Cinput%20type%3D%22text%22%20place%0A%20%20%20%20%20%20%20%20%20%20%20holder%3D%22cat%20photo%20URL%22%20required%3E%0A%20%20%20%20%3Cbutton%20type%3D%22submit%22%3ESubmit%3C%2Fbutton%3E%0A%20%20%3C%2Fform%3E%0A%3C%2Fdiv%3E%0A
Juan Sierra
@juan-sierra
Jan 30 2016 03:28
@hellomichiyabu I’m sorry bud, but I’m gonna pass on this, I haven’t gotten there yet. Sorry
noncentz
@noncentz
Jan 30 2016 03:28
oh dear, thats why i cringe at the solutions being stored in the url
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:29
@jsierragarcia Fine, thanks for replying!
CamperBot
@camperbot
Jan 30 2016 03:29
hellomichiyabu sends brownie points to @jsierragarcia :sparkles: :thumbsup: :sparkles:
:star: 211 | @jsierragarcia | http://www.freecodecamp.com/jsierragarcia
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:29
@codescout811 are you clear
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:29
Does somebody help to answer JS, "Stand in Line"?? I'm so stuck!
Juan Sierra
@juan-sierra
Jan 30 2016 03:29
@hellomichiyabu no problem
Manish Giri
@Manish-Giri
Jan 30 2016 03:30
@hellomichiyabu dude I literally gave you half of the code
Patrick Thibault
@tiboclan
Jan 30 2016 03:31
ok thanks for replying
Donald
@codescout811
Jan 30 2016 03:31
Hi @harish436 thank you so much for your help. I'm learning more. awesome people.
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:31
@Manish-Giri I missed your mention, "arr.push(item);". Thanks
CamperBot
@camperbot
Jan 30 2016 03:31
hellomichiyabu sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 614 | @manish-giri | http://www.freecodecamp.com/manish-giri
Donald
@codescout811
Jan 30 2016 03:32
@jsierragarcia thanks also...
CamperBot
@camperbot
Jan 30 2016 03:32
codescout811 sends brownie points to @jsierragarcia :sparkles: :thumbsup: :sparkles:
:star: 212 | @jsierragarcia | http://www.freecodecamp.com/jsierragarcia
Juan Sierra
@juan-sierra
Jan 30 2016 03:32
no problem @codescout811
Manish Giri
@Manish-Giri
Jan 30 2016 03:33
This message was deleted
@hellomichiyabu for the next item, you can use .shift()
Pat Lee
@pleedesigner
Jan 30 2016 03:33
Hi, how to nest my text input element within a form element?
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:33
@codescout811 thats okay
<input type="text"> @pleedesigner
Help please
CamperBot
@camperbot
Jan 30 2016 03:34

:point_right: bonfire no repeats please [wiki]

Problem Explanation:

  • This task requires us to look at each possible permutation of a string. This is best done using a recursion function. Being able to build a function which collects all permutations of a string is a common interview question, so there is no shortage of tutorials out there on how to do this, in many different code languages.
  • This task can still be daunting even after watching a tutorial. You will want to send each new use of the function 3 inputs: 1. a new string (or character array) that is being built, 2. a position in your new string that's going to be filled next, and 3. an idea of what characters (more specifically positions) from the original string have yet to be used. The pseudo code will look something like this:

    ```
    var str = ???;
    perm(current position in original string, what's been used in original string, current string build thus far){
    if(current string is finished) {
    print current string;
    }else{
    for(var i = 0; i < str.length; i++) {

    if(str[i] has not been used) {
      put str[i] into the current position;
      mark str[i] as used
      perm(current position in original string, what's been used in original string, current string build thus far)
      unmark str[i] as used because another branch in the tree for i + 1 will still likely use it;
    }

    }
    }
    }
    :pencil: read more about bonfire no repeats please on the FCC Wiki

Pat Lee
@pleedesigner
Jan 30 2016 03:35
@harish436 i got this code: <form action="/submit-cat-photo"></form>
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:35
@Manish-Giri It means, "arr.push(item).shift(2);"?
James Jung
@thejcode24
Jan 30 2016 03:35
@Arkine @sludge256 help me bros lol
Manish Giri
@Manish-Giri
Jan 30 2016 03:36
@hellomichiyabu
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:36
@pleedesigner you can insert input after photo
Manish Giri
@Manish-Giri
Jan 30 2016 03:36
@hellomichiyabu what do you think this does
arr.push(item).shift(2);
Brian
@sludge256
Jan 30 2016 03:36
On my phone. I'm of limited use :D
James Jung
@thejcode24
Jan 30 2016 03:37
@sludge256 TT.TT
@sludge256 thanks lol
CamperBot
@camperbot
Jan 30 2016 03:37
thejcode24 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1153 | @sludge256 | http://www.freecodecamp.com/sludge256
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:37
@Manish-Giri You said in the previous "for the next item, you can use .shift()", I know it is so terrible to make it...
Pat Lee
@pleedesigner
Jan 30 2016 03:38

@harish436 sorry, i dont get it. how do I combine these two codes:

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

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

HARISH PANDAMANENI
@harish436
Jan 30 2016 03:38
<form action="/submit-cat-photo" <input type="text" placeholder="cat photo URL"> </input>></form>
Manish Giri
@Manish-Giri
Jan 30 2016 03:39

@hellomichiyabu

Write a function queue which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The queue function should then return the element that was removed.

Professor
@wenliyoon
Jan 30 2016 03:39
@jsierragarcia problem of timeless ha i am fixing it thanks
CamperBot
@camperbot
Jan 30 2016 03:39
wenliyoon sends brownie points to @jsierragarcia :sparkles: :thumbsup: :sparkles:
:star: 213 | @jsierragarcia | http://www.freecodecamp.com/jsierragarcia
HARISH PANDAMANENI
@harish436
Jan 30 2016 03:39
@pleedesigner can you paster pretty code here
Manish Giri
@Manish-Giri
Jan 30 2016 03:39

@hellomichiyabu you have the code for the first part

Add the number to the end of the array,

@hellomichiyabu can you figure out how to use .shift() for the next part

then remove the first element of array. The queue function should then return the element that was removed.

Krista Prenesti
@kprenesti
Jan 30 2016 03:41
Hi all. I need help. Some weird things are going on with my code, and I can't figure it out. For one, geolocation works just fine on Firefox, but not on Chrome. On Chrome it looks like my JS isn't even registering, nevermind working, but it sort of works on Firefox. AND when I console.log for the icons, the right icon shows up, but when I run my code, the same url appears for all of them, the night url. I'm a bit stumped. And my submit button isn't taking my values.
Oh, I'm working on the weather app.
Manish Giri
@Manish-Giri
Jan 30 2016 03:42
@kprenesti yep, I’m there too. Geolocation API is not consistent across Chrome. If at first launch, you don’t get the pop-up “…wants to use your location - allow/block”, you know something’s wrong
Krista Prenesti
@kprenesti
Jan 30 2016 03:43
Yeah. But I tried using conditionals to at least show something except for a mostly blank page, but it's not working.
Pat Lee
@pleedesigner
Jan 30 2016 03:43

@harish436 ```html

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

sorry, let me do it one more time

@harish436 ```html

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

Krista Prenesti
@kprenesti
Jan 30 2016 03:44
@pleedesigner First, you have to put code seperately. Second, you need to close your form tag. :)
hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:45
@Manish-Giri I got ".shift" means to remove the first part in the array.
Manish Giri
@Manish-Giri
Jan 30 2016 03:45
@kprenesti well you can put that part of the code here, worth taking a look
@hellomichiyabu then use .shift() on arr and return it!
Krista Prenesti
@kprenesti
Jan 30 2016 03:46
Ok. The parts that aren't working.
Pat Lee
@pleedesigner
Jan 30 2016 03:46
@kprenesti let me try it thanks
CamperBot
@camperbot
Jan 30 2016 03:46
pleedesigner sends brownie points to @kprenesti :sparkles: :thumbsup: :sparkles:
:star: 211 | @kprenesti | http://www.freecodecamp.com/kprenesti
Krista Prenesti
@kprenesti
Jan 30 2016 03:47
```
$('#subForm').click(function(event){
    event.preventDefault();
    var query = "";
    query += $('#states').val() + "/";
    if($('#location').val().indexOf(/\w+/g) == -1){
      var cleanUp = $('#location').val().split('').filter(function(val){
        return val == /\w+/g;
      });
      cleanUp.join('');
      query += cleanUp;
      ajaxCall(query);
      console.log(cleanUp);
    }
  });
brb the pup needs out.
Pat Lee
@pleedesigner
Jan 30 2016 03:49

@kprenesti ```html

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

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

<input type="text" placeholder="cat photo URL">
<form action="/submit-cat-photo"></form>
this is what i have @kprenesti
i don't know how to nest my text input element within a form element.
Manish Giri
@Manish-Giri
Jan 30 2016 03:50
@pleedesigner
<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL”>
</form>
Pat Lee
@pleedesigner
Jan 30 2016 03:51
@Manish-Giri i see
@Manish-Giri thank you!!
CamperBot
@camperbot
Jan 30 2016 03:51
pleedesigner sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 615 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Jan 30 2016 03:51
@kprenesti is #states a form element?
@pleedesigner welcome
Krista Prenesti
@kprenesti
Jan 30 2016 03:53
It is.
@pleedesigner Look below:
```
@pleedesigner Actually, I agree with Manish-Giri.
Bob Rogers Munyenga "ROTSHI"
@RogersBobMunyenga
Jan 30 2016 03:56
please guys need help am doing the change font-size element challenge in html css but am having problems with "Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%."
Jawbh
@CaBra503
Jan 30 2016 03:57
anyone on local scope and functions?
Zachary Odden
@oddenzac
Jan 30 2016 03:57

Convert the assignments for a, b, and c to use the += operator.

a = a + 12;
b = 9 + b;
c = c + 7;

Krista Prenesti
@kprenesti
Jan 30 2016 03:57
@RogersBobMunyenga The last part just means that to see it correctly you need to have your browser set to 100% zoom, not, say 175%. Try p {
Zachary Odden
@oddenzac
Jan 30 2016 03:57
any help is appreciated
Jawbh
@CaBra503
Jan 30 2016 03:58
odenzac
Krista Prenesti
@kprenesti
Jan 30 2016 03:58
@RogersBobMunyenga try p{
Zachary Odden
@oddenzac
Jan 30 2016 03:58
yes?
Jawbh
@CaBra503
Jan 30 2016 03:58
a +=
value
its called a compoud operator
i believe..
Krista Prenesti
@kprenesti
Jan 30 2016 03:58
gah p { font-size: 16px;}
Adam Snetiker
@ajsnetiker
Jan 30 2016 03:58

@RogersBobMunyenga

Use p like @kprenesti said, then put set the font-size in the brackets. If you don’t know how, google CSS font size and it’ll tell you

or not
lol
sry different name for same thing
Adam Snetiker
@ajsnetiker
Jan 30 2016 03:59

@oddenzac @CaBra503 += is just a shorthand way of using a variable twice.

a += b is easier than writing a = a + b. It’s when you want to change the FIRST variable

hellomichiyabu
@hellomichiyabu
Jan 30 2016 03:59
@Manish-Giri
Jawbh
@CaBra503
Jan 30 2016 03:59
All youre doing is a Shorthand, or Abreviation of the a = a + 12
Zachary Odden
@oddenzac
Jan 30 2016 03:59
i got it, thanks @CaBra503
CamperBot
@camperbot
Jan 30 2016 03:59
oddenzac sends brownie points to @cabra503 :sparkles: :thumbsup: :sparkles:
:star: 243 | @cabra503 | http://www.freecodecamp.com/cabra503
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:00
@Manish-Giri arr.shift();?
Jason Ulaner
@julaner
Jan 30 2016 04:00
Hi all, im having trouble adding a font awesome icon in the bootstrap module. I’m trying to add a thumbs-up to my like button by nesting it in the buttton and its not working
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:00

@Manish-Giri function queue(arr, item) {
// Your code here

arr.shift();
return item; // Change this line
}

Jason Ulaner
@julaner
Jan 30 2016 04:01
  <button < i class="fa fa-thumbs-up"></i> class="btn btn-block btn-primary">Like</button>
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:01

'''function queue(arr, item) {
// Your code here

arr.shift();
return item; // Change this line
}'''

CamperBot
@camperbot
Jan 30 2016 04:01
:bulb: to format code use backticks! ``` more info
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:01

'''function queue(arr, item) {
// Your code here

arr.shift();
return item; // Change this line
}'''

CamperBot
@camperbot
Jan 30 2016 04:01
:bulb: to format code use backticks! ``` more info
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:01
@julaner your button tag isn’t closed
Manish Giri
@Manish-Giri
Jan 30 2016 04:01
This message was deleted
@hellomichiyabu what are you asked to return
Krista Prenesti
@kprenesti
Jan 30 2016 04:02
@hellomichiyabu What are the instructions for the waypoint?
Jason Ulaner
@julaner
Jan 30 2016 04:02
@ajsnetiker I have a closer after btn primary though?
Krista Prenesti
@kprenesti
Jan 30 2016 04:03
@julaner That closes the i element
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:04
@julaner no you have to have a closing bracket after every word. Your classes should be BEFORE the <i> tag
<button class=“btn btn-block btn-primary”><i class=“fa fa-thumbs-up”></button>
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:04
@Manish-Giri @kprenesti I tried to answer'queue([2], 1) should return 2'
Jason Ulaner
@julaner
Jan 30 2016 04:04
ok I’ll ty that ajsnetiker
Krista Prenesti
@kprenesti
Jan 30 2016 04:04
@hellomichiyabu ..which waypoint is it? What's the title?
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:05
@kprenesti Sorry for that.JS, "Stand in Line".
Manish Giri
@Manish-Giri
Jan 30 2016 04:06
@hellomichiyabu you just need return arr.shift();, I don’t know why you keep trying to target specific tests, you should try to write code for the given instructions
Krista Prenesti
@kprenesti
Jan 30 2016 04:07
@hellomichiyabu Actually, you want to do array.push(item);
Jason Ulaner
@julaner
Jan 30 2016 04:08
@ajsnetiker I got it, thanks for the help! I just removed the <i></i> and added "fa fa-thumbs-up” to my class
CamperBot
@camperbot
Jan 30 2016 04:08
julaner sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 277 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Matthew Johnson
@EmjayFlight
Jan 30 2016 04:10
Hello folks. We seem to be having trouble because the strOne.indexOf(splitSec[i]) comes back as -1, but returns true
function mutation(arr) {
  var strOne = arr[0].toLowerCase();
  var strTwo = arr[1].toLowerCase();
  var splitSec = strTwo.split("");
  var booleanContainer;
  for (var i = 0; i < strTwo.length; i++){
    if (strOne.indexOf(splitSec[i]) == -1){
      console.log(strOne.indexOf(splitSec[i]));
      booleanContainer = false;
    } 
    else {
      booleanContainer = true;
    }
  } return booleanContainer;
}
mutation(["hello", "neo"]);
Mateja Trifunovski
@Matko95
Jan 30 2016 04:11
@MrEmjay417 you need to break out of the loop at some point, because true will override your stored value
Jason Delaplain
@deladroid
Jan 30 2016 04:12
Found bug on "Return Early Pattern for Function". It's showing errors that I should get undefined when passing abTest(-2, 2), and it does.
Mateja Trifunovski
@Matko95
Jan 30 2016 04:12
@MrEmjay417 think about what every loop cycle does, and it should clear up for you
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:13
@Matko95 is correct... It will pass the IF test and set the booleanContainer to false.. Then it will look again and this time it will fail the IF test and set it to true.
Wendy White
@wendywat
Jan 30 2016 04:13

Here's an example of how you give your h2 element the id of cat-photo-app:

<h2 id="cat-photo-app">

Give your form element the id cat-photo-form.

please help
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:13
@wendywat please read carefully :P
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:14
@wendywat do the same thing, but instead of the <h2> find the <form>, and apply the id to that
look at the example and see what needs to be changed
Matthew Johnson
@EmjayFlight
Jan 30 2016 04:14
@ikrougovoi @Matko95 Alright guys! Thanks! We’ll get to work on that right away
CamperBot
@camperbot
Jan 30 2016 04:14
mremjay417 sends brownie points to @ikrougovoi and @matko95 :sparkles: :thumbsup: :sparkles:
:star: 516 | @matko95 | http://www.freecodecamp.com/matko95
:star: 245 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
Gary Morris
@fattox
Jan 30 2016 04:15

function bouncer(arr) {
function falsies(val) {
// val = true;
return Boolean(val);
}
arr = arr.filter(falsies);
return arr;
}

bouncer([7, "ate", "", false, 9, null, true]);

woops
function bouncer(arr) {
  function falsies(val) {
    // val = true;
    return Boolean(val);
  }
  arr = arr.filter(falsies);
  return arr;
}

bouncer([7, "ate", "", false, 9, null, true]);
for the Falsy Bouncers, how could you make it filter all the instances "true"?
i tried to set val (see comment) but that doesn't work
just trying to understand it better
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:16
@kprenesti .push means to add the number, then should I repeat the "testArr" and clear the number, and repeat ."push" and make the new arraylist?
Gary Morris
@fattox
Jan 30 2016 04:16
i read that the initial Bool value is false, but wondering how you'd change that in this case
Mateja Trifunovski
@Matko95
Jan 30 2016 04:17
@fattox you could do return true? but i'm not sure what you're trying to do
Gary Morris
@fattox
Jan 30 2016 04:17
i tried return true but it didnt work
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:17
@Manish-Giri '''return arr.shift();// Change this line
CamperBot
@camperbot
Jan 30 2016 04:17
:bulb: to format code use backticks! ``` more info
Gary Morris
@fattox
Jan 30 2016 04:17
i'm just trying to understand how you'd change the bool there from the initiated "false" state
just out of interest more than anything
Mateja Trifunovski
@Matko95
Jan 30 2016 04:17
This message was deleted
Gary Morris
@fattox
Jan 30 2016 04:18
yeah the argument is omitted because you have to declare the bool like that for it to be initiated as false, as far as i read
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:18
@fattox so you want to pass your array to a function.. If it finds a boolean that's false, switch it to true?
Gary Morris
@fattox
Jan 30 2016 04:18
nah i am trying to filter true
instead of all false values
just to see how it work
my understanding on this one is a bit foggy
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:19
@Manish-Giri Then I don't satisfy "queue([],1) should return 1" and "After queue (testArr,10) .myArr[4] should be 10"
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:19
@fattox here's a simple example I found
@fattox ```
@fattox function isBigEnough(value) { return value >= 10; } var filtered = [12, 5, 8, 130, 44].filter(isBigEnough); // filtered is [12, 130, 44]
function isBigEnough(value) {
  return value >= 10;
}
var filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
// filtered is [12, 130, 44]
Mateja Trifunovski
@Matko95
Jan 30 2016 04:20
@fattox the MDN states this Do not use a Boolean object to convert a non-boolean value to a boolean value. Instead, use Boolean as a function to perform this task:
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:20
@fattox here’s what I did..
  • create a new function with a parameter, let’s say x
  • declare a variable and set it to Boolean(x
  • check to see if that variable equals true, and if so return that variable
  • in the bouncer function, filter the OTHER unction you made
Gary Morris
@fattox
Jan 30 2016 04:20
ok, but true is bool, right? so how can you make it work
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:20
@Matko95 I think he's just trying to filter it.. Not convert it... According to what they said.
Wendy White
@wendywat
Jan 30 2016 04:20
its not working
Gary Morris
@fattox
Jan 30 2016 04:20
yeah just so that it returns all except true
as @ikrougovoi said
Manish Giri
@Manish-Giri
Jan 30 2016 04:21
@hellomichiyabu where is your push statement?
Gary Morris
@fattox
Jan 30 2016 04:21
not for the exercise, just for my understanding
i get how to use that example @ikrougovoi , but for the bools is seems a bit different... this code i put works because it creates the Bool as 'false' when initiated (from what i understand), so i'm wondering how to set that bool to true and return that so that 'true' is filtered instead
if it's not possible, fine... just wondering
i like to understand what i'm doing as much as i can :D
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:22
@fattox i would do the same thing but when you check for true values, just check for !== true instead
Gary Morris
@fattox
Jan 30 2016 04:22
hmm yeah i did try that @ajsnetiker ... i think it might be the best example
anyway thanks @ajsnetiker @ikrougovoi @Matko95
CamperBot
@camperbot
Jan 30 2016 04:23
fattox sends brownie points to @ajsnetiker and @ikrougovoi and @matko95 :sparkles: :thumbsup: :sparkles:
:star: 517 | @matko95 | http://www.freecodecamp.com/matko95
:star: 247 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
:star: 278 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:23

var trueVals = Boolean(x);
if (trueValues !== true) {
return trueValues;
}

that would return everything NOT true, but for the exercise i did the opposite

if thats the case the variable name is wrong but that’s ok
and of course that would all go inside whatever function name is being filtered
Gary Morris
@fattox
Jan 30 2016 04:24
cool, i will add it to my notes, thanks again!
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:24

function checkIfTrue(x) { …

then at the bottom of the BOUNCER function you’d say return arr.filter(checkIfTrue);

Zachary Odden
@oddenzac
Jan 30 2016 04:24

guys im having some troubles..

function convert(celsius) {
// Only change code below this line

// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(30);

The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.

You are given a variable celsius representing a temperature in Celsius. Create a variable fahrenheit and apply the algorithm to assign it the corresponding temperature in Fahrenheit.

edgar
@codemyassoff
Jan 30 2016 04:26
were do i go to Nest my text input element within a form element.
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:26

@oddenzac you’re missing the code to do the conversion. YOu don’t need typeof at all…

you need to do the math. fahrenheit = (celsius * (9/5)) + 32;

edgar
@codemyassoff
Jan 30 2016 04:26
im confused in this step
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:26
then return fahrenheit
Zachary Odden
@oddenzac
Jan 30 2016 04:26
ok, thanks @ajsnetiker i didnt put the parenthesis around it.
CamperBot
@camperbot
Jan 30 2016 04:26
oddenzac sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 279 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:26
@codemyassoff <form><input type=“text”> ….</input></form>
edgar
@codemyassoff
Jan 30 2016 04:26
<form action="/submit-cat-photo"></form>
Zachary Odden
@oddenzac
Jan 30 2016 04:28
var farenheit (celsius * (9/5)) +32;
what is wrong with this?
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:28
no = sign
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:28
@Manish-Giri "return arr.shift();", '.push' stays with this line?
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:29
fahrenheit = (celsius * 9/5) + 32;
Zachary Odden
@oddenzac
Jan 30 2016 04:29
still wrong :(
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:30
did you return fahrenheit?
Zachary Odden
@oddenzac
Jan 30 2016 04:30
how would i do that exactly?
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:30
@oddenzac just do.. return (celsius*(9/5))+32;
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:30
at the bottom of the function add return fahrenheit;
@oddenzac or you can do it the way @ikrougovoi said, but I like using another variable, makes it easier to read
Zachary Odden
@oddenzac
Jan 30 2016 04:31
it says illegal return statement
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:31
@oddenzac paste your code
@oddenzac paste your function inside of 3 ` (ticks)
Zachary Odden
@oddenzac
Jan 30 2016 04:32

function convert(celsius) {
// Only change code below this line
var farenheit = (celsius * (9/5)) + 32;

// Only change code above this line
if ( typeof fahrenheit !== 'undefined' ) {
return fahrenheit;
} else {
return 'fahrenheit not defined';
}
}

// Change the inputs below to test your code
convert(-30);

return (celsius * (9/5)) + 32;

function convert(celsius) {
  // Only change code below this line
  var farenheit = (celsius * (9/5)) + 32;

  // Only change code above this line
  if ( typeof fahrenheit !== 'undefined' ) {
    return fahrenheit;
  } else {
    return 'fahrenheit not defined';
  }
}

// Change the inputs below to test your code
convert(-30);

return (celsius * (9/5)) + 32;
Raunak Shona Thakur
@raunakshonathakur
Jan 30 2016 04:32

@raunakshonathakur

<input type="text" placeholder = "Cats photo">

<form action="/submit-cat-photo"></form>
Nest your text input element within a form element. I don't understand what am I supposed to do

Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:33
@oddenzac so now under your calculation put in "return farenheit"
Manish Giri
@Manish-Giri
Jan 30 2016 04:33
@raunakshonathakur
<form action="/submit-cat-photo”>
<input type="text" placeholder = "Cats photo”>
</form>
Igor Krougovoi
@ikrougovoi
Jan 30 2016 04:33
@oddenzac this tells the function to "return" what's inside the variable "farenheit".
Zachary Odden
@oddenzac
Jan 30 2016 04:33
got it, thank you @ajsnetiker @ikrougovoi
thank you @ajsnetiker
CamperBot
@camperbot
Jan 30 2016 04:34
oddenzac sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:warning: oddenzac already gave ajsnetiker points
Brock Callahan
@brockc
Jan 30 2016 04:34
Would anyone like to pair program on the "Smallest Common Multiple" challenge?
Mateja Trifunovski
@Matko95
Jan 30 2016 04:34
@oddenzac you wrote farenheit when it should be fahrenheit
Zachary Odden
@oddenzac
Jan 30 2016 04:34
thank you @ikrougovoi
CamperBot
@camperbot
Jan 30 2016 04:34
oddenzac sends brownie points to @ikrougovoi :sparkles: :thumbsup: :sparkles:
:star: 252 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:34
@oddenzac you don’t need your “return (celsius * (9/5) + 32) at the bottom if you did the calculation up top
and the return has to be inside the function brackets
was the typeof stuf already there? I don’t remember
if it was don’t touch it, but the return fahrenheit should go right below the equation
Zachary Odden
@oddenzac
Jan 30 2016 04:35
it was outside of the function brackets was my mistake
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:35
Someone please help me!
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:35
@hellomichiyabu what’s the problem?
Raunak Shona Thakur
@raunakshonathakur
Jan 30 2016 04:36
@Manish-Giri Thank you!
CamperBot
@camperbot
Jan 30 2016 04:36
raunakshonathakur sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 616 | @manish-giri | http://www.freecodecamp.com/manish-giri
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:36
I don't go "Stand in Line" in JS.
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:36
paste your code, i don’t remember that one
Manish Giri
@Manish-Giri
Jan 30 2016 04:36
@raunakshonathakur welcome!
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:37

function queue(arr, item) {
// Your code here

// return arr.shift();// Change this line
return arr.push(10);// Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

Fundamentaly, the console returns "Before:[1,2,3,4,5] 6, but what means 6?
@ajsnetiker I forget the mention, but would you tell me the guide in my post?
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:40
@hellomichiyabu I think it wants you to push 6 into the array, then shift out the first value
i can check mine to see what I did, but it was a fiarly easy one. don’t worry about the JSON stuff, it’s just those 2 lines
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:42
@ajsnetiker As '''return arr.push(6);// Change this line'''?
CamperBot
@camperbot
Jan 30 2016 04:42
:bulb: to format code use backticks! ``` more info
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:42
something like that I think!
i have a lot of browser tabs open, i’m trying to close them before I log back into FCC
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:44
@ajsnetiker I was taught ".shift" I should put, but return definitely allows the one line, isn't it? What should I do?
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:45
shift is to remove the first value. First you have to push the other one to the end…let me check, one sec
Zachary Odden
@oddenzac
Jan 30 2016 04:45
var myStr = "\\backslash\/ \t tab\t \t tab\t \r carriage-return\r \n new-line\n"; // Change this line
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:45
@oddenzac get rid of the words backslash and tab and carriage return, they only want the symbols that represent those things, which you have correct
Zachary Odden
@oddenzac
Jan 30 2016 04:46
Awesome, thanks again @ajsnetiker
CamperBot
@camperbot
Jan 30 2016 04:46
oddenzac sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:warning: oddenzac already gave ajsnetiker points
Zachary Odden
@oddenzac
Jan 30 2016 04:47
i hate javascript..
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:47
@oddenzac Me too.
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:51
@oddenzac @hellomichiyabu It’s tough at first, but pretend it’s a game or puzzle. It’s fun trying to figure it out, and once you do it’s rewarding. My problem, and maybe yours, is jumping right into the code. It helps to write things out in plain english, which is called psuedo code. If you write “if x is greater than 5, then add 3. Otherwise, keep x the same."
Zachary Odden
@oddenzac
Jan 30 2016 04:51
alright. thanks!
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:51
then you know…
if (x > 5) {
return x += 3;
} else {
return x;
}
something like that
it does get tough though!
i got stuck on some of the bonfires a while ago, they took along time
but that’s why if you get through i, the jobs pay really well +1
:+1:
it’s not stuff just anybody can do…which is exactly why I want to get better at it
hellomichiyabu
@hellomichiyabu
Jan 30 2016 04:53
@ajsnetiker Would you help me a bit...? I can't figure out anything in this stuff...cry
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:53
Yeah I just sent you a message too
look on the left and it should say my name
i’m checking, just clearing out my 30 browser tabs, it’s crazy
Zachary Odden
@oddenzac
Jan 30 2016 04:54
im kind of getting a hang of it though
Adam Snetiker
@ajsnetiker
Jan 30 2016 04:55
good!
Wendy White
@wendywat
Jan 30 2016 05:03
Your form element should have the background-color of green
i got the background to turn green how do i put it in form
?????
edgar
@codemyassoff
Jan 30 2016 05:18
i'm on the Add a Submit Button to a Form level and it said everything is correct except that the code should have a button inside it
<button type="submit">this button submits the form</button>
that is my code
can anybody help me
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:19
@codemyassoff I think submit is an input type. Try <input type=“submit”>
submit is ONLY for submit buttons, so i believei ts a separate type, whereas <button> can be for anything
edgar
@codemyassoff
Jan 30 2016 05:20
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" 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>
<button type="submit">this button submits the form</button>

<form action="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL">
</form>
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:20
@codemyassoff put your button inside your <form>
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:20
@codemyassoff your submit button needs to be before the </form> tag
otherwise it’s not part of the form
and if that doesn’t work, then again try input instead
edgar
@codemyassoff
Jan 30 2016 05:23
@ikrougovoi thanks and @ajsnetiker
CamperBot
@camperbot
Jan 30 2016 05:23
codemyassoff sends brownie points to @ikrougovoi and @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 280 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
:star: 261 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:29
@codemyassoff sure. Did it work?
Zachary Odden
@oddenzac
Jan 30 2016 05:30
Correct the assignment to myStr to achieve the desired effect.
// Setup
var myStr = "Jello World";

// Only change code below this line

myStr[0] = "H"; // Fix Me
what are they asking of me here?
nvm i got it
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:33
return BillCosby;
Zachary Odden
@oddenzac
Jan 30 2016 05:34
@ajsnetiker how far along are you with the challenges??
MuhammadSakhi
@MuhammadSakhi
Jan 30 2016 05:36
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> I do not understand this link does.What is lobster font and how can I import the lobster font to h2 element
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:36
@oddenzac I’m all done with the challenges and Bonfires. I’m up to the Ziplines, which are complete front-end projects. It’ll take me a while though, the project is to create a portfolio website. I have one, so I don’t really wanna make one from scratch but I have to in order to pass it … so i’ll do it, but i have real work to do first too
Zachary Odden
@oddenzac
Jan 30 2016 05:37
understandable, so you have put in how many hours you would say on freecodecamp?
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:37
@MuhammadSakhi the lobster font is already imported. Now you have to use CSS to apply the font to your H2 element.
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:38
I’ve finished around 75 hours worth, but the beginning took me FAR less. I’ve probably spent 30 hours maybe? It’s hard to tell because I don’t keep track, I log on a lot and only do a little bit at a time
Zachary Odden
@oddenzac
Jan 30 2016 05:41

You will need to use string operators to build a new string, result, using the provided variables: myNoun, myAdjective, myVerb, and myAdverb.

You will also need to provide additional strings, which will not change, in between the provided words.

We have provided a framework for testing your results with different words. The tests will run your function with several different inputs to make sure all of the provided words appear in the output, as well as your extra strings.

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  myNoun = "cat";
  myAdjective = "little";
  myVerb = "hit";
  myAdverb = "slowly";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks();
can i please have assistance on this one?
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line


  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:42
@oddenzac you need to return ONE string.
@oddenzac like "my big dog ran quickly".
MuhammadSakhi
@MuhammadSakhi
Jan 30 2016 05:42
ikrougovoi.Can u please write the code how to use lobster font on h2 element
Zachary Odden
@oddenzac
Jan 30 2016 05:42
how would i impliment that into the code
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:43
@oddenzac I would go back and see how to concatenate strings
@oddenzac There was a section on concatenating strings leading up to this section
@MuhammadSakhi I don't remember this challenge.. Does it ask you to create a class and set the font for that class to lobster? Then apply that class to your H2 element?
Zachary Odden
@oddenzac
Jan 30 2016 05:45
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  result = "myNoun" + "myAdjective" + "myVerb" + "myadverb";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
ok so i added that string but I am stuck on this still
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:45
@oddenzac "myName" is the name of a variable.
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:45

@MuhammadSakhi

h2 {
font-family: lobster;
}

something like that, it should work automatically I believe

Zachary Odden
@oddenzac
Jan 30 2016 05:45
how do I assign those words on the bottom to the variables
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:45
@oddenzac use a for loop
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:45
@oddenzac not a string... "myName" contains the word "dog".
@ajsnetiker this isn't a loop one.. Just a concatenate one
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:46
oh wait nevermind
yeah
you’re right
Zachary Odden
@oddenzac
Jan 30 2016 05:46
myNoun*
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:46
well no
myNoun = wordBlanks[i]
or
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:46
@ajsnetiker no this is the one where it calls the function with four distinct parameters
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:46
nevermind again
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:46
@ajsnetiker no arrays :P
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:46
ah ok
OH i see
@oddenzac myNoun, myAdjective etc are variables
Zachary Odden
@oddenzac
Jan 30 2016 05:47
im not sure what exactly i need to do with that code, my result comes up as myNoun myAdjective myVerb myAdverb
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:47
so they can’t be in quotes
Zachary Odden
@oddenzac
Jan 30 2016 05:47
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  result = "myNoun " + "myAdjective " + "myVerb " + "myadverb ";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:47
take away the quotes and you’re done
Zachary Odden
@oddenzac
Jan 30 2016 05:47
aaah i bet thats it
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:47
@ikrougovoi way too easy
lol
i just wasn’t looking at the code
shouldn’t even know what a for loop is at that point i don’t think
ha
Zachary Odden
@oddenzac
Jan 30 2016 05:49
ok so i am getting the correct results now, but my objectives arent giving it to me. This is what it calls for
wordBlanks("dog", "big", "ran", "quickly") should contain all of the passed words separated by non-word characters (and any additional words in your madlib).
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:49
@oddenzac so you need to make a sentence out of it and add spaces in between
so
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:50
@oddenzac you need it to say: "my big dog ran quickly"... So you have to fill in the spaces and the "my"
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:50
result = “I have a “ + myNoun + “ that is extremely “ + myAdjective “. Often, I use it to “ + myVerb + “ when I need something done “ + myAdverb;
I have a dog that is extremely big. Often, I use it to ran when I need something done quickly.
lol
Igor Krougovoi
@ikrougovoi
Jan 30 2016 05:51
@ajsnetiker you had too much time on your hands for that :P
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:52

@ikrougovoi Yeah, I’d even add a

myName and make it say Snoop dog

wordBlanks(“snoop”, “dog”, “ghetto”, “smoke”, “discreetly”)
Cory Walker
@cwalker88
Jan 30 2016 05:53
hello fellow campers
Zachary Odden
@oddenzac
Jan 30 2016 05:53
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  result = "My " + myAdjective + "fluffy " + myNoun + "named scruffy " + myVerb + "extremely " + myAdverb + "around the park";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog ", "big ", "ran ", "quickly ");
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:53

geekjokes

Zachary Odden
@oddenzac
Jan 30 2016 05:53
still not givin it to me
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:53
@oddenzac you’re missing a few spaces
Zachary Odden
@oddenzac
Jan 30 2016 05:54
my result shows it typed out correctly...
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:54
“ named scruffy “, “ extremely “, “ around the park “;
hmm
Zachary Odden
@oddenzac
Jan 30 2016 05:54
let me try something
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:54
@oddenzac my guess is you have to have them in THEIR order
put myNoun beore myAdjective
before*
it’s correct but that’s not the way the test wants it
Zachary Odden
@oddenzac
Jan 30 2016 05:55
GOT IT
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:55
was that it?
Zachary Odden
@oddenzac
Jan 30 2016 05:55
see how i have the spaces added in after the words in the wordblanks on the bottom of the script?
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:55
yeah
Zachary Odden
@oddenzac
Jan 30 2016 05:55
i removed those and added the spaces to the beginning of the words in the result
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:55
yeah that’s the way to do it
Zachary Odden
@oddenzac
Jan 30 2016 05:56
thanks for working through that with me @ajsnetiker
CamperBot
@camperbot
Jan 30 2016 05:56
oddenzac sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 281 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:56
easy enough…that’s where it gest frustrating sometimes though if you can’t figure it out!
Zachary Odden
@oddenzac
Jan 30 2016 05:56
and thanks @ikrougovoi
CamperBot
@camperbot
Jan 30 2016 05:56
:star: 266 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
oddenzac sends brownie points to @ikrougovoi :sparkles: :thumbsup: :sparkles:
Zachary Odden
@oddenzac
Jan 30 2016 05:56
just simple little things! but thats all coding is right? (:
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:56
yeah
it’s just a bunch of puzzles
but the api’s or documentation/syntax tells you what tools you have to do it
if you can solve problems you can code… if you can speak english then write things out and you can figure it out
Zachary Odden
@oddenzac
Jan 30 2016 05:57
yea!
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:57
i used to say i hate programming and pretty much gave up, but I decided it was the wrong way to go. I’m really trying to learn it beyond the basics and ultimately work in security
Zachary Odden
@oddenzac
Jan 30 2016 05:58
whats your ultimate goal in learning to code?
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:58
Networking people say “you have to know how a network functions in order to secure it” and the same goes for apps or the web
I’m self-taught, so i’m really good with HTML and CSS basics, same with JQuery once I learned it. But ‘vanilla javascript’…aka the full language without shortcuts…i’m not as good at
ultimately i want to learn whatever is most in demand…there are too many libraries and frameworks to learn them all
Zachary Odden
@oddenzac
Jan 30 2016 05:59
exactly!
but honestly i really appreciate all of the help you guys offer on here, it makes learning so much more enjoyable
Adam Snetiker
@ajsnetiker
Jan 30 2016 05:59
but i want to learn how things work so I can move onto other things…as I said security mostly. I was interested in it a long time ago but not the traditional IT route…so i have no interest in getting network+ or a+ certifications. MAYBE security+ if I need to, but i’m just hoping to end up doing somethign web-related, or maybe mobile
i’m not 100% sure yet i just know with all the cybercrime and terrorist stuff that goes on it fuels a desire to want to stop someone..and just once be able to say “not this time!"
Zachary Odden
@oddenzac
Jan 30 2016 06:00
yea! and they have employers hiring people who graduate from this website too so thats a great tool to have
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:00
always hear people on the news talking about how it works behind the scenes and intelligence and stuff like that
Zachary Odden
@oddenzac
Jan 30 2016 06:00
right
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:00
yeah it is, and it’s free which makes it better. I’m thinking about investing in a mentor but i’m not sure what program
Edward Hong
@edward-hong
Jan 30 2016 06:01

Hi I'm having trouble figuring out the url needed for the Open Weather API needed for .getJSON

$.getJSON("api.openweathermap.org/data/2.5/weather?lat=" + latitude + "&lon=" + longitude + "&APPID=b8ba5cb2965ac46ea0e1d3243f00497a", function(json){
            console.log(json);
        });

the latitude and longitude variables hold the coordinates I've gotten from the geolocation API and I've appended the API key to the end of the url but I'm getting 404 error on the console can anyone please help with this?

Adam Snetiker
@ajsnetiker
Jan 30 2016 06:01
I can say my strategy is completely different though. I got laid off in July of last year so i’ve been looking for a full time job… but for the first few months i was one of those people who just sat back and hit apply on a bunch of postings. That doesn’t work, so i joined a bunch of meetup groups, (including FreeCodeCamp LA, that’s how i discovered the site)
and im joining organizations that are free or cheap to network
and looking for conferences. Check out www.allremoteconfs.com , they have 12per year. I found the one on javascript earlier this month, it was awesome. February 24th is “Freelance Remote Conf”. They also have one for newbies, and Git and iOS and things. you can buy a package that makes it under 100 for each conference and it’s all online
the guy who hosts them is awesome
Zachary Odden
@oddenzac
Jan 30 2016 06:03
sounds great!
well best of luck to you in your future and plans
Igor Krougovoi
@ikrougovoi
Jan 30 2016 06:03
@edward-hong you try to "curl" it in the console?
@edward-hong you using a Mac or a Windows machine?
Edward Hong
@edward-hong
Jan 30 2016 06:03
windows
what's curl?
Igor Krougovoi
@ikrougovoi
Jan 30 2016 06:04
@edward-hong it basically lets you run HTTP get/post/put/etc. in your cmd line
@edward-hong the quick way to do this without installing CURL on your windows is to just get your JavaScript to console.log the URL that it's sending.
@edward-hong copy/paste that URL into a browser window and see what it is.
@edward-hong 404 just means you're hitting the wrong URL so there's something wrong with the way you're putting the URL together.
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:05
@oddenzac thanks. You too…what’s your goal?
CamperBot
@camperbot
Jan 30 2016 06:05
ajsnetiker sends brownie points to @oddenzac :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for oddenzac
Edward Hong
@edward-hong
Jan 30 2016 06:05
ok i'll try that
Zachary Odden
@oddenzac
Jan 30 2016 06:06
well, I am a college student/athlete. My life dream is to own a business, I am very entrepreneur like minded. I want to create something and be able to call it mine. I have experimented with many different things like different website types and music production along with game production also.
so maybe I will use this knowledge to create something or not, but the knowledge gained is only going to get more and more valuable as the world starts to revolve around computers even more in the near future
Edward Hong
@edward-hong
Jan 30 2016 06:07
thanks @ikrougovoi forgot to add http:// at the beginning of the url
CamperBot
@camperbot
Jan 30 2016 06:07
edward-hong sends brownie points to @ikrougovoi :sparkles: :thumbsup: :sparkles:
:star: 268 | @ikrougovoi | http://www.freecodecamp.com/ikrougovoi
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:08
@oddenzac nice, very true. Athletes are awesome, what sport do you play?
Zachary Odden
@oddenzac
Jan 30 2016 06:08
baseball!
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:12
nice
Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:12
Hi, Noob here, I don't understand what it means by "Nest your text input element within a form element."
Can anybody help?
<form action="/submit-cat-photo"input type="text" placeholder="cat photo URL"></form>
This is apparently incorrect
Aleksander Gębicki
@Takumar
Jan 30 2016 06:14
@Kelvin-penang hi, find in your code element which begins with: <input type="text"... you should put that element between <form> and </form> tags.
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:14
@Kelvin-penang <input type=“text”> is its own tag. That goes between the <form>.. and </form> tags
Zachary Odden
@oddenzac
Jan 30 2016 06:14
you have quotations around input type
text i mean
Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:14
Thanks! :)
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:15
<form …><input…></form>
that’s how it should look, with all the other stuff
Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:15
thanks again
Zachary Odden
@oddenzac
Jan 30 2016 06:15
@Kelvin-penang make sure you say thank you! and quote whoever helped you!
CamperBot
@camperbot
Jan 30 2016 06:15
oddenzac sends brownie points to @kelvin-penang :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for kelvin-penang
Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:16
no idea what brownie points are, but thanks!@
Aleksander Gębicki
@Takumar
Jan 30 2016 06:17
explain brownie
CamperBot
@camperbot
Jan 30 2016 06:17

:point_right: brownie points [wiki]

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

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

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

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

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

Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:17
Thanks @oddenzac @ajsnetiker & @Takumar !
CamperBot
@camperbot
Jan 30 2016 06:17
kelvin-penang sends brownie points to @oddenzac and @ajsnetiker and @takumar :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for oddenzac
:star: 1996 | @takumar | http://www.freecodecamp.com/takumar
:star: 282 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Zachary Odden
@oddenzac
Jan 30 2016 06:18
why does it say that it can not find a receiver for me??
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:18
I’m not sure i saw that before
Aleksander Gębicki
@Takumar
Jan 30 2016 06:18
@Kelvin-penang you are welcome
@oddenzac maybe you changed your name on GitHub or on FCC?
Zachary Odden
@oddenzac
Jan 30 2016 06:21
can we try it now?
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:21
@oddenzac let’s see
Zachary Odden
@oddenzac
Jan 30 2016 06:21
if you dont mind sending me brownie points (:
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:21
thanks @oddenzac
CamperBot
@camperbot
Jan 30 2016 06:21
ajsnetiker sends brownie points to @oddenzac :sparkles: :thumbsup: :sparkles:
:star: 174 | @oddenzac | http://www.freecodecamp.com/oddenzac
Zachary Odden
@oddenzac
Jan 30 2016 06:21
YAY
i just hadnt linked the accounts... hahaha
how do you call a function again?
nvm got it
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:23
just type the name of it
Zachary Odden
@oddenzac
Jan 30 2016 06:23
i want to work on the cat app more!
Aleksander Gębicki
@Takumar
Jan 30 2016 06:25
about @oddenzac
CamperBot
@camperbot
Jan 30 2016 06:25
:star: 175 | @oddenzac | http://www.freecodecamp.com/oddenzac
Kelvin-penang
@Kelvin-penang
Jan 30 2016 06:25
thanks @oddenzac
CamperBot
@camperbot
Jan 30 2016 06:25
kelvin-penang sends brownie points to @oddenzac :sparkles: :thumbsup: :sparkles:
:star: 176 | @oddenzac | http://www.freecodecamp.com/oddenzac
Zachary Odden
@oddenzac
Jan 30 2016 06:26
Instructions
Create a function called myFunction that accepts two arguments and outputs their sum to the dev console.
Call the function.
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(1, 2) {

  myFunction()
}
what do i need to do for this, a little confused
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:28
@oddenzac create your own function like the example. The example shows subtraction, but make your function addition and use variables. the 1 and 2 would go at the bottom when you’re calling the function to test it
Aleksander Gębicki
@Takumar
Jan 30 2016 06:28
@oddenzac just check given example where function ourFunction accepts also two arguments, and it is called below.
Zachary Odden
@oddenzac
Jan 30 2016 06:29
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(c, d) {

console.log(c + d);
}
myFunction(1 , 2);
so i fixed my code but its still incorrect
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:29
i think they want you to return c + d instead of printing it
so take out console.log
Zachary Odden
@oddenzac
Jan 30 2016 06:30
not doin it
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(c, d) {


}
myFunction(1 + 2);
tried c and d on the bottom there also
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:31
no what you had before was correct
it just needs to say return c+d instead of console.log(c+d);
Zachary Odden
@oddenzac
Jan 30 2016 06:33
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(c, d) {

myFunction(c + d); 

}
like this?
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:33
function myFunction(c, d) {
   return c + d;
}

myFunction(2, 3); //returns 5
Zachary Odden
@oddenzac
Jan 30 2016 06:33
sorry if this is stupid im just not grasping exactly what they want
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:33
you’re just not returning anything
Zachary Odden
@oddenzac
Jan 30 2016 06:34
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(c, d) {

return (c + d);

}

myFunction(1 + 2);
Aleksander Gębicki
@Takumar
Jan 30 2016 06:34

@oddenzac this code:

// Example function ourFunction(a, b) { console.log(a - b); } ourFunction(10, 5); // Outputs 5 // Only change code below this line. function myFunction(c, d) { console.log(c + d); } myFunction(1 , 2);

you showed us earlier is good.

Adam Snetiker
@ajsnetiker
Jan 30 2016 06:34
in order for a function to work it has to return a value. A function, to describe it simply, takes an input, does something to it and gives you an output. The RETURN keyword tells you what to output
@oddenzac yeah that should be right, no?
Aleksander Gębicki
@Takumar
Jan 30 2016 06:34
@ajsnetiker you don't have to return anything in that exercise, just using console.log()
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:34
you don’t necessarily need the parenthesis around c+d though
ah ok
Zachary Odden
@oddenzac
Jan 30 2016 06:34
its not right @ajsnetiker
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:34
i wondered why it wasn’t working for him then
let me check mine
Aleksander Gębicki
@Takumar
Jan 30 2016 06:35
@oddenzac try once again to run such code:
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.
function myFunction(c, d) {
  console.log(c + d);
}
myFunction(1, 2);
@oddenzac myFunction(1, 2); should pass two arguments separated with comma.
Zachary Odden
@oddenzac
Jan 30 2016 06:36
i copied and pasted that in and still didnt work
Aleksander Gębicki
@Takumar
Jan 30 2016 06:36
@ajsnetiker try using another web browser, this code is good for sure.
Refresh browser. Also use "Reset" button on the exercise.
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:36
let’s see
Zachary Odden
@oddenzac
Jan 30 2016 06:38
yea i refreshed the browser and then it worked... weird
thanks @Takumar @ajsnetiker
CamperBot
@camperbot
Jan 30 2016 06:38
oddenzac sends brownie points to @takumar and @ajsnetiker :sparkles: :thumbsup: :sparkles:
:warning: oddenzac already gave ajsnetiker points
Aleksander Gębicki
@Takumar
Jan 30 2016 06:38
@oddenzac something wrong had to stay in cache of web browser.
CamperBot
@camperbot
Jan 30 2016 06:38
:star: 1998 | @takumar | http://www.freecodecamp.com/takumar
Zachary Odden
@oddenzac
Jan 30 2016 06:39
alright, im off to bed. Was nice talking to you guys, have a good one!
Aleksander Gębicki
@Takumar
Jan 30 2016 06:39
Good night, I am also leaving.
Adam Snetiker
@ajsnetiker
Jan 30 2016 06:39
nite
i’m gonna go too
Munish Tayal
@munishtayal
Jan 30 2016 06:47
Help! I want to remove . and any airthmetic operator from the string if they are last character. how to do that?
CamperBot
@camperbot
Jan 30 2016 06:47
no wiki entry for: i want to remove and any airthmetic operator from the string if they are last character how to do that
Priyanko9
@Priyanko9
Jan 30 2016 06:59
hello
Brian
@Brian984
Jan 30 2016 06:59
In bootstrap, is it required that you wrap your content in a container class in order to use the row class? Or can you use the row class somehow without it?
Utkarsh Bhimte
@Utkarshbhimte
Jan 30 2016 07:02
Maulik Darji
@maulikdarji
Jan 30 2016 07:10
@Utkarshbhimte your minute and seconds variables are local to function convertFormat(), and you are trying to access them in other functions.
Try making them globals.
DIO
@dhrubesh
Jan 30 2016 07:12
<label> <input type="button" class="btn" >Like </label>
is their anything wrong in the above code?
inorder to Create a Bootstrap Button
Utkarsh Bhimte
@Utkarshbhimte
Jan 30 2016 07:14
Yeah but I am returning a string instead
@maulikdarji
I am not calling those variables outside of that function either
cannelflow
@cannelflow
Jan 30 2016 07:27
@dhrubesh which exercise?
DIO
@dhrubesh
Jan 30 2016 07:27
thanks @cannelflow I figured it out myself
CamperBot
@camperbot
Jan 30 2016 07:27
dhrubesh sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 647 | @cannelflow | http://www.freecodecamp.com/cannelflow
cannelflow
@cannelflow
Jan 30 2016 07:27
Hello @maulikdarji long time
@dhrubesh :+1:
Devashish
@newbie-07
Jan 30 2016 07:32
@asponer6 please close the opened <p> tag
@asponer6 at second instance it is still open
Allie Posner
@asponer6
Jan 30 2016 07:33
thank you so much, do you know how to do the last step? Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
Kelvin-penang
@Kelvin-penang
Jan 30 2016 07:35
<form action="/submit-cat-photo" id="cat-photo-app">
I'm trying to give an element an id
what am I doing wrong? :worried: :
Allie Posner
@asponer6
Jan 30 2016 07:36
wait i'm sorry, where do I write it?
DIO
@dhrubesh
Jan 30 2016 07:37
@Kelvin-penang send the full code
Kelvin-penang
@Kelvin-penang
Jan 30 2016 07:37

<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;
}
.gray-background {
background-color: gray;
}
</style>

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<div class="gray-background">
<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>
</div>

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

DIO
@dhrubesh
Jan 30 2016 07:38
@Kelvin-penang you have not made the id element in the style
add #cat-photo-app{
between <style> </style>
Devashish
@newbie-07
Jan 30 2016 07:38

@asponer6 between <style> .......</style> you can insert CSS properties. In this case you want to change or modify how things will look in <p>.

so between style tags

p{

}

Allie Posner
@asponer6
Jan 30 2016 07:39
ok thank you, I will try it right now. I really appreciate your help!!
Devashish
@newbie-07
Jan 30 2016 07:40

@asponer6 between those curly brackets you can insert property like this

color:red;
font-size:16px;

etc. etc.

Kelvin-penang
@Kelvin-penang
Jan 30 2016 07:41
@dhrubesh Thanks!
CamperBot
@camperbot
Jan 30 2016 07:41
kelvin-penang sends brownie points to @dhrubesh :sparkles: :thumbsup: :sparkles:
DIO
@dhrubesh
Jan 30 2016 07:41
@Kelvin-penang I hope it worked for you?
CamperBot
@camperbot
Jan 30 2016 07:41
:star: 85 | @dhrubesh | http://www.freecodecamp.com/dhrubesh
Devashish
@newbie-07
Jan 30 2016 07:41
@asponer6 you are welcome
DIO
@dhrubesh
Jan 30 2016 07:42
@Kelvin-penang I was stuck in the same challenge yesterday haha! and most welcome!
Devashish
@newbie-07
Jan 30 2016 07:44
@asponer6 completed the challenge?
@newbie-07 but it didn't work I don't know why
Devashish
@newbie-07
Jan 30 2016 07:50
@asponer6 observe carefully...what do you see that does not belong to the excercise?
I made deleted few things and it went through... @asponer6
@asponer6 Try to do it yourself first...if not I will point out. Try try
cannelflow
@cannelflow
Jan 30 2016 07:51
in style
@asponer6 this is how we give value background-color:red
Allie Posner
@asponer6
Jan 30 2016 07:52
@newbie-07 I figured it out, I just totally over looked it but I got it thank you SO much!!
CamperBot
@camperbot
Jan 30 2016 07:52
asponer6 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
:star: 271 | @newbie-07 | http://www.freecodecamp.com/newbie-07
Devashish
@newbie-07
Jan 30 2016 07:52
@asponer6 great...you did it..
@newbie-07 thank you
CamperBot
@camperbot
Jan 30 2016 08:14
asponer6 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
:warning: asponer6 already gave newbie-07 points
Maulik Darji
@maulikdarji
Jan 30 2016 08:17
@cannelflow hii
Anshumakkar
@Anshumakkar
Jan 30 2016 08:28
Hi All, if an objects has a property which has value defined as NaN
how do we check it
Markus Kiili
@Masd925
Jan 30 2016 08:29
@Anshumakkar value===value
Devashish
@newbie-07
Jan 30 2016 08:29
@asponer6 If you need the image below your paragraphs then insert the img at the bottom after the two <p> elements
Anshumakkar
@Anshumakkar
Jan 30 2016 08:30
@Masd925 :I think that does not work for NaN
Allie Posner
@asponer6
Jan 30 2016 08:30
@newbie-07 I guess I need it where the assignment says but I will try it but thank you
CamperBot
@camperbot
Jan 30 2016 08:30
asponer6 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
:warning: asponer6 already gave newbie-07 points
Markus Kiili
@Masd925
Jan 30 2016 08:31
@Anshumakkar value===value is only false for NaN.
Devashish
@newbie-07
Jan 30 2016 08:31
@asponer6 assignment does not specify that...it is your choice at least for this challenge
Markus Kiili
@Masd925
Jan 30 2016 08:31
@Anshumakkar So value!==value tests for NaN. So does: typeof value === "number" && isNaN(value);
Allie Posner
@asponer6
Jan 30 2016 08:32
@newbie-07 I got it correct, thank you so much!! I really appreciate your help
CamperBot
@camperbot
Jan 30 2016 08:32
asponer6 sends brownie points to @newbie-07 :sparkles: :thumbsup: :sparkles:
:warning: asponer6 already gave newbie-07 points
Devashish
@newbie-07
Jan 30 2016 08:32
@asponer6 my pleasure :)
Anshumakkar
@Anshumakkar
Jan 30 2016 08:33
@Masd925 : http://www.freecodecamp.com/challenges/everything-be-true
I have passed all TC's except one. for NaN
function every(collection, pre) {




  var exists=true;
  for(var i=0;i<collection.length;i++){
    if(collection[i].hasOwnProperty(pre)===true){

      if((collection[i][pre]===undefined)||collection[i][pre]===null||(collection[i][pre]==="")||(collection[i][pre]==='0')||(collection[i][pre]===0)){
        exists=false;
        break;
      }else{
      exists=(true&&exists);
      }
    }else{
      exists=false;
      break;
    }

  }

  return exists;
}

every([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastFoward", "onBoat": true}], "onBoat");
@Masd925 : This is the failed TC
every([{"single": "double"}, {"single": NaN}], "single") should return false
Markus Kiili
@Masd925
Jan 30 2016 08:36
@Anshumakkar Just put the value!==value test for collection[i][pre] on the condition and it works.
Maulik Darji
@maulikdarji
Jan 30 2016 08:36
Anshumakkar
@Anshumakkar
Jan 30 2016 08:36
@Masd925 : Thanks
CamperBot
@camperbot
Jan 30 2016 08:36
anshumakkar sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 860 | @masd925 | http://www.freecodecamp.com/masd925
Maulik Darji
@maulikdarji
Jan 30 2016 08:37
Markus Kiili
@Masd925
Jan 30 2016 08:38
@Anshumakkar if clause has automatic coercion to boolean, so you don't actually need to compare to all the falsies.
Anshumakkar
@Anshumakkar
Jan 30 2016 08:38
Okies!! @Masd925
@maulikdarji : One thing are you adding search results in opposite Fashion
Markus Kiili
@Masd925
Jan 30 2016 08:39
@Anshumakkar One for loop and one if is enough.
Anshumakkar
@Anshumakkar
Jan 30 2016 08:39
@maulikdarji : I searched for Pathankot terrorist attack, and your search results shows the last link as actual related Information
DIO
@dhrubesh
Jan 30 2016 09:06
what is the use of “container-fluid” in <div class=“container-fluid”> ?
Shameer S N
@shameersn
Jan 30 2016 09:13
@dhrubesh Use ".container-fluid" for a full width container, spanning the entire width of your viewport.
DIO
@dhrubesh
Jan 30 2016 09:14
didnt get you in simple language plz ?
Shameer S N
@shameersn
Jan 30 2016 09:20
@dhrubesh div with class ".container-fluid" will cover full screen width available
DIO
@dhrubesh
Jan 30 2016 09:45
@shameersn got it thnx
CamperBot
@camperbot
Jan 30 2016 09:45
dhrubesh sends brownie points to @shameersn :sparkles: :thumbsup: :sparkles:
:star: 20 | @shameersn | http://www.freecodecamp.com/shameersn
CarrKeys
@CarrKeys
Jan 30 2016 09:53
What the difference between '&&' and '||' in Javascript declarations?
Markus Kiili
@Masd925
Jan 30 2016 09:54
@CarrKeys && is logical and, || is logical or.
CarrKeys
@CarrKeys
Jan 30 2016 09:54
@Masd925 Oh thanks!
CamperBot
@camperbot
Jan 30 2016 09:54
carrkeys sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 861 | @masd925 | http://www.freecodecamp.com/masd925
CarrKeys
@CarrKeys
Jan 30 2016 09:55
Hm, there's stuff in FreeCodeCamp that I haven't learned for in particular challenges that I would otherwise find in other resources.
Shameer S N
@shameersn
Jan 30 2016 10:15
@dhrubesh :)
Ciprian
@Cipriot
Jan 30 2016 10:32
Hi all!
Richard Andrews
@Whiplash5057
Jan 30 2016 10:38
var MotorBike = function() {
this.wheels = 2;
this.engines = 1;
this.seats = 4;
};
Guys just want to know . Is wheels a property or an object??
Jago Kosolosky
@Jago-Kosolosky
Jan 30 2016 10:47

Truncate a string

function truncate(str, num) {
  if(num <= 3){
    return str.slice(0, num) + "...";
  }else if(str.length > num){
    return str.slice(0, (num-3)) + "...";
  }
}

This is not working on the 3rd and 4th control string but I'm not sure why. Can anyone help?

Chad Kreutzer
@ChadKreutzer
Jan 30 2016 11:07
@Jago-Kosolosky you don't have anything to handle if num is longer than str.length.
(or equal to it)
Jago Kosolosky
@Jago-Kosolosky
Jan 30 2016 11:08
@ChadKreutzer Got it, thanks!
CamperBot
@camperbot
Jan 30 2016 11:08
jago-kosolosky sends brownie points to @chadkreutzer :sparkles: :thumbsup: :sparkles:
:star: 440 | @chadkreutzer | http://www.freecodecamp.com/chadkreutzer
Chad Kreutzer
@ChadKreutzer
Jan 30 2016 11:08
@Jago-Kosolosky no prob.
Richard Andrews
@Whiplash5057
Jan 30 2016 11:15
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {
    var gear = 10;
  this.getGear = function(count){
    return count;
  };
  this.setGear = function(number){
    return number;
  };
  // Only change code below this line.

};

var myCar = new Car();
var myBike = new Bike();
myBike.getGear();
myBike.setGear();
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {
    var gear = 10;
  this.getGear = function(count){
    return count;
  };
  this.setGear = function(number){
    return number;
  };
  // Only change code below this line.

};

var myCar = new Car();
var myBike = new Bike();
myBike.getGear(4);
myBike.setGear(5);
Guys I want the code to return 4 5 when I pass myBike.getGear and myBike.setGear !!
why isn't it working?
Maulik Darji
@maulikdarji
Jan 30 2016 11:17
@Anshumakkar because this is a wikipedia article search..and i am not sure what sorting criteria the search API returns :(
Maulik Darji
@maulikdarji
Jan 30 2016 11:35
@Whiplash5057 what error are you getting?
Mohamed Fahadh
@fahadh14
Jan 30 2016 11:40
@Whiplash5057 whats the exercise name
Richard Andrews
@Whiplash5057
Jan 30 2016 11:41
Hey @maulikdarji @fahadh14 I fixed it guys ...!!! Thanks :smile:
CamperBot
@camperbot
Jan 30 2016 11:41
whiplash5057 sends brownie points to @maulikdarji and @fahadh14 :sparkles: :thumbsup: :sparkles:
:star: 246 | @fahadh14 | http://www.freecodecamp.com/fahadh14
:star: 435 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
Maulik Darji
@maulikdarji
Jan 30 2016 11:41
@Whiplash5057 :+1:
Mohamed Fahadh
@fahadh14
Jan 30 2016 11:41
gj
codewormforevaa
@codewormforevaa
Jan 30 2016 11:45
how do I target div elements with the class well by using the $(".well") selector?
Mohamed Fahadh
@fahadh14
Jan 30 2016 11:50
hi i need help with this oop part
var oldArray = [1,2,3,4,5];
var newArray = [];

// Only change code below this line.
var plusThree = oldArray.map(function(val){
  return val + 3;
});
newArray = oldArray;
it still shows [1,2,3,4,5] :<
supposed to add 3 to each value
Maulik Darji
@maulikdarji
Jan 30 2016 11:53
@fahadh14 return plusThree instead;
DIO
@dhrubesh
Jan 30 2016 11:53
what is the function of <form action> ?
Maulik Darji
@maulikdarji
Jan 30 2016 11:55
@dhrubesh The action attribute specifies where to send the form-data when a form is submitted.
DIO
@dhrubesh
Jan 30 2016 11:56
cool
Mohamed Fahadh
@fahadh14
Jan 30 2016 11:59
@maulikdarji still doesnt work :/
Richard Andrews
@Whiplash5057
Jan 30 2016 12:01
@fahadh14

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

// Only change code below this line.

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

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

// Only change code below this line.

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

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

// Only change code below this line.
var plusThree = oldArray.map(function(val){
return val + 3;
});
newArray = plusThree;

BOTH WORK
Mohamed Fahadh
@fahadh14
Jan 30 2016 12:06
@Whiplash5057 ahh them careless errors
ty
Thanks! @Whiplash5057
CamperBot
@camperbot
Jan 30 2016 12:07
fahadh14 sends brownie points to @whiplash5057 :sparkles: :thumbsup: :sparkles:
:star: 243 | @whiplash5057 | http://www.freecodecamp.com/whiplash5057
wei wang
@luyi1678
Jan 30 2016 12:08
Hello, everybody, I'm now working on
Richard Andrews
@Whiplash5057
Jan 30 2016 12:10
COol @fahadh14
Hey guys where do you come to know how many brownie points do you have ...Kinda new to this thing!!
wei wang
@luyi1678
Jan 30 2016 12:12
I'm learning how to add border to an image, but got stuck, here's my code, can anyone help me out
Mohamed Fahadh
@fahadh14
Jan 30 2016 12:14
@Whiplash5057 you got 243
i think check your own profile
Richard Andrews
@Whiplash5057
Jan 30 2016 12:15
Haa!! where is that ?
@fahadh14
@Whiplash5057
wei wang
@luyi1678
Jan 30 2016 12:16
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
Richard Andrews
@Whiplash5057
Jan 30 2016 12:17
I thought the [] was the no. of exercises completed !!
@fahadh14
Mohamed Fahadh
@fahadh14
Jan 30 2016 12:18
i think it includes brownie points
but im not so sure
Richard Andrews
@Whiplash5057
Jan 30 2016 12:18
COOL
wei wang
@luyi1678
Jan 30 2016 12:24
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
Sueshi
@Sueshi
Jan 30 2016 12:24
Hello World
CamperBot
@camperbot
Jan 30 2016 12:24

welcome to FreeCodeCamp @Sueshi!

Jago Kosolosky
@Jago-Kosolosky
Jan 30 2016 12:27
@Sueshi Welcome!
wei wang
@luyi1678
Jan 30 2016 12:29
Can anyone tell me how to insert an image of my code to my chatting content?
thewinsword
@thewindsword
Jan 30 2016 12:41
function palindrome(str) {
  // Good luck!
  var expression = /\s|\.|,/gi;
//return str;=>0_0 (: /- :) 0-0
  str = str.toLowerCase().replace(expression,'');
  var reverseStr = str.split('').reverse().join('');
  if(str === reverseStr){
    return true;
  }
  return false;  
}
palindrome("0_0 (: /-\ :) 0-0");
what should i do?
Check for Palindromes
thewinsword
@thewindsword
Jan 30 2016 12:59
I've solved it.my regex problem
wei wang
@luyi1678
Jan 30 2016 12:59
how to post a screenshot? I'm using an android phone.
Ivan Temchur
@ttemcha
Jan 30 2016 12:59
@thewindsword there : sign
@thewindsword there no
Andrew
@gskll
Jan 30 2016 13:07
help factorialize a number
CamperBot
@camperbot
Jan 30 2016 13:07

:point_right: bonfire factorialize a number [wiki]

Problem Explanation:

Return the factorial of the provided integer. If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.

Factorials are often represented with the shorthand notation n!

For example: 5! = 1 * 2 * 3 * 4 * 5 = 120

:pencil: read more about bonfire factorialize a number on the FCC Wiki

cannelflow
@cannelflow
Jan 30 2016 13:08
@luyi1678 take screen shot and drag image to chat
Alex
@Jeckstex
Jan 30 2016 13:09
help create a script element
CamperBot
@camperbot
Jan 30 2016 13:09
no wiki entry for: create a script element
KoToZ
@Mohamedtareque
Jan 30 2016 13:15

hey guys

quoteAuthor=randomQuote.split("@");

what's the role of @ here inside split ?

Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:15
Hi everyone,
Mafalda
@otmeek
Jan 30 2016 13:16
@Mohamedtareque splits the string into an array, looks for @ to separate each array element
so "username@domain" becomes ["username", "domain"]
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:17
There is an error in challenges 248 last test. Minus sign and the underscore can't match to get a palindrome
Aleksander Gębicki
@Takumar
Jan 30 2016 13:18
@mncode you have to remove minus characters and underscores
Palindromes should contain only characters and numbers.
Maybe you need to correct your regular expression.
cannelflow
@cannelflow
Jan 30 2016 13:18
@mncode what you tried so far
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:19
I replaced non alphanumeric characters byan empty one
Aleksander Gębicki
@Takumar
Jan 30 2016 13:19
@mncode show how you did this.
wei wang
@luyi1678
Jan 30 2016 13:19
@cannelflow thanks for your reply, but I'm now doing this on my android phone, so l don't how to drag, cauz the chatbox and the screenshot aren't in a same screen, is there anyother way to do this?
CamperBot
@camperbot
Jan 30 2016 13:19
luyi1678 sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:19
replace(/\W/g, '')
CamperBot
@camperbot
Jan 30 2016 13:19
:star: 658 | @cannelflow | http://www.freecodecamp.com/cannelflow
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:20
@Takumar replace(/\W/g, '')
cannelflow
@cannelflow
Jan 30 2016 13:20
@luyi1678 not sure
@mncode try this then replace(/[^A-Z^a-z^0-9]/g, '');
Aleksander Gębicki
@Takumar
Jan 30 2016 13:21
@mncode and that is your problem. \W will not remove underscores :-(
You have to add underscores in your regexp.
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:21
Ok, I get it
thank you
Aleksander Gębicki
@Takumar
Jan 30 2016 13:22
@mncode \W in JS means all what is not digit, letter and underscore. Use or operator | to add underscore.
Maulik Darji
@maulikdarji
Jan 30 2016 13:32
Reviews Please: http://codepen.io/maulikdarji/full/QyqOKg
Local Weather App
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 13:38
hi I'm on creat a form element I need nest element could someone please tell me where I put it
Maulik Darji
@maulikdarji
Jan 30 2016 13:41
@Rebeccagunner88 <form> ... nested elements .. </form>
What you want to nest?
sigursiguros
@sigursiguros
Jan 30 2016 13:41
i'm having an issue with my googleMap alignment. I put in margin-left but it wouldn't adjust the position of the map. can you give me some clues.
can someone help?
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 13:41
action="submit-cat-photo"
Maulik Darji
@maulikdarji
Jan 30 2016 13:42
@Rebeccagunner88 ok..it goes like this .. <form action="submit-cat-photo">
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 13:43
do I start new line or it go under another element
budimanfix
@budimanfix
Jan 30 2016 13:44

hello any one can give example for this : ```html

<script> $(document).ready(function()
{function with});

```

Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:47
@budimanfix $(document).ready(function() {
$('body').css('background-color', blue);
});
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 13:48
ok I have got the nested element thanks @maulikdarji
CamperBot
@camperbot
Jan 30 2016 13:48
rebeccagunner88 sends brownie points to @maulikdarji :sparkles: :thumbsup: :sparkles:
:star: 436 | @maulikdarji | http://www.freecodecamp.com/maulikdarji
Mamoudou CAMARA
@nfnxmc
Jan 30 2016 13:48
@budimanfix the nested function call is like any instruction
jpjenkins
@jpjenkins
Jan 30 2016 14:03
does anyone know if fcc is available offline yet?
The wiki hints that it is but I don't know how
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 14:04

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

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

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

jpjenkins
@jpjenkins
Jan 30 2016 14:04
explain format
CamperBot
@camperbot
Jan 30 2016 14:04

:point_right: code formatting [wiki]

Inline code

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

Code Block

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

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

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

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

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

Dalton Pelkey
@popatop15
Jan 30 2016 14:04
your input tag is missing a close >
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 14:06
thanx it says I need an action attribute i don't understand where wrong
Dalton Pelkey
@popatop15
Jan 30 2016 14:07

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

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

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

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
You have a form at the top with nothing in it? Is there a reason for that? You were also missing a close > on the form tag as well, though.
Typically you would include the <style> tag and the <link> tag in the head of the document.
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 14:10
I'm just new here i am still trying find my way
Dalton Pelkey
@popatop15
Jan 30 2016 14:10
That's alright :D Just trying to help ya
One sec
Nikunj Keswani
@stirpot
Jan 30 2016 14:11
What am i doing wrong in this
Dalton Pelkey
@popatop15
Jan 30 2016 14:13
<!DOCTYPE html>
<html>
<head>
  <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>
</head>
<body>

<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" alt="A cute orange cat lying on its back" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
</body>
</html>
Your entire html document should look something like this @Rebeccagunner88
Nikunj Keswani
@stirpot
Jan 30 2016 14:14
Someone for me
How do i directly add pics here so u guys bother checking out
:(
Dalton Pelkey
@popatop15
Jan 30 2016 14:15
@stirpot can you post the links again? They aren't working.
Nikunj Keswani
@stirpot
Jan 30 2016 14:15
Just tell me how do i put pics here directly
It's lot easier
Dalton Pelkey
@popatop15
Jan 30 2016 14:15
alt
oops
Click the markdown button under the little message bubbles to the right of this text box.
Nikunj Keswani
@stirpot
Jan 30 2016 14:16
ohh cool
mohamed khatab
@mohamedkhatab
Jan 30 2016 14:18
please
![alt](http://www.freecodecamp.com/challenges/use-a-css-class-to-style-an-element#?solution=%3Cstyle%3E%0A%20%0A%20%20%0A%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%0A)
Maulik Darji
@maulikdarji
Jan 30 2016 14:22
@mohamedkhatab copy paste your code here
Dalton Pelkey
@popatop15
Jan 30 2016 14:22
![alt](http://www.freecodecamp.com/challenges/use-a-css-class-to-style-an-element#?solution=%3Cstyle%3E%0A%20%0A%20%20%0A%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%0A)
heh
Adi
@kiniadit
Jan 30 2016 14:41

"Prioritize One Style Over Another" issue. not able to pass this even though i think what i've coded is correct - <style>
.pink-test {
color: pink;
}
body {
background-color: black;
font-family: Monospace;
color: green;
}
</style>

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

Dalton Pelkey
@popatop15
Jan 30 2016 14:42
<style>
.pink-test {
color: pink;
}
body {
background-color: black;
font-family: Monospace;
color: green;
}
</style>
<h1 class="pink-test">Hello World!</h1>
Sorry, easier to look at this way :D
Adi
@kiniadit
Jan 30 2016 14:42
how did you do that?
Rebecca Lonican
@Rebeccagunner88
Jan 30 2016 14:42
ok ive followed as you said popatop15 when I insert > it says my form not nested
Dalton Pelkey
@popatop15
Jan 30 2016 14:42
three ` before and after code
Adi
@kiniadit
Jan 30 2016 14:43
@popatop15 thx
CamperBot
@camperbot
Jan 30 2016 14:43
kiniadit sends brownie points to @popatop15 :sparkles: :thumbsup: :sparkles:
:star: 13 | @popatop15 | http://www.freecodecamp.com/popatop15
Dalton Pelkey
@popatop15
Jan 30 2016 14:43
One sec @Rebeccagunner88
@kiniadit What are you trying to prioritize and over what?
The h1 color?
Adi
@kiniadit
Jan 30 2016 14:44
@popatop15 the style of <h1> over the style of <body>
Dalton Pelkey
@popatop15
Jan 30 2016 14:45
What you have coded will prioritize it correcly, but they might be looking for even more specificity. Try using an id instead of a class.
Can I see your code again @Rebeccagunner88 ?
Adi
@kiniadit
Jan 30 2016 14:46
@popatop15 can you try running my code on the challenges site. i'm thinking its a bug. http://www.freecodecamp.com/challenges/prioritize-one-style-over-another
Dalton Pelkey
@popatop15
Jan 30 2016 14:46
Sure
try pink-text instead of pink-test :P
Adi
@kiniadit
Jan 30 2016 14:47
oh
silly me, thanks