These are chat archives for FreeCodeCamp/Help

3rd
Feb 2016
Danny
@Xeonom
Feb 03 2016 00:00

Hey All,
Im trying to send Data through a function useing a form but it aint working can someone tell me why ??
add.php

<?php require('template/header.php'); require('todo.php'); ?>

<!--<?php 
 //if($_SERVER['REQUEST_METHOD'] == 'POST') {
  //$todo = ToDoList::addDo($_POST['title'], $_POST['Description']);
// }
?> -->

<div class="success"><?php if(isset( $message ) ) { echo $message; } ?></div>

<form class="form-horizontal" method="POST" action="<?= ToDoList::addDo( $_POST['title'], $_POST['Description'] ); ?>">
  <div class="form-group">
    <label for="title" class="col-sm-2 control-label">title</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="title" placeholder="title">
    </div>
  </div>
  <div class="form-group">
    <label for="Description" class="col-sm-2 control-label">Description</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="Description" placeholder="Description">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <input type="submit" class="btn btn-default" value="Gereed">
    </div>
  </div>
</form>

<?php require('template/footer.php'); ?>

todo.php

<?php

Class ToDoList {


    public static function addDo($title, $description) {
        //try {
            //$conn = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);
            //$query = "INSERT INTO `todolist` (`title`, `description`, `owner`) values (`:title`, `:description`)";
            //$stn = $conn->prepare( $query );
            //$stn->bindParam(':title', $title , PDO::PARAM_STR);
            //$stn->bindParam(':description', $description , PDO::PARAM_STR);
            //$stn->execute();
            //$conn = null;

            //return $message = 'To do Item is succesvol aangemaakt!';

        //} catch (PDOException $e) {
        //    echo '<pre>';
        //        var_dump($e);
        //    echo '</pre>';
        //}
        if(empty($title)) {
            return $message = "Title issent there.";
        }
        elseif (empty($description)) {
            return $message = "Description issent there";
        }
        else {
            return $message = "Succes!";
        }
    }


}


?>
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:00
@Takumar than you're ahead of me
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 00:01
sorry it ok I figured out
Aleksander Gębicki
@Takumar
Feb 03 2016 00:01
@jangelchik1 so give me title of your exercise.
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:02

got it!
here's the code:

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

<style>
h2 {
font-family: Lobster, Monospace;
}

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

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

Aleksander Gębicki
@Takumar
Feb 03 2016 00:02
@jangelchik1 and that's exactly what I told you to do :-)
<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>
</div>
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:04
smile[1].png
@Takumar You explained differently so you did
Aleksander Gębicki
@Takumar
Feb 03 2016 00:07
@jangelchik1 hmm I gave you whole structure with divs, you had only to put heading <h2> and <image> to it: :point_up: 3 lutego 2016 00:57
I don't think I explained it in other way.
Yoel Trujillo
@y0el22
Feb 03 2016 00:07
hi guys can you help me?
what i'm missing?
´´´
´´´
´´´
´´´
-.-
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 00:08
hi can anyone help i have change my cat photo form to green background this my code
Whitney
@techiewhit
Feb 03 2016 00:08
hey guys i need help with font size
Yoel Trujillo
@y0el22
Feb 03 2016 00:08
var myStr = "I am a \"double quoted\" string inside \"double quotes\".";
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 00:09
# cat-photo-form { background-color; green; }
Yoel Trujillo
@y0el22
Feb 03 2016 00:09
Variable myStr should equal to ("I am a "double quoted" string inside "double quotes"").
Salman Shahid
@salman-shahid
Feb 03 2016 00:09
@Rebeccagunner88 No space between # and cat-photo-form: #cat-photo-form { background-color; green; }
Also, make sure it's in the style element
@y0el22 should it be:
var myStr = "\"I am a \"double quoted\" string inside \"double quotes\".\"";
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:13
can someone please tell me why lookup("Kristian", "lastName") doesn't return "Vos"?
```
function lookUp(firstName, prop) {
// Only change code below this line
for (var i = 0; contacts.length; i++) {
if (contacts[i].firstName===firstName) {
if (contacts[i].hasOwnProperty(prop)) {
return contacts[i][prop];
} else {
return "No such property";
}
} else {
return "No such contact";
}
}
// Only change code above this line
}
'''
CamperBot
@camperbot
Feb 03 2016 00:13
:bulb: to format code use backticks! ``` more info
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 00:13
thank you very much @mynameissal
CamperBot
@camperbot
Feb 03 2016 00:13
rebeccagunner88 sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 52 | @mynameissal | http://www.freecodecamp.com/mynameissal
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:14
whoops let me try again
function lookUp(firstName, prop) {
// Only change code below this line
  for (var i = 0; contacts.length; i++) {
    if (contacts[i].firstName===firstName) {
      if (contacts[i].hasOwnProperty(prop)) {
        return contacts[i][prop];
      } else {
        return "No such property";
      }
    } else {
      return "No such contact";
    }
  }
// Only change code above this line
}
Aleksander Gębicki
@Takumar
Feb 03 2016 00:14
@jmlehrfeld first, remove return "No such contact"; outside your loop.
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:15
why? that should catch when the lookup function tries to find a contact whose name isn't in the list
(it works correctly in those cases)
the function returns the correct result when the correct result is "no such contact" or "no such property" but when a valid contact and a valid property are passed then it doesn't work
Aleksander Gębicki
@Takumar
Feb 03 2016 00:16
@jmlehrfeld you check if (contacts[i].firstName===firstName) { and if first contact is not the one you are looking for you run else { return "No such contact" without checking others contacts.
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:17
oh! duh! thanks
i was staring at that for like 15 minutes
Aleksander Gębicki
@Takumar
Feb 03 2016 00:18
@jmlehrfeld you haven't had chance to check "Kristian" :-)
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:19
@Takumar yup, last time i try to do this after a beer!
thanks again
Aleksander Gębicki
@Takumar
Feb 03 2016 00:19
@jmlehrfeld my friend talked that it is best to code after a beer, but I don't think it always work :-)
Shawn Moore
@slmoore
Feb 03 2016 00:20
Hey I don't want to interrupt, but I found a small error in one of the lesson instructions: http://www.freecodecamp.com/challenges/trigger-click-events-with-jquery, it asks to change the element with the class "message", but there is no class "message", but there is an id of "getMessage" that is needed to complete the lesson.
It's just a typo, but should I open a new issue on the github page?
Jon Lehrfeld
@jmlehrfeld
Feb 03 2016 00:20
@Takumar your friend has a special talent then
Aleksander Gębicki
@Takumar
Feb 03 2016 00:20
:-)
Kahlan Roach
@Ilovedesigning
Feb 03 2016 00:22
hello world
CamperBot
@camperbot
Feb 03 2016 00:22

welcome to FreeCodeCamp @Ilovedesigning!

Aleksander Gębicki
@Takumar
Feb 03 2016 00:22
@slmoore this div has class message: <div class = "col-xs-12 well message">
@Ilovedesigning welcome to FCC community - Happy Coding! :-)
Shawn Moore
@slmoore
Feb 03 2016 00:22
ah yep there it is
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:23
@Takumar a little bit different
Shawn Moore
@slmoore
Feb 03 2016 00:23
thanks Takumar, just getting ahead of what the lesson does later on
Aleksander Gębicki
@Takumar
Feb 03 2016 00:25
@jangelchik1 do you mean external <div class="container-fluid">?
I thought you didn't need the entire code, but only the part that needs to be changed. This line <div class="container-fluid"> existed in code and was good, no need to change anything in it.
@jangelchik1 ok, there is no need to argue about that, I'm glad that you finished your exercise.
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:27
no
what do you need help on @Takumar
Aleksander Gębicki
@Takumar
Feb 03 2016 00:29
@jangelchik1 I don't understand, you have asked for help, not me.
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:30
@Takumar I know. i'm just saying if you need help.
Aleksander Gębicki
@Takumar
Feb 03 2016 00:30
Ok, I will ask then, thanks.
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:31
your welcome
Gianmarco,Guglielmi
@GianMa7
Feb 03 2016 00:38
i need a little help with the css class to style an element
Jacob Angelchik
@jangelchik1
Feb 03 2016 00:39
which lesson
Gianmarco,Guglielmi
@GianMa7
Feb 03 2016 00:41
Give your h2 element the class attribute with a value of 'red-text'
Salman Shahid
@salman-shahid
Feb 03 2016 00:42
@GianMa7 <h2 class="red-text"></h2>
Make sure you define red-text in the style element
Richard
@RichardGTech
Feb 03 2016 00:42
trying to the <div> a gray-backround class
Salman Shahid
@salman-shahid
Feb 03 2016 00:43
@ProfessorMagus Use ```<div class="">
Richard
@RichardGTech
Feb 03 2016 00:44
Ok... I got that... But I'm getting nothin
Salman Shahid
@salman-shahid
Feb 03 2016 00:44
So, you've done:
```<div class=gray-background></div>
Gianmarco,Guglielmi
@GianMa7
Feb 03 2016 00:45
@mynameissal thanks big time sal
CamperBot
@camperbot
Feb 03 2016 00:45
gianma7 sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 62 | @mynameissal | http://www.freecodecamp.com/mynameissal
Salman Shahid
@salman-shahid
Feb 03 2016 00:45
This message was deleted
Richard
@RichardGTech
Feb 03 2016 00:45
@mynameissal yes
Salman Shahid
@salman-shahid
Feb 03 2016 00:45
Have you defined: .gray-background in the <style> element?
Richard
@RichardGTech
Feb 03 2016 00:45

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

<div class="gray-backround"></div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<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>

CamperBot
@camperbot
Feb 03 2016 00:45
:bulb: to format code use backticks! ``` more info
Richard
@RichardGTech
Feb 03 2016 00:46
just did
Salman Shahid
@salman-shahid
Feb 03 2016 00:46
It should work now. In the code you posted .gray-background was not defined.
Richard
@RichardGTech
Feb 03 2016 00:46
It's not doing anything

<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-backround {
backround-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-backround"></div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<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>

Bob Struwe
@codenamecoder
Feb 03 2016 00:47
I'm having trouble adding form-control to the text input
Salman Shahid
@salman-shahid
Feb 03 2016 00:47
@ProfessorMagus You spelt background incorrectly in all instances.
Richard
@RichardGTech
Feb 03 2016 00:48
huh? I spelt it correctly
OH!!!
Salman Shahid
@salman-shahid
Feb 03 2016 00:49
:D
Richard
@RichardGTech
Feb 03 2016 00:49
Wow.... So that's why I was having trouble
Salman Shahid
@salman-shahid
Feb 03 2016 00:49
This message was deleted
Bob Struwe
@codenamecoder
Feb 03 2016 00:53
<div class="btn btn-primary">
<button type="submit">Submit</button></div>
is that not the way to add those classes to the submit button?
Salman Shahid
@salman-shahid
Feb 03 2016 00:55
This message was deleted
Hector Garcia
@augmt
Feb 03 2016 01:01
you can add them directly on the button
Salman Shahid
@salman-shahid
Feb 03 2016 01:03
```
sinsukh
@sinsukh
Feb 03 2016 01:03
hi guys. had a question on a checkpoint under javascript. It's profile lookup. But it doesn't meet the last two conditions
Screen Shot 2016-02-02 at 8.01.20 PM.png
Salman Shahid
@salman-shahid
Feb 03 2016 01:04
@Singhsukh 'return "No such contact";" should be within your for loop.
sinsukh
@sinsukh
Feb 03 2016 01:05
@mynameissal I thought it should be outside the loop so once the loop ends, it gets returned
Salman Shahid
@salman-shahid
Feb 03 2016 01:05
Because if there is no contact you want it to give you a message "No such contact" before it goes to the other if statements.
Wait I am probably wrong, let me double check.
Yes, you are correct. I don't know what's wrong.
Hector Garcia
@augmt
Feb 03 2016 01:10
what happens if you refresh?
greg
@wearenotgroot
Feb 03 2016 01:12
@Singhsukh you forgot to test if there is such a property prop, use the .hasOwnProperty(prop)
@Singhsukh right now that second if statement doesnt evaluate anything
Bob Struwe
@codenamecoder
Feb 03 2016 01:14
```<input type="text" class="form-control" placeholder="cat photo URL" required>
<div class="btn btn-primary"><button type="submit"><i class="fa fa-paper-plane">Submit</i></button></div>
anybody help me get the btn btn-primary classes to my submit button?
greg
@wearenotgroot
Feb 03 2016 01:15
@codenamecoder you put it on the wrong one
@codenamecoder should be on the button not the div
Bob Struwe
@codenamecoder
Feb 03 2016 01:16
Nested within the button type?
greg
@wearenotgroot
Feb 03 2016 01:16
@codenamecoder no the class
Hector Garcia
@augmt
Feb 03 2016 01:17
<button class='my-classes separated-by-space' type='my-type'></button>
greg
@wearenotgroot
Feb 03 2016 01:17
@codenamecoder ------><button class="btn btn-primary" type="submit">not in the <div class="btn btn-primary">
Bob Struwe
@codenamecoder
Feb 03 2016 01:22
wow this can make you feel dense -
Hector Garcia
@augmt
Feb 03 2016 01:23
we've all been there at some point
sinsukh
@sinsukh
Feb 03 2016 01:25
@wearenotgroot I tried has own property and I also tried setting it equal to prop but the last two instances don't get accepted
Bob Struwe
@codenamecoder
Feb 03 2016 01:27
if i understand it correctly, you can add in-line classes and types - I was creating an unnecessary div to try and add the classes "btn btn-primary"
Hector Garcia
@augmt
Feb 03 2016 01:29
yep, those classes go directly on the button element
greg
@wearenotgroot
Feb 03 2016 01:29
@Singhsukh should be > if(contacts[i].hasOwnProperty(prop))
greg
@wearenotgroot
Feb 03 2016 01:29
@Singhsukh everything else is correct
@Singhsukh casue this contacts[i][prop] will give you the values in the prop
sinsukh
@sinsukh
Feb 03 2016 01:31
Screen Shot 2016-02-02 at 8.31.09 PM.png
Hector Garcia
@augmt
Feb 03 2016 01:32
the if statement will check if the value is truthy or falsy; all the values in this case are truthy so hasOwnProperty shouldn't be required
greg
@wearenotgroot
Feb 03 2016 01:32
@Singhsukh :+1:
sinsukh
@sinsukh
Feb 03 2016 01:32
@wearenotgroot Thanks. I tried it. But the same errors are there. The last two don't pass.
CamperBot
@camperbot
Feb 03 2016 01:32
singhsukh sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 581 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
sinsukh
@sinsukh
Feb 03 2016 01:32
unless this is a bug
Hector Garcia
@augmt
Feb 03 2016 01:32
@Singhsukh if you've tried refreshing, what does lookup("Bob", "number") output on the console?
greg
@wearenotgroot
Feb 03 2016 01:32
@Singhsukh refresh it
sinsukh
@sinsukh
Feb 03 2016 01:33
@augmt @wearenotgroot It finally worked. Thank you so much guys!
CamperBot
@camperbot
Feb 03 2016 01:33
singhsukh sends brownie points to @augmt and @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: singhsukh already gave wearenotgroot points
:star: 328 | @augmt | http://www.freecodecamp.com/augmt
greg
@wearenotgroot
Feb 03 2016 01:34
@Singhsukh np
@Singhsukh remember to refresh after many tries/submit. sometime the system get bug down
Bob Struwe
@codenamecoder
Feb 03 2016 01:35
thank you for your help! @augmt
CamperBot
@camperbot
Feb 03 2016 01:35
codenamecoder sends brownie points to @augmt :sparkles: :thumbsup: :sparkles:
:star: 329 | @augmt | http://www.freecodecamp.com/augmt
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 01:41
hi everyone
Chris
@Aoxom
Feb 03 2016 01:42
hola @Rebeccagunner88
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 01:48
need help this my code
  body {
    background-color: black;
    font-family: Monospace;
    color: green;
  }
  .pink-text {
  color: pink;
  color:blue;  
    } 
  .blue-text {
    color:blue;
  }   

</style>
<h1 class="pink-text">Hello World!</h1>
<h1 class= "blue-text">Hello World!</h1>
it says I need blue and pink text in same leemnt I don't know where wrong
Hector Garcia
@augmt
Feb 03 2016 01:50
try putting pink-text and blue-text into one, same h1 element and separate the classes with a space
cannelflow
@cannelflow
Feb 03 2016 01:56
@Rebeccagunner88 if you have two class for same tag do like <P class=" a b"></p>
Rebecca Lonican
@Rebeccagunner88
Feb 03 2016 01:57
thanx @augmt it just very late here my brain not working so well it 2am
CamperBot
@camperbot
Feb 03 2016 01:57
rebeccagunner88 sends brownie points to @augmt :sparkles: :thumbsup: :sparkles:
:star: 330 | @augmt | http://www.freecodecamp.com/augmt
Hector Garcia
@augmt
Feb 03 2016 01:58
haha np
Kelvin-penang
@Kelvin-penang
Feb 03 2016 02:11
Hi, if I insert a bootstrap code like <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
does it disappear after saving?
or does it maintain on top?
pikachu
@misonam03
Feb 03 2016 02:13
where did you save it
Kelvin-penang
@Kelvin-penang
Feb 03 2016 02:14
I'm going through an exercise in the freecodecamp, and in one page, it asks you to insert the code. In the next task, it asks you to do more stuff like center your text etc. But I noticed the code on top of the page has disappeared
is it normal?
Or should the code always be there
kennethbhorton
@kennethbhorton
Feb 03 2016 02:19
This message was deleted
Stephen Jefferson
@smjefferson
Feb 03 2016 02:20
@Takumar you are more patient than me. lol!
Skye
@cieloskye
Feb 03 2016 02:25

Can anyone offer guidance for JS waypoint "Using Objects for Lookups"? I realize I need to write something after the lookup "dictionary" but I've tried everything I can think of, and I'm still not getting it. // 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"
};

// Only change code above this line
return result;
}

// Change this value to test
phoneticLookup("charlie");

Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:26
// 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"
};
if (lookup.val) {
  result = lookup.val;
}
// Only change code above this line
return result;
}

// Change this value to test
phoneticLookup("charlie");
Cristián Berríos
@crisberrios
Feb 03 2016 02:27
not sure about the challenge, but looks like using bracket syntax for object properties is relevant
like accessing lookup["alpha"] to retrieve the value
also, maybe "hasOwnProperty" method of Object could be relevant
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:30
code above should be result the name on the object if exist, if not return empty string, CMIIW
Salman Shahid
@salman-shahid
Feb 03 2016 02:30
How can I see my progression path on FreeCodeCamp?
As in not only what I've completed but also what I have yet to do.
Skye
@cieloskye
Feb 03 2016 02:32
@brutalcrozt that doesn't work because the challenge requires us not to use an if statement :/ also, how do you post code like that instead of a simple copy & paste like I did
Salman Shahid
@salman-shahid
Feb 03 2016 02:32
@cieloskye code
CamperBot
@camperbot
Feb 03 2016 02:32
:bulb: to format code use backticks! ``` more info
Cameron Johnson
@cameronmj67
Feb 03 2016 02:33
       ##
      ###
     ####
    #####
   ######
  #######
 ########
#########
#
#
#
#

for (int i = 0; i < height; i++)
{
// print spaces
// print hashes
// print new line
}

int n;

do
{
n = GetInt();
}
while (n is invalid);
// code outside

can anyone help me out?
Skye
@cieloskye
Feb 03 2016 02:33
@mynameissal Thank you
CamperBot
@camperbot
Feb 03 2016 02:33
cieloskye sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 94 | @mynameissal | http://www.freecodecamp.com/mynameissal
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:35
@cieloskye so return lookup.val; should work? haha sorry for that.
Jordan Shackelford
@JordanShackelford
Feb 03 2016 02:35
Does anyone know of an online host I can use to store my alarm sound effect for my pomodoro timer?
Cristián Berríos
@crisberrios
Feb 03 2016 02:36
@cieloskye if no if is allowed, also look into "short circuits" in JS.
ie. return someExpression || someOtherExpression;
Skye
@cieloskye
Feb 03 2016 02:38
@brutalcrozt haha, its ok! thank you for your help! return lookup.val; isn't working either I'm completely stumped on this one
CamperBot
@camperbot
Feb 03 2016 02:38
cieloskye sends brownie points to @brutalcrozt :sparkles: :thumbsup: :sparkles:
:star: 38 | @brutalcrozt | http://www.freecodecamp.com/brutalcrozt
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:40
This message was deleted
@cieloskye the objective is to return some name isn't it? wait let me open notepad
Skye
@cieloskye
Feb 03 2016 02:42
Thanks @crisberrios. I'm not sure how short circuits would apply here, but I am googling that. lol
CamperBot
@camperbot
Feb 03 2016 02:42
cieloskye sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:star: 176 | @crisberrios | http://www.freecodecamp.com/crisberrios
Salman Shahid
@salman-shahid
Feb 03 2016 02:42
How do I see my progression pathway? (What I have to do in the future.)
Skye
@cieloskye
Feb 03 2016 02:42
@brutalcrozt Yes, so when you call alpha you should get "Adams" etc
Andre Alonzo
@paycoguy
Feb 03 2016 02:42
Salman Shahid
@salman-shahid
Feb 03 2016 02:43
Thanks @paycoguy
CamperBot
@camperbot
Feb 03 2016 02:43
mynameissal sends brownie points to @paycoguy :sparkles: :thumbsup: :sparkles:
:star: 442 | @paycoguy | http://www.freecodecamp.com/paycoguy
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:46
@cieloskye result = lookup[val] || "not found";
it should work fine i think, i have test it using node
Skye
@cieloskye
Feb 03 2016 02:48
@brutalcrozt It worked on all front except one. I'm getting the error that "phoneticLookup("") should equal undefined" should I add another line in the lookup for undefined?
Cristián Berríos
@crisberrios
Feb 03 2016 02:51
can you link the challenge @cieloskye ?
DJ
@qualitymanifest
Feb 03 2016 02:54
@cieloskye almost, but they want undefined not "not found"
Hope
@Hopeth90
Feb 03 2016 02:55
hey everyone I'm new, and I am needing a little help with my CSS style challenge-- turning the red to blue. my title keeps disappearing not sure what im doing wrong
Skye
@cieloskye
Feb 03 2016 02:55
@qualitymanifest hmmm, the question is how do I apply this?
DJ
@qualitymanifest
Feb 03 2016 02:55
@cieloskye change "not found" to undefined
Skye
@cieloskye
Feb 03 2016 02:56
@Hopeth90 Can you post your code or link the challenge?
Brian
@sludge256
Feb 03 2016 02:56
remove your or and the proceeding statement
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:56
@cieloskye
as @qualitymanifest say, result = lookup[val]; should work fine. cut the short short circuits :smile:
DJ
@qualitymanifest
Feb 03 2016 02:57
@sludge256 yeah, that works too of course and is more ideal, i was just explaining how to make it work with what she had there
Hope
@Hopeth90
Feb 03 2016 02:57
@cieloskye <style>
h2 {color: red;}
</style>
not sure where i'm supposed to put the h2 element
Skye
@cieloskye
Feb 03 2016 02:58
@qualitymanifest & @brutalcrozt result = lookup[val] || undefined; worked and so did result = lookup[val]; I had quotes around undefined which is why it didn't work the first time. Thank you both!
CamperBot
@camperbot
Feb 03 2016 02:58
cieloskye sends brownie points to @qualitymanifest and @brutalcrozt :sparkles: :thumbsup: :sparkles:
:warning: cieloskye already gave brutalcrozt points
:star: 889 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Adi Prasetyo
@brutalcrozt
Feb 03 2016 02:58
@Hopeth90 read again dude, just write anywhere, it always told you when you place it at wrong place
@cieloskye anytime :smile:
@cieloskye notice that your fist code just initialize var result = ""; then at the bottom you just return it, nothing change the value of result so it will not work
Skye
@cieloskye
Feb 03 2016 03:01
@Hopeth90 IE: <h2 style="color: blue">CatPhotoApp</h2>
@brutalcrozt Right, I just wasn't sure how to change the value of the result. I really appreciate you taking the time to explain it! Thanks again!
CamperBot
@camperbot
Feb 03 2016 03:05
cieloskye sends brownie points to @brutalcrozt :sparkles: :thumbsup: :sparkles:
:warning: cieloskye already gave brutalcrozt points
Popsiclestand
@Popsiclestand
Feb 03 2016 03:07
is there any way to reset a lesson before actually entering it and resetting? i have the nested loops lesson stuck in an infinite loop by accident and even after restarting the browser, it still repopulates the editor with the same code and, apparently, runs that code as well the moment I click on the link for the lesson.
Brian
@sludge256
Feb 03 2016 03:09
wiki auto
CamperBot
@camperbot
Feb 03 2016 03:09

:point_right: disable code auto run [wiki]

By default, the Free Code Camp site automatically loads and runs your last recorded solution. If you have accidentally created an infinite loop or other irrecoverable error or simply don't trust the code, you can disable code auto-run by putting the following in your URL:
run=disabled

Example:

URL: http://www.freecodecamp.com/challenges/bonfire-meet-bonfire#?solution=function%20meetBonfire(argument)

No-Run URL: http://www.freecodecamp.com/challenges/bonfire-meet-bonfire#?run=disabled&solution=function%20meetBonfire(argument)

:pencil: read more about disable code auto run on the FCC Wiki

Skye
@cieloskye
Feb 03 2016 03:13
@brutalcrozt How'd you master JS? I feel like I am constantly asking questions in the chat. Any tips beyond just banging my head against my computer screen? lol
@crisberrios ha, the next waypoint is the .hasOwnProperty method that you mentioned
Popsiclestand
@Popsiclestand
Feb 03 2016 03:18
Thanks @sludge256 !
CamperBot
@camperbot
Feb 03 2016 03:18
popsiclestand sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1218 | @sludge256 | http://www.freecodecamp.com/sludge256
Cristián Berríos
@crisberrios
Feb 03 2016 03:19
@cieloskye this post is old and layout is broken, but kind of condenses how I started learning JS http://crisberrios.github.io/old/articles/the-road-so-far/
Skye
@cieloskye
Feb 03 2016 03:21
@crisberrios This is great! Thank you for sharing.
CamperBot
@camperbot
Feb 03 2016 03:21
cieloskye sends brownie points to @crisberrios :sparkles: :thumbsup: :sparkles:
:warning: cieloskye already gave crisberrios points
Skye
@cieloskye
Feb 03 2016 03:21
really wish camperbot wouldn't limit me sending brownie points....just saying
Cristián Berríos
@crisberrios
Feb 03 2016 03:21
lol don't worry
not that I count them anyways
Skye
@cieloskye
Feb 03 2016 03:24
haha, well even if you don't count them you gotta love the sparkily thumbs up
Brian Tong
@brtong
Feb 03 2016 03:25

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

Nest all of your radio buttons within a <div class="row"> element. Then nest each of them within a <div class="col-xs-6"> element.

CamperBot
@camperbot
Feb 03 2016 03:25
no wiki entry for: task you can use bootstraps col-xs- classes on form elements too this way our radio buttons will be evenly spread out across the page regardless of how wide the screen resolution isnest all of your radio buttons within a div classrow element then nest each of them within a div classcol-xs-6 element
Brian Tong
@brtong
Feb 03 2016 03:25
<div class="row">
<div class="col-xs-6">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-6">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-6">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
Max Gardner
@maxgardner
Feb 03 2016 03:26

Hey guys, I’m having some trouble with the Basic Javascript -> Stand In Line challenge. I’m not really sure what to change with the return element to get it to spit out the element that’s removed with the shift function.

Here’s what I have so far:

 function queue(arr, item) {
  // Your code here
  arr.push(item);
  arr.shift(0);
  return item;  // 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));
Srinivas
@sriducati
Feb 03 2016 03:26
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
why is it not working
<style>
p{
font-size: 16px;
}
</style>
leasha1979
@leasha1979
Feb 03 2016 03:26
I'm having trouble with adding an img tag with the Bootstrap img-responsive. Can someone please explain how this looks once it is typed
Srinivas
@sriducati
Feb 03 2016 03:26
its already in 100%
Brian
@sludge256
Feb 03 2016 03:28
@sriducati You weren't supposed to remove the red-text class
@maxgardner don't pass any arguments into shift
@leasha1979 add it to your img element like any other class
Srinivas
@sriducati
Feb 03 2016 03:30

@sludge256 <style>
p{
font-size: 16px;
}
</style>

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

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

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

i have not removed
Brian
@sludge256
Feb 03 2016 03:30
@sriducati you removed it from your style element
Srinivas
@sriducati
Feb 03 2016 03:30
oh
k
Brian
@sludge256
Feb 03 2016 03:30
and don't add a class to your second p element
Srinivas
@sriducati
Feb 03 2016 03:32
got it .. thank you :)
leasha1979
@leasha1979
Feb 03 2016 03:32
@sludge256
would it have to img?
<img img-responsive src="http://....
Max Gardner
@maxgardner
Feb 03 2016 03:35
@sludge256 Part of the instructions say to remove the first element of the array. Wouldn’t that require me to use shift? Also, I’m still unsure of what to do with the “remove” line. It says to change it, but I’m not exactly sure what to change it to so that it will return the value that is removed.
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:35
@cieloskye read https://developer.mozilla.org/en-US/docs/Web/JavaScript, not as you image, if yes i already make coffee script :smile: . Ask me everything, glad could help someone
Brian
@sludge256
Feb 03 2016 03:35
@leasha1979 class="..."
@maxgardner shift is correct
but it doesn't need anything in ()
leasha1979
@leasha1979
Feb 03 2016 03:36
@sludge256 thanks
CamperBot
@camperbot
Feb 03 2016 03:36
leasha1979 sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1219 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Feb 03 2016 03:37
@maxgardner the return line should be returning whatever comes out from shift
so you can assign the value to a variable then return the variable
or just use return on your shift statement
Skye
@cieloskye
Feb 03 2016 03:39
@brutalcrozt Cool, I'll check it out. I may take you up on that and ask many more questions once I've done some reading! :D
Max Gardner
@maxgardner
Feb 03 2016 03:39
@sludge256 Thank you! I was trying to incorporate all of those things and just couldn’t quite figure out how to put it all together. So you don’t need a value for shift because it inherently is referring to only the first item in the array?
CamperBot
@camperbot
Feb 03 2016 03:39
maxgardner sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1220 | @sludge256 | http://www.freecodecamp.com/sludge256
Brian
@sludge256
Feb 03 2016 03:39
yep
Max Gardner
@maxgardner
Feb 03 2016 03:40
That makes sense haha. Thanks!
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:40
@sludge256 i want brownie :smile:
Brian
@sludge256
Feb 03 2016 03:41
@brutalcrozt thanks
CamperBot
@camperbot
Feb 03 2016 03:41
sludge256 sends brownie points to @brutalcrozt :sparkles: :thumbsup: :sparkles:
:star: 39 | @brutalcrozt | http://www.freecodecamp.com/brutalcrozt
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:42
@sludge256 this guys really awesome thanks :smile:
CamperBot
@camperbot
Feb 03 2016 03:42
brutalcrozt sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1221 | @sludge256 | http://www.freecodecamp.com/sludge256
Scott Brenner
@ScottBrenner
Feb 03 2016 03:43
Need a hint for Profile Lookup..
function lookUp(firstName, prop){
// Only change code below this line
for (var i = 0; i < contacts.length; i++) {
  if (contacts[i]["firstName"] == firstName && contacts[i][prop] !== "") {
    return contacts[i][prop];
  } else if (contacts[i]["firstName"] !== firstName) {
    return "No such contact";
  }


}
is what I have so far..
Srinivas
@sriducati
Feb 03 2016 03:44
how can v go to next level?
is there any chanlenges for expernced?
Pat Lee
@pleedesigner
Feb 03 2016 03:44
i dont know how to do the "Override Class Declarations by Styling ID Attributes"
can someone help me?
Scott Brenner
@ScottBrenner
Feb 03 2016 03:44
Adding that else if causes the first three test cases to fail, but the fourth to pass.. not sure how else to do "Bob", "number" should return "No such contact"
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:47
@ScottBrenner what's the objective dude? what is your problem?
Pat Lee
@pleedesigner
Feb 03 2016 03:47
how to give h1 element the id of orange-text.
Create a CSS declaration for your orange-text id
Scott Brenner
@ScottBrenner
Feb 03 2016 03:48
@brutalcrozt In the Profile Lookup challenge I have to do "Bob", "number" should return "No such contact", but I'm not implementing it the right way..
Pat Lee
@pleedesigner
Feb 03 2016 03:48

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

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

Scott Brenner
@ScottBrenner
Feb 03 2016 03:48
It's supposed to check all of the firstName values in the contacts array, and if none are equal to "Bob" it should return "No such contact"
Pat Lee
@pleedesigner
Feb 03 2016 03:50
This message was deleted
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:50
@ScottBrenner if (contacts[i]["firstName"] == firstName && contacts[i][prop] !== "") should use === strict equal comparison? "Bob" not in the contacts array right?
Scott Brenner
@ScottBrenner
Feb 03 2016 03:51
@brutalcrozt That's how I'm implementing The function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact. If both are true, then return the "value" of that property.
Austin West
@scienceoflife
Feb 03 2016 03:52
hey @ScottBrenner can you share full URL of your exercise?
Scott Brenner
@ScottBrenner
Feb 03 2016 03:52
And then I have the else if for the next check- If firstName does not correspond to any contacts then return "No such contact", which isn't working properly.
Austin West
@scienceoflife
Feb 03 2016 03:53
@ScottBrenner the full ur should have a bunch of &'s and +'s
url*
Pat Lee
@pleedesigner
Feb 03 2016 03:53
Screen Shot 2016-02-02 at 7.52.59 PM.png
Scott Brenner
@ScottBrenner
Feb 03 2016 03:54
This message was deleted
This message was deleted
Pat Lee
@pleedesigner
Feb 03 2016 03:54
how to give h1 element the id of orange-text.
Create a CSS declaration for your orange-text id
Scott Brenner
@ScottBrenner
Feb 03 2016 03:55
@pleedesigner Looks like you only have classes, not IDs. http://www.w3schools.com/cssref/sel_id.asp
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:56
Austin West
@scienceoflife
Feb 03 2016 03:57
@brutalcrozt avoid using w3schools for information. Always try to use mdn, w3schools tends to be inaccurate and outdated (also enforces bad practices).
Adi Prasetyo
@brutalcrozt
Feb 03 2016 03:58
@scienceoflife ya, sorry for that but just simple id selector there
@ScottBrenner still not sure what you asking dude :worried:
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 03:59
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
Scott Brenner
@ScottBrenner
Feb 03 2016 03:59
@brutalcrozt How to implement If firstName does not correspond to any contacts then return "No such contact", as my current method doesn't work.
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 03:59
<style>
.red-text {
color: red;
}
p{font-size: 16px;}
</style>
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
how to get the browser and txt zoom at 100%
?
I got the code right but cant get to do the 100% zoom
Austin West
@scienceoflife
Feb 03 2016 04:01
browser zoom is a feature of your browser, not something you code
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 04:01
yeah i did command +
Scott Brenner
@ScottBrenner
Feb 03 2016 04:01
@yenpraja610 The shortcut in Firefox is ctrl+0
Austin West
@scienceoflife
Feb 03 2016 04:01
such as in chrome you hit the hamburger menu in the top right (the three lines) and make sure your zoom is set to 100%
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 04:02
still giving me error in the freecodecamp exercise
Austin West
@scienceoflife
Feb 03 2016 04:02
@yenpraja610 what fails when you run the test?
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 04:02
this still with an x of error
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:02
@ScottBrenner
for (var i = 0; i < contacts.length; i++) {
  if (contacts[i]["firstName"] === firstName && contacts[i][prop] !== "") {
    return contacts[i][prop];
  } else  {
    return "No such contact";
  }
}
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 04:02
<style>
.red-text {
color: red;
}
p{font-size: 16px;}
</style>
Austin West
@scienceoflife
Feb 03 2016 04:03
@yenpraja610 can you paste your full code or share the url at the top of your browser (the full url)
Austin West
@scienceoflife
Feb 03 2016 04:05
remove the class from your second p element, the instructions never say to add the class to the second p element
Scott Brenner
@ScottBrenner
Feb 03 2016 04:05
@brutalcrozt Not quite..
Yenifer A. prajapati
@yenpraja610
Feb 03 2016 04:05
@scienceoflife it worked :)
@scienceoflife Thanks a lot :smile:
CamperBot
@camperbot
Feb 03 2016 04:05
yenpraja610 sends brownie points to @scienceoflife :sparkles: :thumbsup: :sparkles:
:star: 37 | @scienceoflife | http://www.freecodecamp.com/scienceoflife
Scott Brenner
@ScottBrenner
Feb 03 2016 04:06
That would return No such contact for everything except the first firstName in the array.
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:06
@ScottBrenner what is still failing? i just know the partial func. not the whole javascript
Scott Brenner
@ScottBrenner
Feb 03 2016 04:06
@brutalcrozt Only passes the fourth test. http://www.freecodecamp.com/challenges/profile-lookup#?solution=%2F%2FSetup%0Avar%20contacts%20%3D%20[%0A%20%20%20%20{%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Akira%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Laine%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220543236543%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20[%22Pizza%22%2C%20%22Coding%22%2C%20%22Brownie%20Points%22]%0A%20%20%20%20}%2C%0A%20%20%20%20{%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Harry%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Potter%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220994372684%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20[%22Hogwarts%22%2C%20%22Magic%22%2C%20%22Hagrid%22]%0A%20%20%20%20}%2C%0A%20%20%20%20{%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Sherlock%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Holmes%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220487345643%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20[%22Intriguing%20Cases%22%2C%20%22Violin%22]%0A%20%20%20%20}%2C%0A%20%20%20%20{%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Kristian%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Vos%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%22unknown%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20[%22Javascript%22%2C%20%22Gaming%22%2C%20%22Foxes%22]%0A%20%20%20%20}%0A]%3B%0A%0A%0Afunction%20lookUp%28firstName%2C%20prop%29{%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0Afor%20%28var%20i%20%3D%200%3B%20i%20%3C%20contacts.length%3B%20i%2B%2B%29%20{%0A%20%20if%20%28contacts[i][%22firstName%22]%20%3D%3D%20firstName%20%26%26%20contacts[i][prop]%20!%3D%3D%20%22%22%29%20{%0A%20%20%20%20return%20contacts[i][prop]%3B%0A%20%20}%20else%20{%0A%20%20%20%20return%20%22No%20such%20contact%22%3B%0A%20%20}%20%20%0A%20%20%0A}%0A%2F%2F%20Only%20change%20code%20above%20this%20line%0A}%0A%0A%2F%2F%20Change%20these%20values%20to%20test%20your%20function%0AlookUp%28%22Akira%22%2C%20%22likes%22%29%3B%0A
Brian
@sludge256
Feb 03 2016 04:10
@ScottBrenner think about it this way
can you say that the contact you are searching for is not in the array
without first looking through the entire array?
DJ
@qualitymanifest
Feb 03 2016 04:11

@ScottBrenner

If firstName does not correspond to any contacts then return "No such contact"

If prop does not correspond to any valid properties then return "No such property"

Scott Brenner
@ScottBrenner
Feb 03 2016 04:11
@sludge256 hm no not really
Austin West
@scienceoflife
Feb 03 2016 04:12
@ScottBrenner the return exits out of the loop
actually ignore me
im wrong
Brian
@sludge256
Feb 03 2016 04:13
@scienceoflife you're right
but it also exits out of the function
Scott Brenner
@ScottBrenner
Feb 03 2016 04:13
:cry:
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:14
i try that challenge, hold on :smile:
Austin West
@scienceoflife
Feb 03 2016 04:14
@ScottBrenner side note: you shouldnt be checking for an empty string !== "" because if they don't add a parameter, it wont be an empty string, it will be undefined. remove the entire section that says !=="" and it will check if they put anything in for prop
yay javascript!
Scott Brenner
@ScottBrenner
Feb 03 2016 04:15
oo ok gotcha

So to check if a firstName is not in the array.. can I do something like

if (!contacts[i][firstName] {
return "No such contact";
}

to check if none of the firstNames equal firstName?

Santiago de la Torre
@iargonut
Feb 03 2016 04:17
hey guys
can anyone help me add the classes animated and hinge to my body elemnt
im trying this but its not working
Austin West
@scienceoflife
Feb 03 2016 04:18
@ScottBrenner thats kind of the way
Santiago de la Torre
@iargonut
Feb 03 2016 04:18
$("#body").addClass("animated hinge");
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:18
ok it's solve :smile:
Austin West
@scienceoflife
Feb 03 2016 04:18
@ScottBrenner no need to ask, give it a try!
Rex Schrader
@SaintPeter
Feb 03 2016 04:18
@ScottBrenner No, you need to use hasOwnProperty on contacts[i] to see if a property exists or not.
Santiago de la Torre
@iargonut
Feb 03 2016 04:19
got it working
Austin West
@scienceoflife
Feb 03 2016 04:21
@ScottBrenner to add to @SaintPeter . checking if something exists in an if with if(!contacts[i][firstName]) only checks the current index in contacts has a property of first name, not that it matches
Scott Brenner
@ScottBrenner
Feb 03 2016 04:21
Right.. so I'm thinking something like ...
else if (contacts[i].hasOwnProperty("firstName" == firstName)) {
    return "No such contact";
  }
:confused:
Rex Schrader
@SaintPeter
Feb 03 2016 04:22
@ScottBrenner hasOwnProperty takes just a property name as an arguement. It returns true or false. Your code will check to see if a property named true exists.
@ScottBrenner The property you're looking for is prop, I believe.
@ScottBrenner Except I've lead you astray. You're looking to see if the firstName exists:
if(contacts[i]['firstName'] === firstName)
would check for that. However, there is a problem with that. If you only check the first name or the second name or the third name you cannot return "No such contact", because you have to check ALL of the names before you can return that.
Scott Brenner
@ScottBrenner
Feb 03 2016 04:24
@SaintPeter Right, for some reason I can't figure out how to check all of the names first..
Rex Schrader
@SaintPeter
Feb 03 2016 04:25
@ScottBrenner You've got a for loop, right? That loops through all of the names? Just assume that if you've finished the loop and have not found the name that it doesn't exist. So put that specific return outside the loop.
SaintPeter @SaintPeter corrects look to loop
Scott Brenner
@ScottBrenner
Feb 03 2016 04:26
Wow that took way longer than it should've.. thanks @SaintPeter @scienceoflife @brutalcrozt @sludge256 @qualitymanifest
CamperBot
@camperbot
Feb 03 2016 04:26
scottbrenner sends brownie points to @saintpeter and @scienceoflife and @brutalcrozt and @sludge256 and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 2435 | @saintpeter | http://www.freecodecamp.com/saintpeter
:star: 40 | @brutalcrozt | http://www.freecodecamp.com/brutalcrozt
:star: 38 | @scienceoflife | http://www.freecodecamp.com/scienceoflife
:star: 1223 | @sludge256 | http://www.freecodecamp.com/sludge256
:star: 891 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Austin West
@scienceoflife
Feb 03 2016 04:27
@ScottBrenner do it again tomorrow! thats how you get good and learn stuff. You should repeat stuff until it gets second nature
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:31
@scienceoflife that's our pain part :smile:
Srinivas
@sriducati
Feb 03 2016 04:45
rightnow..my current score is 102...
when do i get certificate?
front end?
Adi Prasetyo
@brutalcrozt
Feb 03 2016 04:46
finish all front end challenges maybe
Srinivas
@sriducati
Feb 03 2016 04:46
anyidea.. how many would be like?
bcos iam expernced... anyways to skip easy task?
Brian
@sludge256
Feb 03 2016 04:52
do all the things with *s for certificates
anything else is optional
Austin West
@scienceoflife
Feb 03 2016 04:54
what is the purpose of the certificate?
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 04:56
Interesting. so essentially the only "required" aspects are the projects--or at least for the Front End Certificate they are.
Granted, my inner completionist wants to get a little green check mark on every single line.
Brian
@sludge256
Feb 03 2016 04:57
there are the basic and advanced algos also
Santiago de la Torre
@iargonut
Feb 03 2016 04:58
can anyone help me with this

```var myVar = 87;

// Only change code below this line
myVar = myVar + 1;
i = myVar;
i++;
```

Brian
@sludge256
Feb 03 2016 04:58
@scienceoflife people like having proof of completion
feeling of validation etc
@iargonut so what you're doing with i on the last line
is what you should be doing to myVar
and that's the only code you need
Santiago de la Torre
@iargonut
Feb 03 2016 05:00
@scienceoflife how shopuld it look like tho ??
Austin West
@scienceoflife
Feb 03 2016 05:01
i dont knwo what you are trying to do?
Brian
@sludge256
Feb 03 2016 05:01
replace i with myVar
so instead of incrementing i
Austin West
@scienceoflife
Feb 03 2016 05:01
i dont know what the full instructions
Brian
@sludge256
Feb 03 2016 05:01
you increment myVar
Santiago de la Torre
@iargonut
Feb 03 2016 05:01
got it working
thanks
really helped
Hope
@Hopeth90
Feb 03 2016 05:06
<style>
.smaller-image {
width: 100px;
}
</style> I keep receiving an error that my img width needs to be 100px. Have I written in a mistake or left something out?
my screen is 100% zoomed btw
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:08
@sludge256 they aren't starred.
Brian
@sludge256
Feb 03 2016 05:09
@ChadKreutzer did you already finish them?
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:11
yeah. well, except for the four new advanced ones. but those aren't starred either. do the stars disappear as you finish the challenges?
DJ
@qualitymanifest
Feb 03 2016 05:12
@Hopeth90 did you give your img element the .smaller-image class?
Brian
@sludge256
Feb 03 2016 05:12
The Advanced onces aren't required
and yea they lose the star once you finish them
Hope
@Hopeth90
Feb 03 2016 05:12
@qualitymanifest yes i did
Brian
@sludge256
Feb 03 2016 05:13
imo they should stay even if you pass
DJ
@qualitymanifest
Feb 03 2016 05:13
@Hopeth90 paste the full link to your waypoint
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:13
lol. ah. thus why I don't see the stars except for on the projects. Cause I haven't done them yet.
Hope
@Hopeth90
Feb 03 2016 05:13
i think i've made a mistake somewhere for sure
DJ
@qualitymanifest
Feb 03 2016 05:14

@Hopeth90

<img src="https://bit.ly/fcc-relaxing-cat"> 
<img class="smaller-image">
  <style>
  .smaller-image {
    width: 100px;
  }
</style>

this isn't how you apply the class... you don't create a second img element and a second style element. you do it more like it was done for your h2 here

<h2 class="red-text">CatPhotoApp</h2>
Hope
@Hopeth90
Feb 03 2016 05:15
thank you @qualitymanifest
CamperBot
@camperbot
Feb 03 2016 05:15
hopeth90 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 892 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 03 2016 05:15
@Hopeth90 no problem :+1:
Santiago de la Torre
@iargonut
Feb 03 2016 05:22
i am completely lost here , how do i write the algorithm for converting celcius to farenheit
Brian
@sludge256
Feb 03 2016 05:23
let's abstract away from the programming aspect of it
how would you do it normally?
Santiago de la Torre
@iargonut
Feb 03 2016 05:23
i got no clue hehe
Brian
@sludge256
Feb 03 2016 05:23
they tell you in the instructions ;)
Santiago de la Torre
@iargonut
Feb 03 2016 05:24
yes is says temperature in celcius *9/5+32
Luxan Suthaharan
@luxan14
Feb 03 2016 05:27
Hey guys, what's wrong with my code! ?
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

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

}

// Test your code by modifying these values
checkObj("gift");
it needs to return the property's value if the property is found
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:29
@luxan14 you need to use bracket notation when using a variable to represent a property.
do you follow?\
Luxan Suthaharan
@luxan14
Feb 03 2016 05:31
@ChadKreutzer Yeah, It worked
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:31
good.
Luxan Suthaharan
@luxan14
Feb 03 2016 05:31
@ChadKreutzer Thank you!
CamperBot
@camperbot
Feb 03 2016 05:31
luxan14 sends brownie points to @chadkreutzer :sparkles: :thumbsup: :sparkles:
:star: 451 | @chadkreutzer | http://www.freecodecamp.com/chadkreutzer
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:32
remember: dot notation only works when you are directly naming the property/method.
Luxan Suthaharan
@luxan14
Feb 03 2016 05:33
@ChadKreutzer Yeah, I'll keep that in mind :smile:
Brian
@sludge256
Feb 03 2016 05:34
@iargonut yep so just type that out
and assign it to a variable called fahrenheit
your code will do the math for you
and put the answer into the variable
sorry for the late response
Santiago de la Torre
@iargonut
Feb 03 2016 05:35
@sludge256 thanks ill give it a try !!
CamperBot
@camperbot
Feb 03 2016 05:35
iargonut sends brownie points to @sludge256 :sparkles: :thumbsup: :sparkles:
:star: 1228 | @sludge256 | http://www.freecodecamp.com/sludge256
Derek Welton
@freefora11
Feb 03 2016 05:39

Quick question for your guys, I'm trying to figure out how people are able to scroll smoothly down their page. If you look at the 2 below, the first one you can scroll smoothly down, but the second code pen if you just move the mouse wheel a little bit, you see that the scrolling is more like jumping than smooth scrolling, how can you get that smooth scroll effect?

http://codepen.io/erkand-imeri/full/ZbJJLM/

http://codepen.io/freefora11/full/zrrGgM/

Nevermind, I figured it out, I was using 2 different browsers, the one with the smooth scrolling was in firefox and mine was in chrome, does anyone know how to get it so it smooths well in chrome?
Chad Kreutzer
@ChadKreutzer
Feb 03 2016 05:43
@freefora11 I dunno. I just looked at it in Chrome and it scrolled just fine.
Srinivas
@sriducati
Feb 03 2016 05:49
<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake")

$("#target1").addClass("animated shake btn-primary btn");

});
</script>
Only add one class with each of your three selectors.
what does it mean?
its showing wrong
anybody online?
DJ
@qualitymanifest
Feb 03 2016 05:55
@sriducati #target1 has the class .btn so it already has shake. and it is a button so it already has the class animated
Srinivas
@sriducati
Feb 03 2016 05:57
@sriducati #target1 has the class .btn so it already has shake. and it is a button so it already has the class animated
sorry copied the same...
@qualitymanifest
then what we have to add?
question is not clear
do we just specify selectors?
$("button");
$(".btn");

$("#target1").addClass("animated shake btn-primary");
DJ
@qualitymanifest
Feb 03 2016 05:58

@sriducati they tell you

Only add one class with each of your three selectors.

so you just need to add the only other class they tell you to add

Srinivas
@sriducati
Feb 03 2016 05:59
@qualitymanifest
DJ
@qualitymanifest
Feb 03 2016 05:59
@sriducati no.... you had it mostly right before, you just only need to add one class to #target1
Srinivas
@sriducati
Feb 03 2016 05:59
Use the $("button") selector.
Use the $(".btn") selector.
Use the $("#target1") selector.
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.
vishnulove
@07vishnu
Feb 03 2016 06:00
i am new to freecodecamp what is next step
DJ
@qualitymanifest
Feb 03 2016 06:00
$("button").addClass("animated"); // #target1 is a button so it will get animated
$(".btn").addClass("shake") // #target1 has the class .btn so it will get shake
$("#target1").addClass("animated shake btn-primary"); // get rid of the classes here that have already been added
@sriducati :point_up:
Srinivas
@sriducati
Feb 03 2016 06:02
@qualitymanifest ya i tried ur code as well....
still its showing as wrong....
DJ
@qualitymanifest
Feb 03 2016 06:03
@sriducati ya i wasn't giving you the answer i was explaining what you need to change...
Srinivas
@sriducati
Feb 03 2016 06:03
oh..k
$("#target1").addClass("btn-primary");
something like this?
DJ
@qualitymanifest
Feb 03 2016 06:04
@sriducati try it. should work unless you changed something
Srinivas
@sriducati
Feb 03 2016 06:04
ya...thats the one :) did not understnad the question correctly...
but thanks @qualitymanifest for explainging ;)
CamperBot
@camperbot
Feb 03 2016 06:04
sriducati sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 893 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Feb 03 2016 06:05
@sriducati cool :+1: glad you got it
amiickg
@amiickg
Feb 03 2016 06:07
@Manish-Giri @ajsnetiker Thank you very much.
CamperBot
@camperbot
Feb 03 2016 06:07
amiickg sends brownie points to @manish-giri and @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 618 | @manish-giri | http://www.freecodecamp.com/manish-giri
:star: 285 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
Nitesh Kumar
@nik2code
Feb 03 2016 06:09
.
Mark David Teo
@volaix
Feb 03 2016 06:09
Hay guizzzzzzzzzzzz
Can someone help me out? :D
(im dying on the inside trying to figure this out)
Markus Kiili
@Masd925
Feb 03 2016 06:13
@volaix It should be if (true), but it will always run the code block and is therefore useless.
Mark David Teo
@volaix
Feb 03 2016 06:14
ohhh ok. Thanks for the grammar help @Masd925
CamperBot
@camperbot
Feb 03 2016 06:14
volaix sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 889 | @masd925 | http://www.freecodecamp.com/masd925
Markus Kiili
@Masd925
Feb 03 2016 06:14
@volaix Should it be: if(myObj.hasOwnProperty(checkProp)){...}
Mark David Teo
@volaix
Feb 03 2016 06:14
ohhhhh
yeah that makes alot more sense
seanvsville
@seanvsville
Feb 03 2016 06:15

<labels><input type="radio" name="indoor-outdoor">indoor</labels>
<labels><input type="radio" name="indoor-outdoor">outdoor</labels>

Can someone help with this:
Give your radio buttons the name attribute of indoor-outdoor. x
Each of your two radio button elements should be nested in its own label element. x
Make sure each of your label elements has a closing tag. x
One of your radio buttons should have the label indoor. x
One of your radio buttons should have the label outdoor. x

Mark David Teo
@volaix
Feb 03 2016 06:15
but doesnt the hasOwnProperty function return a value of true and false? @Masd925
that's what I was thinking? :oi
@seanvsville what's the name of the challenge?
seanvsville
@seanvsville
Feb 03 2016 06:16
Create a set of radio buttons
Markus Kiili
@Masd925
Feb 03 2016 06:16
@volaix Yes it does. That is why you can test it with if.
lavieb33
@lavieb33
Feb 03 2016 06:17
Any help?
Mark David Teo
@volaix
Feb 03 2016 06:17

ah sorry I don't think I quite understand yet.

What does what I currently have do?

```myObj.hasOwnProperty(checkProp);

js```myObj.hasOwnProperty(checkProp);
```js myObj.hasOwnProperty(checkProp);````
lavieb33
@lavieb33
Feb 03 2016 06:18
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() {

  // Only change code below this line.
var gear;
  this.setGear = function(){
    gear = 3;
  };
 this.getGear = function(){

    return gear;
  };


  // Only change code above this line.
};

var myCar = new Car();

var myBike = new Bike();
Make object properties private
Markus Kiili
@Masd925
Feb 03 2016 06:20
@lavieb33 Setgear method should have a parameter and you should use it to set the gear variable.
seanvsville
@seanvsville
Feb 03 2016 06:20
hmm, nvm, my coding was correct, not sure why it didnt get validated the first time
Markus Kiili
@Masd925
Feb 03 2016 06:21
@lavieb33 Also you should initialize gear to something, maybe to 1.
Hassan Shahzad Aheer
@hassanshahzadaheer
Feb 03 2016 06:32
code

what is the issue with my code. it show error "You need 2 p elements with Kitty Ipsum text."
<style> .red-text { color: red; font-size: 16px; } </style>
`<h2 class="red-text">CatPhotoApp</h2>

<p style= "font-size : 16px"> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>`

please help
lavieb33
@lavieb33
Feb 03 2016 06:36
DJ
@qualitymanifest
Feb 03 2016 06:36
@hassanshahzadaheer you only have 1 p element
lavieb33
@lavieb33
Feb 03 2016 06:38

@seanvsville ```
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() {

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

this.setGear = function(){

};
this.getGear = function(){

return gear;

};

// Only change code above this line.
};

var myCar = new Car();

var myBike = new Bike();
```

sxWalle
@LDWX
Feb 03 2016 06:38

function palindrome(str) {
// Good luck!
var re = /,?\s*.?/gi;
var oldStr =str.replace(re, "").toLowerCase();
var Str = oldStr.replace("_", "-").replace("/", "");
var newStr = Str.split("").reverse().join("");
var re2 = /()/gi;
newStr.replace("re2" ,"");

if (newStr == Str){

return true;

}
return newStr;
}

palindrome("0_0 (: /-\ :) 0-0");

function palindrome(str) {
// Good luck!
var re = /,?\s*.?/gi;
var oldStr =str.replace(re, "").toLowerCase();
var Str = oldStr.replace("_", "-").replace("/", "");
var newStr = Str.split("").reverse().join("");
var re2 = /()/gi;
newStr.replace("re2" ,"");

if (newStr == Str){

return true;

}
return false;
}

palindrome("0_0 (: /-\ :) 0-0");

function palindrome(str) {
// Good luck!
var re = /,?\s*.?/gi;
var oldStr =str.replace(re, "").toLowerCase();
var Str = oldStr.replace("_", "-").replace("/", "");
var newStr = Str.split("").reverse().join("");
var re2 = /()/gi;
newStr.replace("re2" ,"");

if (newStr == Str){

return true;

}
return false;
}

palindrome("0_0 (: /-\ :) 0-0");

how could I exchange ")" and "("???

Markus Kiili
@Masd925
Feb 03 2016 06:41
@LDWX You should take a look at \w and \W in regexp.
sxWalle
@LDWX
Feb 03 2016 06:43
@Masd925 At what place ???
蒲公英の生活
@fewspider
Feb 03 2016 06:43
wiki format
CamperBot
@camperbot
Feb 03 2016 06:43

: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

Marina
@chandra90
Feb 03 2016 06:44
Hello! Please help!
Markus Kiili
@Masd925
Feb 03 2016 06:44
@LDWX At your re variable.
Marina
@chandra90
Feb 03 2016 06:45
.gray-background {
  background-color: gray;
}
<div class="gray-backround">
huy-tran
@huy-tran
Feb 03 2016 06:45
you missed g in background
Marina
@chandra90
Feb 03 2016 06:46
oh yes thanks @huy-tran
CamperBot
@camperbot
Feb 03 2016 06:46
chandra90 sends brownie points to @huy-tran :sparkles: :thumbsup: :sparkles:
:star: 156 | @huy-tran | http://www.freecodecamp.com/huy-tran
seanvsville
@seanvsville
Feb 03 2016 06:46
Can you tell me what I'm missing?
<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>
Your div element should have a gray background.
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

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

.gray.background {background-color: gray;}

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

.smaller-image {
width: 100px;

</style>
huy-tran
@huy-tran
Feb 03 2016 06:47
you have duplicated .
in your “.gray.background
seanvsville
@seanvsville
Feb 03 2016 06:47
ahh, nvm, found it!
:)
huy-tran
@huy-tran
Feb 03 2016 06:47
haha cheers !
seanvsville
@seanvsville
Feb 03 2016 06:47
thanks!
lol
sxWalle
@LDWX
Feb 03 2016 06:48

@qualitymanifest
function palindrome(str) {
// Good luck!
var re = /,?\W\s.?_?/gi;
var oldStr =str.replace(re, "").toLowerCase();
var newStr = oldStr.split("").reverse().join("");

if (newStr == oldStr){

return true;

}
return false;
}

palindrome("0_0 (: /-\ :) 0-0");

I ignore all special signal,so that it can return true.

@Masd925 @qualitymanifest thank you very much
CamperBot
@camperbot
Feb 03 2016 06:49
ldwx sends brownie points to @masd925 and @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 895 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
sxWalle
@LDWX
Feb 03 2016 06:49
sdfa
CamperBot
@camperbot
Feb 03 2016 06:49
:star: 890 | @masd925 | http://www.freecodecamp.com/masd925
Zach
@Moose1551
Feb 03 2016 06:49

I don't understand why this isn't working.

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>

huy-tran
@huy-tran
Feb 03 2016 06:50
@Moose1551 check your spell then
Zach
@Moose1551
Feb 03 2016 06:50
Sorry. how do I provide an image like chandra90 up above did?
huy-tran
@huy-tran
Feb 03 2016 06:50
I believe it should have space between “CatPhotoApp”
wiki format
CamperBot
@camperbot
Feb 03 2016 06:51

: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

lavieb33
@lavieb33
Feb 03 2016 06:51
@Moose1551 @Moose1551 past everything
DJ
@qualitymanifest
Feb 03 2016 06:52
@LDWX closer but still not there. get rid of the . in your replace (and you will still need to make changes after that). this is why: http://www.w3schools.com/jsref/jsref_regexp_dot.asp
Zach
@Moose1551
Feb 03 2016 06:53
thanks @camperbot
@lavieb33 , I don't understand.
CamperBot
@camperbot
Feb 03 2016 06:53
moose1551 sends brownie points to @camperbot and @lavieb33 :sparkles: :thumbsup: :sparkles:
:star: 1085 | @camperbot | http://www.freecodecamp.com/camperbot
:star: 4 | @lavieb33 | http://www.freecodecamp.com/lavieb33
sxWalle
@LDWX
Feb 03 2016 06:54
@qualitymanifest
var re = /\W\s_?/gi;
Adjust like this ?
cun3
@cun3
Feb 03 2016 06:54
Stuck at question 151
Zach
@Moose1551
Feb 03 2016 06:54
I feel like I need a degree in IT just to ask for help, haha.
cun3
@cun3
Feb 03 2016 06:54
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
What does it mean?
DJ
@qualitymanifest
Feb 03 2016 06:56
@LDWX that's not the best way of doing it, but it will work
lavieb33
@lavieb33
Feb 03 2016 06:56
@cun3 past everything so we can take a look
sxWalle
@LDWX
Feb 03 2016 06:57
@qualitymanifest
could you please show me your solution of that ?
cun3
@cun3
Feb 03 2016 06:57

If this helps
Quotes are not the only characters that can be escaped inside a string. Here is a table of common escape sequences:
Code Output
\' single quote
\" double quote
\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed
Note that the backslash itself must be escaped in order to display as a backslash.

Instructions
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr

Run tests (ctrl + enter)

DJ
@qualitymanifest
Feb 03 2016 06:57
@LDWX do you understand your solution? like, can you tell me what every part of var re = /\W*\s*\_?/gi;is doing? because if not, showing you my solution won't help
Hector Garcia
@augmt
Feb 03 2016 06:57
@cun3 you want to create a string whose output satisfies the instructions' conditions
a backslash, for example, would be "\\"
cun3
@cun3
Feb 03 2016 06:58
well okay, let me give it a try before coming back to you guys
lavieb33
@lavieb33
Feb 03 2016 06:58
@cun3 and where is your solution in the editor?
cun3
@cun3
Feb 03 2016 06:58
Thanks,will check
sxWalle
@LDWX
Feb 03 2016 06:59
@qualitymanifest
of course, \W Find a non-word character, \s Find a whitespace character
DJ
@qualitymanifest
Feb 03 2016 07:00
@LDWX you don't need the * and \s aren't a word character so, no need to replace
@LDWX word characters are a-z,A-Z,0-9 and _
@LDWX so you only need to replace non-word characters and _
Zach
@Moose1551
Feb 03 2016 07:02
html
```1 <!--ONE-->
Jesus
huy-tran
@huy-tran
Feb 03 2016 07:04
<!—ONE—>
Zach
@Moose1551
Feb 03 2016 07:04

```<!--ONE-->

<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<p>Hello Paragraph</p>``

huy-tran
@huy-tran
Feb 03 2016 07:04
<!--ONE-->
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>
Zach
@Moose1551
Feb 03 2016 07:05
<h1>Hello World</h1>

<h2>CatPhotoApp</h2>

<!--TWO-->
<p>Hello Paragraph</p>
huy-tran
@huy-tran
Feb 03 2016 07:05
you made it haha
Zach
@Moose1551
Feb 03 2016 07:07

oh my god. Above

<h1>Hello World</h1>

I have <!--ONE-->

so my h1 and p are commented out, but the tests won't run. I don't understand

DJ
@qualitymanifest
Feb 03 2016 07:07
@Moose1551 paste the link to your challenge?
DJ
@qualitymanifest
Feb 03 2016 07:09
@Moose1551 you haven't commented either of them out, you just have comments above them
noumanriaz
@noumanriaz
Feb 03 2016 07:09
Hi All
huy-tran
@huy-tran
Feb 03 2016 07:10
read the instructions that says comment the h1 and p
so you comment should wrap h1 and p
just like the word ONE and TWO
imaging ONE is your <h1> tag
DJ
@qualitymanifest
Feb 03 2016 07:10
@Moose1551
<!--starting comment
<realHTMLelement></realHTMLelement>
ending the comment -->
Zach
@Moose1551
Feb 03 2016 07:12
@qualitymanifest , Thank you so much.
CamperBot
@camperbot
Feb 03 2016 07:12
moose1551 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 896 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
sxWalle
@LDWX
Feb 03 2016 07:12
@qualitymanifest
you are right, I get it ,thank you
CamperBot
@camperbot
Feb 03 2016 07:12
ldwx sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:warning: ldwx already gave qualitymanifest points
DJ
@qualitymanifest
Feb 03 2016 07:13
@Moose1551 @LDWX :+1: for getting it :smile:
lavieb33
@lavieb33
Feb 03 2016 07:25
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() {

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

  this.setGear = function(){
   gear = 1; 
  };
 this.getGear = function(){

    return gear;
  };


  // Only change code above this line.
};

var myCar = new Car();

var myBike = new Bike();
what's missing here , I stuck and don't quiet understand this way point
Is there a lecture on this particular waypoint: Make Object Properties Private
huy-tran
@huy-tran
Feb 03 2016 07:29
@lavieb33 what do you expect from this one? I am concerning about the setGear method in Bike constructor (I am not reaching this exercise yet haha)
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 07:29
Hey guys, got a quick question here. Doing the lesson "Create a Form Element" and so far have done this.
<form action="/submit-cat-photo"></form>
However, after running tests it says that I still have to "Nest my text input element within a form element" It seems to me I have already done this. Any thoughts are much appreciated!
huy-tran
@huy-tran
Feb 03 2016 07:30
@lavieb33 is it += 1 or = 1 :shipit:
Hector Garcia
@augmt
Feb 03 2016 07:31
@jeremyengstad can you post your code?
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 07:31
Yes. Here.
<form action="/submit-cat-photo"></form>
Hector Garcia
@augmt
Feb 03 2016 07:31
all of it :p
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 07:31
oh k lol.

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

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

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

Hector Garcia
@augmt
Feb 03 2016 07:33
ahh ok
by nest, the test means that it wants the form element to envelop the text-input
something like
huy-tran
@huy-tran
Feb 03 2016 07:34
@jeremyengstad try this <form ……><input ….></form>
Hector Garcia
@augmt
Feb 03 2016 07:34
<form>
    <input>
</form>
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 07:35
ok so
I tried <form> <action=/submit-cat-photo"> </form> and it really didnt like that lol
Marina
@chandra90
Feb 03 2016 07:38

Help please!

.pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text!important blue-text" style="color: pink!important">Hello World!</h1>

what's wrong?

CamperBot
@camperbot
Feb 03 2016 07:38
no wiki entry for: pleasepink-text color pink blue-text color blue styleh1 idorange-text classpink-textimportant blue-text stylecolor pinkimportanthello worldh1whats wrong
huy-tran
@huy-tran
Feb 03 2016 07:39
@chandra90 remove !important
Marina
@chandra90
Feb 03 2016 07:39
@huy-tran where?
Hector Garcia
@augmt
Feb 03 2016 07:39
@jeremyengstad try <form action='/submit-cat-photo'><input></form> with the appropriate input stuff
KacperPorembski
@KacperPorembski
Feb 03 2016 07:39
@Takumar thank you :)
CamperBot
@camperbot
Feb 03 2016 07:39
kacperporembski sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2077 | @takumar | http://www.freecodecamp.com/takumar
Hector Garcia
@augmt
Feb 03 2016 07:40
@jeremyengstad action goes along with form; it's not its own element
Srinivas
@sriducati
Feb 03 2016 07:41
completing skills..
dont understnd this...
myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces
whats this?
Hector Garcia
@augmt
Feb 03 2016 07:41
@sriducati you need to create a string whose output matches the instructions
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 07:41
Ok thank you! <form action='/submit-cat-photo'><input></form> worked even with just the word "input" cheers
Hector Garcia
@augmt
Feb 03 2016 07:42
haha, no problem
huy-tran
@huy-tran
Feb 03 2016 07:42
@chandra90 in your class and style
Marina
@chandra90
Feb 03 2016 07:43
@huy-tran but the task is: Your pink-text class should have the !important keyword to override all other declarations.
Srinivas
@sriducati
Feb 03 2016 07:43
@augmt but how to create tab?
lavieb33
@lavieb33
Feb 03 2016 07:43

@huy-tran ```

The method getGear of myBike should be accessible outside the object.

The method setGear of myBike should be accessible outside the object.

myBike.gear should remain undefined.

myBike.getGear() should return 4 after calling myBike.setGear(4).

myBike.getGear() should return 3 after calling myBike.setGear(3).

myBike.getGear() should return 1 after calling myBike.setGear(1).

};

1
var Car = function() {

2
// this is a private variable

3
var speed = 10;

4

5
// these are public methods

6
this.accelerate = function(change) {

7
speed += change;

8
};

9

10
this.decelerate = function() {

11
speed -= 5;

12
};

13

14
this.getSpeed = function() {

15
return speed;

16
};

17
};

18

19
var Bike = function() {

20
var gear;

21

22
this.setGear = function(){

23
gear +=1;

24
};

25
this.getGear = function(){

26

27
return gear;

28
};

29
};

30
var myCar = new Car();

31

32
var myBike = new Bike();

33

```

Srinivas
@sriducati
Feb 03 2016 07:43
tab is just a space right?
huy-tran
@huy-tran
Feb 03 2016 07:43
@chandra90 add !important in your css file
Hector Garcia
@augmt
Feb 03 2016 07:44
@sriducati it should say in the instructions, but tab is \t
lavieb33
@lavieb33
Feb 03 2016 07:44

 

The method getGear of myBike should be accessible outside the object. 




 

The method setGear of myBike should be accessible outside the object. 




 

myBike.gear should remain undefined. 




 

myBike.getGear() should return 4 after calling myBike.setGear(4). 




 

myBike.getGear() should return 3 after calling myBike.setGear(3). 




 

myBike.getGear() should return 1 after calling myBike.setGear(1). 









};
















1
var Car = function() {



2
  // this is a private variable



3
  var speed = 10;



45
  // these are public methods



6
  this.accelerate = function(change) {



7
    speed += change;



8
  };



910
  this.decelerate = function() {



11
    speed -= 5;



12
  };



1314
  this.getSpeed = function() {



15
    return speed;



16
  };



17
};



1819
var Bike = function() {



20
var gear;



2122
  this.setGear = function(){



23
   gear +=1; 



24
  };



25
 this.getGear = function(){



2627
    return gear;



28
  };



29
};



30
var myCar = new Car();



3132
var myBike = new Bike();



33
huy-tran
@huy-tran
Feb 03 2016 07:44
@chandra90 .pink-text {
lavieb33
@lavieb33
Feb 03 2016 07:44
sorry here
Srinivas
@sriducati
Feb 03 2016 07:44
any exapmle using tab?
Hector Garcia
@augmt
Feb 03 2016 07:44
var myStr = "\t"; // contains the tab character
Marina
@chandra90
Feb 03 2016 07:45
@huy-tran thanks
CamperBot
@camperbot
Feb 03 2016 07:45
chandra90 sends brownie points to @huy-tran :sparkles: :thumbsup: :sparkles:
:warning: chandra90 already gave huy-tran points
Srinivas
@sriducati
Feb 03 2016 07:46
@augmt thank you
CamperBot
@camperbot
Feb 03 2016 07:46
sriducati sends brownie points to @augmt :sparkles: :thumbsup: :sparkles:
:star: 331 | @augmt | http://www.freecodecamp.com/augmt
lavieb33
@lavieb33
Feb 03 2016 07:47

 

The method getGear of myBike should be accessible outside the object. 




 

The method setGear of myBike should be accessible outside the object. 




 

myBike.gear should remain undefined. 




 

myBike.getGear() should return 4 after calling myBike.setGear(4). 




 

myBike.getGear() should return 3 after calling myBike.setGear(3). 




 

myBike.getGear() should return 1 after calling myBike.setGear(1).
Srinivas
@sriducati
Feb 03 2016 08:00
var myStr = 'this isn\\'t a double quoted string';
myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces
its not working...
lavieb33
@lavieb33
Feb 03 2016 08:00
This is suck , I'm really stuck with this waypoint " Make Object Properties Private" Anywhere I can find this lecture or someone with more explanation
Srinivas
@sriducati
Feb 03 2016 08:01
its not escaping charcters in chanlenge skills
what ever i write...same is output
var myStr = 'this isn\\t\t\r\n a double quoted string';
myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces
Hector Garcia
@augmt
Feb 03 2016 08:03
@sriducati you only want escaped squences in myStr and you want each one separated by a space
to start off, var myStr = '\\ \t \t'; // continue from here
Srinivas
@sriducati
Feb 03 2016 08:04
oh...got it...
;)
Srinivas
@sriducati
Feb 03 2016 08:10
var myName ="ghghghg";
var myStr = myName + "noooooooo"+"hjjjjjj";
Use two + operators to build myStr with myName inside it
whats wrong in this?
Robert Uivarosi
@URobert
Feb 03 2016 08:12
@sriducati I guess that's not following the instructions exactly
@sriducati what is the name of it ?
lavieb33
@lavieb33
Feb 03 2016 08:12
 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() {

  // Only change code below this line.
var gear = 1;
  this.getgear = function(){

  };


  this.setGear = function(){

  };
};

var myCar = new Car();

var myBike = new Bike();
Srinivas
@sriducati
Feb 03 2016 08:12
@URobert myName should be set to a string at least 3 characters long
Use two + operators to build myStr with myName inside it
lavieb33
@lavieb33
Feb 03 2016 08:12
what's going on here?
Srinivas
@sriducati
Feb 03 2016 08:13
thats the instruction
Constructing Strings with Variables
lavieb33
@lavieb33
Feb 03 2016 08:13
Now try it yourself! Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value. waypoint Make object properties private
Srinivas
@sriducati
Feb 03 2016 08:15
Instructions are not clear
Robert Uivarosi
@URobert
Feb 03 2016 08:15
@sriducati see example in there? You have to use the variable myName in between the two strings
@sriducati instructions seem pretty clear. They also mention which string to use
@sriducati your code should look like: var myStr = "My name is"+ myName + "and I am swell!";
Srinivas
@sriducati
Feb 03 2016 08:16
@URobert oh got it
ya...its working thank you @URobert
CamperBot
@camperbot
Feb 03 2016 08:16
sriducati sends brownie points to @urobert :sparkles: :thumbsup: :sparkles:
lavieb33
@lavieb33
Feb 03 2016 08:16
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() {

  // Only change code below this line.
var gear ;
  this.getGear = function(gear){
     gear = 1;
    return gear;
  };


  this.setGear = function(){

  };
};

var myCar = new Car();

var myBike = new Bike();
CamperBot
@camperbot
Feb 03 2016 08:16
:star: 548 | @urobert | http://www.freecodecamp.com/urobert
Robert Uivarosi
@URobert
Feb 03 2016 08:16
@sriducati yw ;)
lavieb33
@lavieb33
Feb 03 2016 08:17
what's missing to my code above plz
cannelflow
@cannelflow
Feb 03 2016 08:17
@lavieb33 which exercise ?
lavieb33
@lavieb33
Feb 03 2016 08:17
it's telling me this: myBike.getGear() should return 4 after calling myBike.setGear(4).
myBike.getGear() should return 3 after calling myBike.setGear(3)
@cannelflow waypoint : Make Object Properties Private
@lavieb33 Now try it yourself! Modify the Bike constructor to have a private property called gear and two public methods called getGear and setGear to get and set that value.
cannelflow
@cannelflow
Feb 03 2016 08:22

@lavieb33 this.setGear = function(){

}; not returning anything

@lavieb33 Modify the Bike constructor to have a private property called gear so assign value var gear ; and remove gear = 1;
ykcab
@ykcab
Feb 03 2016 08:27
please tell where the error is?
lavieb33
@lavieb33
Feb 03 2016 08:27
@cannelflow "Modify the Bike constructor to have a private property called gear " meaning passing parameters to the constructor? and really I am a little confused between private propertie and private variable
cannelflow
@cannelflow
Feb 03 2016 08:28
var bike = function(){
if you declare var here it private to Bike constructor since you canot access it outside
}
@lavieb33
Damaris Muange
@ndush
Feb 03 2016 08:29
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
cannelflow
@cannelflow
Feb 03 2016 08:29
@ndush ?
@lavieb33 yes passing parameter inside
Damaris Muange
@ndush
Feb 03 2016 08:31
I need help on how to create an entry for p elements and set the font-size to 16 pixels (16px).
cannelflow
@cannelflow
Feb 03 2016 08:31
@lavieb33 youcan also see in exercise above example
@ndush tried something?
Robert Uivarosi
@URobert
Feb 03 2016 08:31
@ndush see example of red -text?
@ndush you need something like that but without . class marker in front. So youll be looking at:p{ add here your code to set font size to 16px} `
cannelflow
@cannelflow
Feb 03 2016 08:33
@lavieb33 ?
Damaris Muange
@ndush
Feb 03 2016 08:34
its worked thank but i had to declare p as p1 to differentiate the two paragraphs. why cant just use p and it works?
cannelflow
@cannelflow
Feb 03 2016 08:35
@ndush you can perhaps you can show us what you did
lavieb33
@lavieb33
Feb 03 2016 08:35
@cannelflow let me see what i understand and I get back to you
cannelflow
@cannelflow
Feb 03 2016 08:35
@lavieb33 :+1:
@ndush a paragraph is a <p> tag not <p1>
Damaris Muange
@ndush
Feb 03 2016 08:35

<style>
.red-text {
color: red;
}
p1 {
font-size: 16px;
}
</style>

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

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

<p1 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.</p1>

cannelflow
@cannelflow
Feb 03 2016 08:36
@ndush you don't need p1
just <P> will work
which exercise ?
Juuso Nurmi
@juusooh
Feb 03 2016 08:37
blob
What the hell should I do?
@ndush Your error is in "<p1 clas.... " It should be just <p> Purr..... </p>
Devashish
@newbie-07
Feb 03 2016 08:38
@juusooh the second step is ... var b = a;
cannelflow
@cannelflow
Feb 03 2016 08:39
@juusooh assign the contents of b to a
Damaris Muange
@ndush
Feb 03 2016 08:39
its only the second paragraph that should be 16px
cannelflow
@cannelflow
Feb 03 2016 08:39
@ndush which ex?
Juuso Nurmi
@juusooh
Feb 03 2016 08:39
@newbie-07 @cannelflow Thank you!
CamperBot
@camperbot
Feb 03 2016 08:39
juusooh sends brownie points to @newbie-07 and @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 275 | @newbie-07 | http://www.freecodecamp.com/newbie-07
:star: 695 | @cannelflow | http://www.freecodecamp.com/cannelflow
Damaris Muange
@ndush
Feb 03 2016 08:39

<style>
.red-text {
color: red;
}
p {
font-size: 16px;
}
</style>

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

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

cannelflow
@cannelflow
Feb 03 2016 08:40
@ndush man name of exercise ?
Devashish
@newbie-07
Feb 03 2016 08:40
@juusooh you are welcome
Juuso Nurmi
@juusooh
Feb 03 2016 08:40
@ndush you don't need the class for the second <p>
<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p > Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
this should be right
cannelflow
@cannelflow
Feb 03 2016 08:40
@juusooh btw which exercise is this ?
Juuso Nurmi
@juusooh
Feb 03 2016 08:41
Initializing Variables with the Equal Operator Incomplete   New
lavieb33
@lavieb33
Feb 03 2016 08:50
@cannelflow :"Modify the Bike constructor to have a private property called gear " meaning passing parameter to the Bike constructor? and when you say "assign value var gear " do you mean assigning the string "value" to the variable var gear?
cannelflow
@cannelflow
Feb 03 2016 08:52
@lavieb33 understand like pass parameter and assign it a value
any num value
Srinivas
@sriducati
Feb 03 2016 08:57
my score is 164,,, what score do i have to reach to get certificate?
Emil Aasa
@emilaasa
Feb 03 2016 08:58
Getters and setters are a great concept to understand btw so keep at it! =)
Devashish
@newbie-07
Feb 03 2016 08:59
@sriducati It is not about scores...you need to complete all the challenges in front end development which includes building 10 working web applications
Srinivas
@sriducati
Feb 03 2016 09:00
@newbie-07 but iam already exprnced guy...i actually need certificate... so just checking.... how many more chlnegs will i have?
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:00
@sriducati it comes to about 175 hours of work even if it does t take you that long
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 09:01
Hey gang, quick issue having with "Making Images Mobile Responsive Tutorial".
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:01
@sriducati the program is free, it's certificates are worth nothing unless you show you learned from the program. If you don't do the projects you're wasting your time
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 09:01

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

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

cannelflow
@cannelflow
Feb 03 2016 09:02
@jeremyengstad which exercise try code formatting
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:02
@jeremyengstad add img before img-responsive, you need both
I think
Devashish
@newbie-07
Feb 03 2016 09:02
@sriducati then complete the algorithm scripting challenges and build the front end development projects...you will be good to go
cannelflow
@cannelflow
Feb 03 2016 09:03
@sriducati how you will get certificate without attending curriculam
Srinivas
@sriducati
Feb 03 2016 09:03
@ajsnetiker got it
Jeremy Kaare Engstad
@jeremyengstad
Feb 03 2016 09:03
K you got it! cheers
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:04
Nice
cannelflow
@cannelflow
Feb 03 2016 09:04
@sriducati don't worry if you know already then it won't take time for you
expected time is only estimate
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:05
I'm building a responsive site right now (separate from the projects). Generally you need 2 classes for things, one general and one specific. For example if you want a calendar icon, with bootstrap you would need to say
<div class=glyphicon glyphicon-calendar">
just at an example, same type of thing as img though
cannelflow
@cannelflow
Feb 03 2016 09:08
so what are you trying to say ?
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:10
Similar to what @jeremyengstad just had, I think you always need
2 classes, that's all
Juuso Nurmi
@juusooh
Feb 03 2016 09:10
blob
Where do I have to put the ++?
kirbyedy
@kirbyedy
Feb 03 2016 09:13
instead of 1
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:13
@juusooh myvar++ does the same thing
kirbyedy
@kirbyedy
Feb 03 2016 09:13
x+1 is actually the same as x++
Adam Snetiker
@ajsnetiker
Feb 03 2016 09:14
But you don't need the = either, should just be myVar++ to increment
lavieb33
@lavieb33
Feb 03 2016 09:15

@cannelflow ```
var Bike = function() {

// Only change code below this line.

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

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

Juuso Nurmi
@juusooh
Feb 03 2016 09:16
@ajsnetiker Thanks!
CamperBot
@camperbot
Feb 03 2016 09:16
juusooh sends brownie points to @ajsnetiker :sparkles: :thumbsup: :sparkles:
:star: 286 | @ajsnetiker | http://www.freecodecamp.com/ajsnetiker
lavieb33
@lavieb33
Feb 03 2016 09:16
when passing parameter , the argument gear is what needs to be passed?
@cannelflow when passing parameter , the argument gear is what needs to be passed?
Emil Aasa
@emilaasa
Feb 03 2016 09:18
@lavieb33 use ``` and then press enter
then insert your code
and press ctrl/cmd enter
lavieb33
@lavieb33
Feb 03 2016 09:19

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

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

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

var Bike = function() {

  // Only change code below this line.

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


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

var myCar = new Car();

var myBike = new Bike();
Emil Aasa
@emilaasa
Feb 03 2016 09:19
neat!
lavieb33
@lavieb33
Feb 03 2016 09:20
@emilaasa I just can't do it when replying directly to someone
Emil Aasa
@emilaasa
Feb 03 2016 09:20
ok =)
Maybe I can help you
ykcab
@ykcab
Feb 03 2016 09:20
please help

$(document).ready(function(){
});

<div class="container-fluid">

Emil Aasa
@emilaasa
Feb 03 2016 09:20
confused with getters and setters? or what is the problem
ykcab
@ykcab
Feb 03 2016 09:21
the grader not accepting the code..
$(document).ready(function(){
});
lavieb33
@lavieb33
Feb 03 2016 09:21
@emilaasa sure I am struggling with waypoint : "Make Object Properties Private"
Emil Aasa
@emilaasa
Feb 03 2016 09:21
ok
So do you understand why it might be a good idea to make properties private?
Understanding that will make the get and set methods make more sense.
lavieb33
@lavieb33
Feb 03 2016 09:23
@emilaasa so they can only be access within the function and not outside?
Emil Aasa
@emilaasa
Feb 03 2016 09:23
Yeah thats sort of it!
Keeps the code from getting too intertwined and buggy when making larger apps.
So, now you still might want to see (get) the properties from outside
So a getter is just a method that returns the value
// you can remove a few things from this and it would be a perfect getter
this.getGear = function(gear){
   gear = 10;
    return gear ;
  };
lavieb33
@lavieb33
Feb 03 2016 09:29
@emilaasa ok let me try
Emil Aasa
@emilaasa
Feb 03 2016 09:29
yep! trying to leave the right amount of breadcrumbs to the solution
Always hard :D
lavieb33
@lavieb33
Feb 03 2016 09:29
@emilaasa lol really
Emil Aasa
@emilaasa
Feb 03 2016 09:32
Im of to uni in a bit so if you want some more hints I will only be here for a few more minutes =)
lavieb33
@lavieb33
Feb 03 2016 09:36
of course I still do with this .. I tried to remove the argument and gear = 10;, but don't make no difference ... i ve worked on this one waypoint all night long
Emil Aasa
@emilaasa
Feb 03 2016 09:36
paste it again
the new version
lavieb33
@lavieb33
Feb 03 2016 09:37
```
var Bike = function() {

  // Only change code below this line.
 var gear;
  this.getGear = function(){
  return gear;

  };
```
Emil Aasa
@emilaasa
Feb 03 2016 09:39
okay, have you tried assigning a temporary value to gear , as in var gear = 10
lavieb33
@lavieb33
Feb 03 2016 09:39
and if I have to pass in parameter then I have to put back the argument gear isn't it?
Emil Aasa
@emilaasa
Feb 03 2016 09:39
the getter looks fine now
lavieb33
@lavieb33
Feb 03 2016 09:41
yes I did try to assign it a value
Emil Aasa
@emilaasa
Feb 03 2016 09:41
hmm, works for me in console
lavieb33
@lavieb33
Feb 03 2016 09:42
var Bike = function() {

  // Only change code below this line.

  this.getGear = function(){
    var gear = 10;
  return gear;

  };
ain
ain't that what you mean?
Emil Aasa
@emilaasa
Feb 03 2016 09:43
oh sorry no
var Bike = function() {
var gear = 3;
lavieb33
@lavieb33
Feb 03 2016 09:45
yes for 3 it works but then the setGear is still wrong
Emil Aasa
@emilaasa
Feb 03 2016 09:45
yeah, lets see setGear
paste your current code now
lavieb33
@lavieb33
Feb 03 2016 09:46
 this.setGear = function(){
    return gear;
  };
};
Claudiu
@cladddd
Feb 03 2016 09:46
@Manish-Giri than you very much
Emil Aasa
@emilaasa
Feb 03 2016 09:46
Okay now you need to think about what the setGear method is supposed to do
currently that looks exactly like the getter right?
So, what should the setGear method do?
leanminmachine
@leanminmachine
Feb 03 2016 09:47
hi! I need help for a js bonfire
bonfire return largest numbers in an array
CamperBot
@camperbot
Feb 03 2016 09:48
Sorry, can't find a bonfire called return largest numbers in an array. [ Check the map? ]
leanminmachine
@leanminmachine
Feb 03 2016 09:48
fcc return largest numbers in arrays
lavieb33
@lavieb33
Feb 03 2016 09:48
set the value of the propertie?
leanminmachine
@leanminmachine
Feb 03 2016 09:48
lol ugh.
Emil Aasa
@emilaasa
Feb 03 2016 09:49
@lavieb33 bingo !
lavieb33
@lavieb33
Feb 03 2016 09:49
so @emilaasa set the value of gear?
Emil Aasa
@emilaasa
Feb 03 2016 09:49
yes
Alexander Radchenko
@AlexRadch
Feb 03 2016 09:50
How to say correctly on English: We born to brought wonderwork
lavieb33
@lavieb33
Feb 03 2016 09:51
@emilaasa since gear returns 3 then?
Emil Aasa
@emilaasa
Feb 03 2016 09:53
im not following you now
But you are exactly right when you say that the setGear method should set the value of the property
now all you need to do is write a method that does that
Damaris Muange
@ndush
Feb 03 2016 09:54
how to do multiple line comments
Maulik Darji
@maulikdarji
Feb 03 2016 09:57
help formatting
CamperBot
@camperbot
Feb 03 2016 09:57

: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

Maulik Darji
@maulikdarji
Feb 03 2016 09:57
@ndush
Alexander Radchenko
@AlexRadch
Feb 03 2016 09:59
How correctly say on English? We born to brought wonder work
Emil Aasa
@emilaasa
Feb 03 2016 10:03
@lavieb33 is it working out for you?
lavieb33
@lavieb33
Feb 03 2016 10:04
trying to figure out with the link you sent earlier
Emil Aasa
@emilaasa
Feb 03 2016 10:05
I think that might have been a bit confusing
Damaris Muange
@ndush
Feb 03 2016 10:06
how to do multipleline comment
Emil Aasa
@emilaasa
Feb 03 2016 10:07
You already reasoned to the conclusion of what the setter should do
Now you only need to write it like a method

so @emilaasa set the value of gear?

Written in the simplest form of code that would look like this:

var gear = 0; // initializing variable with a default value

gear = 10; // setting the value
Emil Aasa
@emilaasa
Feb 03 2016 10:14
var Bike = function() {
    var gear = 10; // or whatever default value you want

  this.getGear = function(){
  return gear; // gets the value 
};

  this.setGear = function
   // how do you set the value?
lavieb33
@lavieb33
Feb 03 2016 10:19
yes how do you set the value? that's where is my issue now
Emil Aasa
@emilaasa
Feb 03 2016 10:20
Do you want me to just tell you?
Srinivas
@sriducati
Feb 03 2016 10:20
can someone help me with ..... "Stand in Line" challenge ,i can fix it by writing if else condition.....but seems we shld not use if else conditions.....
Emil Aasa
@emilaasa
Feb 03 2016 10:20
Because im out of clues now >D
Srinivas
@sriducati
Feb 03 2016 10:20

function queue(arr, item) {
// Your code here
var first = arr0;
arr.push(item);
arr.shift(first);
return first; // Change this line
}

// Test Setup
var testArr = [];

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

is my current code
lavieb33
@lavieb33
Feb 03 2016 10:20
@emilaasa yes plz then I ll go back to it later
Emil Aasa
@emilaasa
Feb 03 2016 10:21
this.setGear = function (value) {
  gear = value;
};
myBike.getGear();
myBike.setGear(99);
myBike.getGear(); // to test
Srinivas
@sriducati
Feb 03 2016 10:22
anyone got better solution for my question?

function queue(arr, item) {
// Your code here
var first = arr0;
arr.push(item);
arr.shift(first);
return first; // Change this line
}

// Test Setup
var testArr = [];

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

"Stand in Line" challenge ,i can fix it by writing if else condition.....but seems we shld not use if else conditions.....
instead of using if else condition....
Emil Aasa
@emilaasa
Feb 03 2016 10:22
@sriducati
help formatting
CamperBot
@camperbot
Feb 03 2016 10:22

: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

Srinivas
@sriducati
Feb 03 2016 10:23
long code.. how to format
k
Alexander Radchenko
@AlexRadch
Feb 03 2016 10:25
"We born to brought miracle" is correct on english?
Srinivas
@sriducati
Feb 03 2016 10:25
how to format...still searching
lll
anyone got better solution for my question? function queue(arr, item) { // Your code here var first = arr0; arr.push(item); arr.shift(first); return first; // Change this line } // Test Setup var testArr = []; // Display Code console.log("Before: " + JSON.stringify(testArr)); console.log(queue(testArr, 1)); // Modify this line to test console.log("After: " + JSON.stringify(testArr)); "Stand in Line" challenge ,i can fix it by writing if else condition.....but seems we shld not use if else conditions..... instead of using if else condition....
Emil Aasa
@emilaasa
Feb 03 2016 10:26
nope :)
``` then press enter
Srinivas
@sriducati
Feb 03 2016 10:26
oh god... seriously.. dont know :(
Emil Aasa
@emilaasa
Feb 03 2016 10:26
and after that ctrl +
v
and then cmd or ctrl enter
Srinivas
@sriducati
Feb 03 2016 10:26
anyone got better solution for my question?
function queue(arr, item) {
// Your code here
var first = arr0;
arr.push(item);
arr.shift(first);
return first; // Change this line
}
// Test Setup
var testArr = [];
// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
"Stand in Line" challenge ,i can fix it by writing if else condition.....but seems we shld not use if else conditions.....
instead of using if else condition....
Emil Aasa
@emilaasa
Feb 03 2016 10:26
xD
Srinivas
@sriducati
Feb 03 2016 10:27
v
Sachin Mour
@sachinmour
Feb 03 2016 10:27
Select all code...copy with formatting
Emil Aasa
@emilaasa
Feb 03 2016 10:27
function queue(arr, item) {
// Your code here
var first = arr0;
arr.push(item);
arr.shift(first);
return first; // Change this line
}
// Test Setup
var testArr = [];
// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
Srinivas
@sriducati
Feb 03 2016 10:27
Guyz...seriously..iam not spaming
@emilaasa ya..thats my code.....
any better solution for that?
queue([], 1) should return 1
to achive this...i have to add if else...
is it correct?
Emil Aasa
@emilaasa
Feb 03 2016 10:29
What was the challenge name?
Srinivas
@sriducati
Feb 03 2016 10:29
Stand in Line
Emil Aasa
@emilaasa
Feb 03 2016 10:32
Ah yes
there is an easier way
Srinivas
@sriducati
Feb 03 2016 10:32
ya got it....
```
arr.push(item);
return arr.shift();
lavieb33
@lavieb33
Feb 03 2016 10:32
@emilaasa thank yo
CamperBot
@camperbot
Feb 03 2016 10:32
lavieb33 sends brownie points to @emilaasa :sparkles: :thumbsup: :sparkles:
:star: 286 | @emilaasa | http://www.freecodecamp.com/emilaasa
Emil Aasa
@emilaasa
Feb 03 2016 10:33
perfect @sriducati :)
Srinivas
@sriducati
Feb 03 2016 10:34
```
is it ctrl+enter?
to go to next line?
Emil Aasa
@emilaasa
Feb 03 2016 10:35
Just enter for me but maybe shift enter
shift + enter
also works
Srinivas
@sriducati
Feb 03 2016 10:35
 arr.push(item);
  return arr.shift();
thats it ;)
Emil Aasa
@emilaasa
Feb 03 2016 10:35
simple and elegant :)
Srinivas
@sriducati
Feb 03 2016 10:36
ya it is... awesome @emilaasa
Emil Aasa
@emilaasa
Feb 03 2016 10:36
Your coding skills are better than your gitter markdown skills atm ;D
Srinivas
@sriducati
Feb 03 2016 10:36
lol :D
Carlos Francisco Branco Pereira
@24080
Feb 03 2016 11:15
<script>
$(document).ready(function(){});
</script>
VICTOR GODWIN HORTUNU
@soundsvox
Feb 03 2016 11:55
hello i need help with JS challenge escaping sequence with strings
any help?
VICTOR GODWIN HORTUNU
@soundsvox
Feb 03 2016 12:04
never mind ....done
Liam Bang
@Liam345
Feb 03 2016 12:23
Cannot figure out the error in the code please help
kirbyedy
@kirbyedy
Feb 03 2016 12:26
This message was deleted
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:27
Hi Everyone!
kirbyedy
@kirbyedy
Feb 03 2016 12:27
@Liam345 remove the "answer"
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:27
I have a question: is somewhere something similar to FCC for JAVA?
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:27
switch(val) @Liam345
kirbyedy
@kirbyedy
Feb 03 2016 12:28
not here as far as I know, try to google it @GianlucaBelardinelli
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:28
I did @kirbyedy but seems that there isn't something similar.
Anyway I'll continue working doing the "exams" to get the certification
and...After you get a certification, is true that you can find a "job" also as a no profit?
Just to do experience
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:29
can anyone tell me why isn't this working? :( http://www.freecodecamp.com/challenges/profile-lookup#?solution=%2F%2FSetup%0Avar%20contacts%20%3D%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Akira%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Laine%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220543236543%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20%5B%22Pizza%22%2C%20%22Coding%22%2C%20%22Brownie%20Points%22%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Harry%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Potter%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220994372684%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20%5B%22Hogwarts%22%2C%20%22Magic%22%2C%20%22Hagrid%22%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Sherlock%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Holmes%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%220487345643%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20%5B%22Intriguing%20Cases%22%2C%20%22Violin%22%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22firstName%22%3A%20%22Kristian%22%2C%0A%20%20%20%20%20%20%20%20%22lastName%22%3A%20%22Vos%22%2C%0A%20%20%20%20%20%20%20%20%22number%22%3A%20%22unknown%22%2C%0A%20%20%20%20%20%20%20%20%22likes%22%3A%20%5B%22Javascript%22%2C%20%22Gaming%22%2C%20%22Foxes%22%5D%0A%20%20%20%20%7D%0A%5D%3B%0A%0A%0Afunction%20lookUp(firstName%2C%20prop)%7B%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0A%20%20var%20result%3B%0A%20%20for(var%20i%3D0%3B%20i%3Ccontacts.length%3Bi%2B%2B)%0A%20%20%20%20%7B%0A%20%20%20%20%20%20if(contacts%5Bi%5D.firstName%3D%3DfirstName%20%26%26%20contacts%5Bi%5D.hasOwnProperty(prop))%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20result%3D%20contacts%5Bi%5D%5Bprop%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20else%20if(contacts%5Bi%5D.firstName!%3DfirstName)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20result%3D%20%22No%20such%20contact%22%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if(!contacts%5Bi%5D.hasOwnProperty(prop))%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20result%3D%20%22No%20such%20property%22%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20return%20result%3B%0A%2F%2F%20Only%20change%20code%20above%20this%20line%0A%7D%0A%0A%2F%2F%20Change%20these%20values%20to%20test%20your%20function%0AlookUp(%22Kristian%22%2C%20%22lastName%22)%3B%0A
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:32
@SergiuPintilei the methos is not correct
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:32
:)) can you be a little bit more precise? what's wrong
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:32
This is the right code: http://pastebin.com/xsqLDKgW
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:32
@GianlucaBelardinelli thx!
CamperBot
@camperbot
Feb 03 2016 12:32
sergiupintilei sends brownie points to @gianlucabelardinelli :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for gianlucabelardinelli
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:32
;)
Does it works @SergiuPintilei ?
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:35
@GianlucaBelardinelli hmm no
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:35
hmm
give me the bin again
@SergiuPintilei
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:37

function lookUp(firstName, prop){
// Only change code below this line
var result;
for(var i=0; i<contacts.length;i++)
{
if(contacts[i].firstName==firstName && contacts[i].hasOwnProperty(prop))
{
result= contacts[i][prop];
}

    else if(contacts[i].firstName!=firstName)
    {
      result= "No such contact";
    }
  else if(!contacts[i].hasOwnProperty(prop))
    {
      result= "No such property";
    }
}

return result;
// Only change code above this line
}

Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:37
Why else if?
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:37
omg that copy paste...
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:38
When you need to code and you are a beginner, always open NOTEPAD and do a Pseudo Code
You don't need else if
Maybe I pasted wrong
Stby
@SergiuPintilei Re paste the code I gave you no
now*
SergiuPintilei
@SergiuPintilei
Feb 03 2016 12:39
@GianlucaBelardinelli cool it works now! let me check it line by line
@GianlucaBelardinelli thx a lot
CamperBot
@camperbot
Feb 03 2016 12:39
sergiupintilei sends brownie points to @gianlucabelardinelli :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for gianlucabelardinelli
Gianluca Belardinelli
@GianlucaBelardinelli
Feb 03 2016 12:40
Great! Glad to help
;)
Sourav Karanjai
@souravkaranjai
Feb 03 2016 12:59
Hello World!!!
CamperBot
@camperbot
Feb 03 2016 12:59

welcome to FreeCodeCamp @souravkaranjai!

Aleksander Gębicki
@Takumar
Feb 03 2016 12:59
@souravkaranjai welcome to FCC academy - happy coding! :-)
Artem Saunin
@4sau
Feb 03 2016 13:10
Hello World!
CamperBot
@camperbot
Feb 03 2016 13:10

welcome to FreeCodeCamp @4sau!

B. Garber
@TheBGar
Feb 03 2016 13:14
@souravkaranjai @4sau Hello and welcome!
Aleksander Gębicki
@Takumar
Feb 03 2016 13:16
@4sau welcome to FCC :-)
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:23
hi need help with bonfire
:/
function end(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor
  //str = str.split(" ");
  var a = str.substring(str.length -1);
  if (a === target)
    {
      return true;
    }
  else 
    {
      return false;
    }
  return str;
}

end("Bastian", "n");
how do i break up strings
Aleksander Gębicki
@Takumar
Feb 03 2016 13:26
@fahadh14 return str; is not needed for sure. Comparing with if statement is good also.
Check documentation how to get substring from the end of string (negative indexes), because your way of thinking is almost good, but there is an error in calling of substring() method.
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:30
@Takumar i can do like .substring(0,(end before last string))
but idk the value ;/
and how to go about doing it
Aleksander Gębicki
@Takumar
Feb 03 2016 13:31
@fahadh14 but you don't want to get Bastia string but n rather in your case,
find the string of length target.length but beginning from the end :-)
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:31
cause the bonfire has single words and strings also
omg i just got an idea
LOL
let me try
function end(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor
  var b = target.length;
  var a = str.substring(str.length -b);
  if (a === target)
    {
      return true;
    }
  else 
    {
      return false;
    }
  return str;
}

end("Bastian", "n");
GOT IT!
wow , i didnt even think of that :/ lack critical thinking sad.
@Takumar THANKS!!!
CamperBot
@camperbot
Feb 03 2016 13:35
fahadh14 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
Aleksander Gębicki
@Takumar
Feb 03 2016 13:35
@fahadh14 almost, now clear your code a little. Do you ever run: return str;?
CamperBot
@camperbot
Feb 03 2016 13:35
:star: 2079 | @takumar | http://www.freecodecamp.com/takumar
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:35
oh yea no,
shit i forgot about that
@Takumar any suggestions how train my critical reasoning like that
:(
Aleksander Gębicki
@Takumar
Feb 03 2016 13:36

@fahadh14 this part:

if (a === target)
    {
      return true;
    }
  else 
    {
      return false;
    }

takes a lot of place, you will be scrolling and scrolling your functions :-)
Use:

return (a === target);

instead of this, it will do the same.

@fahadh14 you will be learning this all your life by writing more codes :-)
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:37
like out of 8 bonfires i did
i did like 4 myself , the other 4 i needed help
thats bad :/
Aleksander Gębicki
@Takumar
Feb 03 2016 13:39
@fahadh14 I did all myself without asking but spend more time on them and haven't finished advanced. I think your way is better, you can always return to the problem and solve it again without help and not waste precious time.
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:41
hello guys .. would someone please tell me how to change the width of a photo
Mohamed Fahadh
@fahadh14
Feb 03 2016 13:41
@Takumar true that, maybe i should continue doing it thanks alot man
CamperBot
@camperbot
Feb 03 2016 13:41
fahadh14 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: fahadh14 already gave takumar points
Aleksander Gębicki
@Takumar
Feb 03 2016 13:42
@mohamedhamza1995 do you mean CSS part of exercises? You want to create CSS class for changing size of image?
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:42
yes
@Takumar yes
Aleksander Gębicki
@Takumar
Feb 03 2016 13:43
@mohamedhamza1995 you have example how to create class .large-image, you have to create same but with different width property called .smaller-image
Then you will use it and apply it to image: <img class="smaller-image">
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:44
@Takumar yes I did all this I don't know the last step
how to apply the class on the photo
Aleksander Gębicki
@Takumar
Feb 03 2016 13:45
@mohamedhamza1995 I wrote you last step upper. <img class="smaller-image">
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:45
oh thank you so much
sorry I didn't notice
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:51
I have a problem with the second task ""Your image should be 100 pixels wide. Browser zoom should be at 100%.""
Adi Prasetyo
@brutalcrozt
Feb 03 2016 13:53
@mohamedhamza1995 what rules you specify on .smaller-image?
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:58
@brutalcrozt .smaller-image{
width: 100px;
}
Surya Kiran
@suryakiran138
Feb 03 2016 13:58
HelloWorld
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 13:59
@brutalcrozt I'm already applying 100% zoom
Aleksander Gębicki
@Takumar
Feb 03 2016 14:00
@mohamedhamza1995 if your code is not working show it, so we can check
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:00
@Takumar okay

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

is there a way to copy past the code in a nice way? @Takumar
Aleksander Gębicki
@Takumar
Feb 03 2016 14:01

@mohamedhamza1995 look at this code:

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

You should modify existing link (upper line) not add another.
I gave you only fragment of code as example how to apply class to image tag.

Zijad Aljic
@princexzijvd
Feb 03 2016 14:02
@Takumar How did you put your code in this "console"?
Aleksander Gębicki
@Takumar
Feb 03 2016 14:02
@princexzijvd you have to use backticks
```
your code
```
Or read help from @camperbot
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:02
@Takumar I will check now
Aleksander Gębicki
@Takumar
Feb 03 2016 14:02
wiki format
CamperBot
@camperbot
Feb 03 2016 14:02

: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

Miha Šušteršič
@Shooshte
Feb 03 2016 14:03
Hi guys, I'm working on Intermediate Algorhitm scripting - Smallest Common Multiple and got stuck. Can't figure out why my loop is going infinite and how I should approach this. Could anyone have a look at hopefully explain what I'm doing wrong?
function smallestCommons(arr) {
  //sort from smallest to largest
  arr.sort(function(a, b) {
    return a-b;
  });
  var result = 0;
  var divisors = [];
  //while number of divisors !== last number to check
  while(divisors.length < arr[1]) {
    //check if number divides result
    for(var x = arr[0]; x < arr[1]; x++) {
      //if it divides result
      if(result % x === 0) {
        //push it to divisors
        divisors.push(x);
      }
      else {
        //clear divisors
        divisors = [];
      }
    }
    //check next number
    result++;
  }  
  return result;
}

smallestCommons([5,1]);
Zijad Aljic
@princexzijvd
Feb 03 2016 14:03
@Takumar This is pretty hard on a german keyboard :smile:
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:04
<img src="https://bit.ly/fcc-relaxing-cat"> <img class="smaller-image">
Zijad Aljic
@princexzijvd
Feb 03 2016 14:04
<p>Ah, I made it</p>
@Takumar Works fine, thanks!
CamperBot
@camperbot
Feb 03 2016 14:05
princexzijvd sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 2083 | @takumar | http://www.freecodecamp.com/takumar
sigursiguros
@sigursiguros
Feb 03 2016 14:05
@sigursiguros
HI fellow campers, would you please tell me what's wrong with my code?
$("#operators a, #side a").not("#equals, #decimal").click(function(){
if ($("#sqrt").clicked == true) {
operator = "sqrt";
$("#equals").click();
return;
}
else {
operator = $(this).text();
}
newnumber = number;
number = "";
totaldiv.text("0");
});
I'm trying to test which button ID was clicked
Raghuram
@Raghuram42
Feb 03 2016 14:07
hello help me
function postToURL(a,b,c){
document.getElementById("ninja").action = a;
document.getElementById("donaldduck").name = b;
document.getElementById("donaldduck").value = c;
document.getElementById("ninja").submit();
}
can you tell me how to take parameters from a webpage (HTML) and send it as a GET/POST parameter to a website?'
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:08
<p>test</p>
great
Raghuram
@Raghuram42
Feb 03 2016 14:08
can you tell me how to take parameters from a webpage (HTML) and send it as a GET/POST parameter to a website?
Damaris Muange
@ndush
Feb 03 2016 14:10
what is a anchor text.
Aleksander Gębicki
@Takumar
Feb 03 2016 14:11
@ndush <a href="www.example.com">This is anchor text</a>
Miha Šušteršič
@Shooshte
Feb 03 2016 14:11
Hi guys, I'm working on Intermediate Algorhitm scripting - Smallest Common Multiple and got stuck. Can't figure out why my loop is going infinite and how I should approach this. Could anyone have a look at hopefully explain what I'm doing wrong?
function smallestCommons(arr) {
  //sort from smallest to largest
  arr.sort(function(a, b) {
    return a-b;
  });
  var result = 0;
  var divisors = [];
  //while number of divisors !== last number to check
  while(divisors.length < arr[1]) {
    //check if number divides result
    for(var x = arr[0]; x < arr[1]; x++) {
      //if it divides result
      if(result % x === 0) {
        //push it to divisors
        divisors.push(x);
      }
      else {
        //clear divisors
        divisors = [];
      }
    }
    //check next number
    result++;
  }  
  return result;
}

smallestCommons([5,1]);
Artem Saunin
@4sau
Feb 03 2016 14:11
@mohamedhamza1995 this one looks better <img img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:15
@4sau thank you!
CamperBot
@camperbot
Feb 03 2016 14:15
mohamedhamza1995 sends brownie points to @4sau :sparkles: :thumbsup: :sparkles:
Mohamed Hamza
@mohamedhamza1995
Feb 03 2016 14:15
@Takumar thank you Mr!
Raghuram
@Raghuram42
Feb 03 2016 14:15
help me
CamperBot
@camperbot
Feb 03 2016 14:15

:point_right: adding environment variables [wiki]

In Windows

Via GUI

  1. Download Varpanel.
  2. Open Varpanel.
  3. In PATH variable, add the relevant path (for example).

:pencil: read more about adding environment variables on the FCC Wiki

Raghuram
@Raghuram42
Feb 03 2016 14:16
can you tell me how to take parameters from a webpage (HTML) and send it as a GET/POST parameter to a website
Adi Prasetyo
@brutalcrozt
Feb 03 2016 14:27
@Raghuram42 usually you req get via browser url, that a basic GET
The POST is when you submit something, somewhere on your html you specify where to post that data
Andrew
@StepPointer
Feb 03 2016 14:27
ppl help ... i cant finish Introducing JavaScript Object Notation JSON
it succeed but it dont go on a next step
Hussein Zaki
@Hussein90
Feb 03 2016 14:29
hello guys .. would someone please tell me how to Text zoom should be at 100%.
Zijad Aljic
@princexzijvd
Feb 03 2016 14:29
@Shooshte I think that there is a break missing at the end
Lawrence Fick
@posterdale
Feb 03 2016 14:29
@Hussein90 which browser are you using?
Hussein Zaki
@Hussein90
Feb 03 2016 14:29
opera
Lawrence Fick
@posterdale
Feb 03 2016 14:29
@Hussein90 ctrl + 0 on the keyboard usually sets text to 100%
kirbyedy
@kirbyedy
Feb 03 2016 14:30
@StepPointer refresh the browser
Adi Prasetyo
@brutalcrozt
Feb 03 2016 14:30
@StepPointer what's your problem?
Andrew
@StepPointer
Feb 03 2016 14:30
dont help
@kirbyedy dont help
kirbyedy
@kirbyedy
Feb 03 2016 14:31
then try to clear the cache
Andrew
@StepPointer
Feb 03 2016 14:31
blob
ok will try now
Zijad Aljic
@princexzijvd
Feb 03 2016 14:31
//check next number
    result++;
  }  
  return result;
}
break;
@Shooshte
Hussein Zaki
@Hussein90
Feb 03 2016 14:32
@posterdale Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%. i do the font size but i cant do the next one
Daniel O'Mahony
@OMahonyD
Feb 03 2016 14:32
@Hussein90 What do you think of Opera? I've never really tried it - do most of my testing in work on Chrome, Firefox and IE
@Hussein90 CTRL + 0 should refresh the browser view to 100%;
Lawrence Fick
@posterdale
Feb 03 2016 14:33
@Hussein90 It's not something you physically have to do in the coding window, try completing the section as is
Adi Prasetyo
@brutalcrozt
Feb 03 2016 14:33
@Hussein90 @OMahonyD make sure update all those browser.
i am not facing that issue