These are chat archives for FreeCodeCamp/Help

25th
Jan 2016
Julia Jacobs
@jewelsjacobs
Jan 25 2016 00:00
@AndrewGHC :) Finally have a full working affix, scrollspy, masonJS responsive cross browser portfolio. Whew.
Lots of help from all at FreeCodeCamp!!! :sparkles: :clap:
Now on to making my quote generator look better . . . and then its finishing my calculator css masterpiece
n2france
@n2france
Jan 25 2016 00:10
Need help again please. I am at the section called Size your Images and I have inserted the code .smaller-image {
width: 100px;
}
The image doesn't resize. I am using Firefox.
Raj Dhanju
@rajdhanju1
Jan 25 2016 00:13
@n2france have you added the smaller-image class to the img tag?
Aleksander Gębicki
@Takumar
Jan 25 2016 00:13
@n2france you also have to apply your class to <img> tag.
Raj Dhanju
@rajdhanju1
Jan 25 2016 00:13
@n2france <img class="smaller-image">
Aleksander Gębicki
@Takumar
Jan 25 2016 00:18
@n2france and how are you doing?
n2france
@n2france
Jan 25 2016 00:24
still having problems. trying to understand and apply.
is the <img class="smaller-image"> in addition to the .smaller-image {
width: 100px;
}
?
I removed the .smaller-image {
width: 100px;
}
n2france
@n2france
Jan 25 2016 00:29
I put it back and added what @rajdhanju1 said to. I didn't realize I had to add that. These directions aren't always clear. Thank you guys for the help!
CamperBot
@camperbot
Jan 25 2016 00:29
n2france sends brownie points to @rajdhanju1 :sparkles: :thumbsup: :sparkles:
:star: 110 | @rajdhanju1 | http://www.freecodecamp.com/rajdhanju1
Aleksander Gębicki
@Takumar
Jan 25 2016 00:34
@n2france between <style> and </style> tags you define your CSS class (how element look), after that you can use that class in your code, i.e.
<p class="smaller-image">This is paragraph although it can have such class :-) </p>
<img class="smaller-image" src="image.jpg">
n2france
@n2france
Jan 25 2016 00:43
@Takumar That's what I'm having trouble with. I type what I think it's asking and then that's not the right code. Lol.
renu shinde
@renushinde
Jan 25 2016 00:50
pls help me in exercise 75. I cant ness all html elements in .container-fluid
Donna Young
@eager2learn
Jan 25 2016 00:52
I can try and help. Please show us what you have?
I think what you want to do is wrap the HTML elements in a div with class .container-fluid. So something like <div class="container-fluid"> ... </div>. Hope that helps you :smile:
Utkarsh Bhimte
@Utkarshbhimte
Jan 25 2016 00:55
function sym() {

  // Convert the argument object into a proper array
  var args = Array.prototype.slice.call(arguments);

  // Return the symmetric difference of 2 arrays
  var getDiff = function(arr1, arr2) {

    // Returns items in arr1 that don't exist in arr2
    function filterFunction(arr1, arr2) {
      return arr1.filter(function(item) {
        return arr2.indexOf(item) === -1;
      });
    }

    // Run filter function on each array against the other
    return filterFunction(arr1, arr2)
      .concat(filterFunction(arr2, arr1));
  };

  //Dealing with recurrances in the final answer
  var final=args.reduce(getDiff, []);
  final.sort();

    for(var i=0;i<final.length;i++){
        if(final[i]===final[i+1]){
        final.splice(final[i-1], 1);
      }
    }

  // Reduce all arguments getting the difference of them
  return final;
}

sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);
I am still getting [1,4,5,5] instead of [1,4,5].
Jacob Bass
@Jacob-Bass
Jan 25 2016 01:00

Just finished the "Mutations" challenge. While I was able to complete it, I was wondering if there was a simpler way?

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

function mutation(arr) {
  var y = [arr[0].toLowerCase(),arr[1].toLowerCase()];
  var x = y[1].split("");
  var ver;
  for (var i=0;i<x.length;i++){
   if (y[0].indexOf(x[i])>=0){
     ver=true;
   }else if(y[0].indexOf(x[i])<0){
     ver=false;
     break;
   }
  }
  switch(ver){
    case true:
      return true;

    case false:
      return false;    
  }

}


mutation(["floor", "for"]);
mutation(["zyxwvutsrqponmlkjihgfedcba", "qrstu"]);
mutation(["Mary", "Army"]);
mutation(["hello", "neo"]);
Kuuhaku722
@Kuuhaku722
Jan 25 2016 01:09
Help.... can't move from size your images. what should i do
CamperBot
@camperbot
Jan 25 2016 01:09
no wiki entry for: cant move from size your images what should i do
Kuuhaku722
@Kuuhaku722
Jan 25 2016 01:10

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

<style>
.red-text {
color: red;
}
.smaller-image {
width: 100px;
}
h2 {
font-family: Lobster, Monospace;
}

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

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

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

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

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

Aleksander Gębicki
@Takumar
Jan 25 2016 01:11
@Kuuhaku722 you have to modify existing image not add another one at the end. Do you see the line: <img src="https://bit.ly/fcc-relaxing-cat"> after the heading <h2>?
Kuuhaku722
@Kuuhaku722
Jan 25 2016 01:12
so i should remove that
thx it works xD
Haroon Ghawsi
@HaroonGhawsi
Jan 25 2016 01:13
Hi, How to put an image in background of the window in CSS or bootstrap?

CSS Code

body {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;

}
nav {
    width: 100%;
    margin: 20px 0;
}

.cover {
    color: rgb(255, 255, 255);
    position: relative;
    min-height: 350px;
    background: url("images/4.jpg") no-repeat scroll 0px 100% / cover transparent;
}

HTML Code

<nav class="nav navbar-inverse">
    <div class="container-fluid">
        <form class="nav form-inline">
            <ul class="nav navbar-nav navbar-left">
                <li>
                    <a href="#">Haroon Ghawsi</a>
                </li>
            </ul>
        <ul class="nav navbar-nav navbar-right">
            <li class="active"><a  href="#">Home</a></li>
            <li><a  href="#">About</a></li>
            <li><a  href="#">Social Profile</a></li>
            <li><a  href="#">Contact</a></li>
        </ul>
        </form>
    </div>
</nav>
Jason Statt
@jsstatt
Jan 25 2016 01:15
having trouble with ancors
anchors
Haroon Ghawsi
@HaroonGhawsi
Jan 25 2016 01:15
but unfortunately its not working
Vince Aggrippino
@VAggrippino
Jan 25 2016 01:15

CSS:

body {
    background-image: url('images/kittens.jpg');
}

Also take a look at this: https://css-tricks.com/perfect-full-page-background-image/ @HaroonGhawsi

Donna Young
@eager2learn
Jan 25 2016 01:17
@HaroonGhawsi Looks like maybe a typo on the last line of css? Should cover transparent be a comment with a // and the semicolon be after the 100%?
Vince Aggrippino
@VAggrippino
Jan 25 2016 01:20
@HaroonGhawsi you're not using the cover class on any of your elements.
Haroon Ghawsi
@HaroonGhawsi
Jan 25 2016 01:21
@Ghodmode I am using cover class in my div element at the end
@eager2learn I have removed the /... also but it did not work
body {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background-image: url("images/4.jpg");

}
nav {
    width: 100%;
    margin: 20px 0;
}

.cover {
    color: rgb(255, 255, 255);
    position: relative;
    min-height: 350px;

}
still not working
Donna Young
@eager2learn
Jan 25 2016 01:28
@HaroonGhawsi Not sure about this, but try putting 0% instead of 0px after scroll
Haroon Ghawsi
@HaroonGhawsi
Jan 25 2016 01:30
@eager2learn Ok
Jason
@Jauble
Jan 25 2016 01:46
This message was deleted
they line up to the left
GM-Connor
@GM-Connor
Jan 25 2016 01:50
@HaroonGhawsi What are you trying to do?
Steven Osterwald
@keks411
Jan 25 2016 01:52
Is there a way in HTML or CSS to preload images? My propblem is that I have a image which will replace a background-image on a button on the event .hover. This always takes 1-2 seconds to load.
chriscchristensen
@chriscchristensen
Jan 25 2016 01:53
Capture.PNG
Could anyone give me a hand with this challenge? "Introducing JavaScript Object Notation JSON" is the challenge name.
Am I in the right direction at least?
Steven Osterwald
@keks411
Jan 25 2016 01:54
@chriscchristensen mymusic1.push
oh it took out the brackets
Vince Aggrippino
@VAggrippino
Jan 25 2016 01:55
I think in that lesson it tells you to add the record without push(). Just put a comma after the closing bracket of the first record and enter your record. @chriscchristensen
Evgeny Kasian
@ievgenk
Jan 25 2016 01:56
Hey Guys I am kind of stuck with the firs exercise from Bootstrap, named "Use Responsive Design with Bootstrap Fluid Containers"
I am not sure how to proceed I have put <div class="container-fluid>"> right after </style>
Ryan
@ryanforever
Jan 25 2016 01:56
did you put a closing </div> ?
Evgeny Kasian
@ievgenk
Jan 25 2016 01:56
Which should have encompassed all of the html but the challenge deos not go through
yep :)
Ryan
@ryanforever
Jan 25 2016 01:57
it should be "container-fluid">
with no > after the "d"?
chriscchristensen
@chriscchristensen
Jan 25 2016 01:57
@ievgenk You have an extra ">" at the end of "container-fluid"
Steven Osterwald
@keks411
Jan 25 2016 01:58
@chriscchristensen Sorry, wrong answer. Like mentioned already. You just need to write down some stuff like: js "artist": "artist", "title": "Saxophon Man", "release_year": 1923, "formats": [ "CD", "1T", "ET" ]
Evgeny Kasian
@ievgenk
Jan 25 2016 01:59
@chriscchristensen Thank you!
CamperBot
@camperbot
Jan 25 2016 01:59
ievgenk sends brownie points to @chriscchristensen :sparkles: :thumbsup: :sparkles:
:star: 218 | @chriscchristensen | http://www.freecodecamp.com/chriscchristensen
Evgeny Kasian
@ievgenk
Jan 25 2016 01:59
Silly me!
Last thing now it tells me that to make sure that each di has a closing tag
But I am sure that I do, still does not go through
Matthew Johnson
@EmjayFlight
Jan 25 2016 02:00
Hey guys! Everything is working except the else if. I am only returning “…” when I should be returing “A…"
```
function truncate(str, num) {
  // Clear out that junk in your trunk
  var conCat = "...";
  if (str.length > num) {
    return str.slice(0, num-3) + conCat; 
  }
  else if (str.length < 3){
    return str.slice(0, num) + conCat;
}
  else {
    return str;
  }
}
truncate("A-", 1);
Evgeny Kasian
@ievgenk
Jan 25 2016 02:01
Figured it out, thanks guys for help, you are awesome ! :)
jpg8127
@jpg8127
Jan 25 2016 02:02
@MrEmjay417 I think that is because its going through the first if
chriscchristensen
@chriscchristensen
Jan 25 2016 02:02
@keks411 so I don't need all the [] and {} and () I just need to put js and then the rest of the properties ?
ecrausch
@ecrausch
Jan 25 2016 02:03
Im having problems killing my link, ive replaced "href" with "#" and its not working, is there anything else i have to do?
Steven Osterwald
@keks411
Jan 25 2016 02:03
no, forget the js...thats just me failing to put in code in this chat here ;) You could basically copy everything under mymusic and change it, if you want
jpg8127
@jpg8127
Jan 25 2016 02:03
@ecrausch I think the URL link is supposed to be # not that part
Steven Osterwald
@keks411
Jan 25 2016 02:04
@chriscchristensen no, forget the js...thats just me failing to put in code in this chat here :wink: You could basically copy everything under mymusic and change it, if you want
GM-Connor
@GM-Connor
Jan 25 2016 02:04
@ecrausch href="#"
Vince Aggrippino
@VAggrippino
Jan 25 2016 02:04

@HaroonGhawsi I can't offer much in the way of an explanation as to why, but if you remove transparent after cover.

I think it has something to do with the way the browser recognizes the background-size property. You were right to have that slash in there (ref: http://stackoverflow.com/q/7864448/2948042), but putting the color after the size messes it up somehow.

You can put the color anywhere else in your background property and it seems to work, but I don't think you need to because transparent is the default anyway.

http://codepen.io/Ghodmode/pen/bELZqX

ecrausch
@ecrausch
Jan 25 2016 02:05
thanks
chriscchristensen
@chriscchristensen
Jan 25 2016 02:05
Capture.PNG
THis is what I am getting now.
greg
@wearenotgroot
Jan 25 2016 02:05
@MrEmjay417 should be else if (num <= 3) not else if (str.length < 3)
GM-Connor
@GM-Connor
Jan 25 2016 02:06
@chriscchristensen comma after }
needs to be added
line 11
Steven Osterwald
@keks411
Jan 25 2016 02:07
@MrEmjay417 As mentioned, the first if returns true and you are trying to slice off something at position -2, which does not work
greg
@wearenotgroot
Jan 25 2016 02:08
@MrEmjay417 also test for if (num <= 3) first
meatyogre
@meatyogre
Jan 25 2016 02:09
hey guys, is there a specific way people are doing pair programming?
skype?
greg
@wearenotgroot
Jan 25 2016 02:09
@MrEmjay417 should be like this
  var conCat = "...";
  if (num <= 3){
    return str.slice(0, num) + conCat;
}
 else if (str.length > num) {
    return str.slice(0, num-3) + conCat; 
  }
  else {
    return str;
  }
meatyogre
@meatyogre
Jan 25 2016 02:09
or is there some sort of way to do it within FCC
Matthew Johnson
@EmjayFlight
Jan 25 2016 02:09
Got it guys! thanks @wearenotgroot @keks411 @wearenotgroot
CamperBot
@camperbot
Jan 25 2016 02:09
mremjay417 sends brownie points to @wearenotgroot and @keks411 and @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 270 | @keks411 | http://www.freecodecamp.com/keks411
:star: 542 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
:star: 542 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
GM-Connor
@GM-Connor
Jan 25 2016 02:10
@meatyogre If you go into the room there is a description at the top with link to what is being used
greg
@wearenotgroot
Jan 25 2016 02:10
@MrEmjay417 :+1:
chriscchristensen
@chriscchristensen
Jan 25 2016 02:10
Thanks @GM-Connor @keks411 and @Ghodmode ! It worked. I think I was really over thinking everything!
CamperBot
@camperbot
Jan 25 2016 02:10
chriscchristensen sends brownie points to @gm-connor and @keks411 and @ghodmode :sparkles: :thumbsup: :sparkles:
:star: 271 | @keks411 | http://www.freecodecamp.com/keks411
:star: 232 | @ghodmode | http://www.freecodecamp.com/ghodmode
:star: 148 | @gm-connor | http://www.freecodecamp.com/gm-connor
meatyogre
@meatyogre
Jan 25 2016 02:11
@GM-Connor which room are you referring to?
meatyogre
@meatyogre
Jan 25 2016 02:11
ah thanks
GM-Connor
@GM-Connor
Jan 25 2016 02:11
If you go to https://gitter.im/FreeCodeCamp/ you get a list of rooms for this site, there is one called Paired Programming
Matthew Johnson
@EmjayFlight
Jan 25 2016 02:12
@meatyogre Screenhero
Vince Aggrippino
@VAggrippino
Jan 25 2016 02:16

@keks411

Is there a way in HTML or CSS to preload images? My propblem is that I have a image which will replace a background-image on a button on the event .hover. This always takes 1-2 seconds to load.

I don't understand the ways I've seen to do it with HTML or CSS, but you can do it by loading the image into a Javascript variable:

var myImage = new Image();
myImage.src = 'http://lorempixel.com/400/200';

That way the image is in the cache already. Then, when the hover event is triggered it shows right away.

Related:

Steven Osterwald
@keks411
Jan 25 2016 02:23
@Ghodmode Thanks :) I found a way to do it with simple CSS as well. Its the first method in your 2nd link
CamperBot
@camperbot
Jan 25 2016 02:23
keks411 sends brownie points to @ghodmode :sparkles: :thumbsup: :sparkles:
:star: 233 | @ghodmode | http://www.freecodecamp.com/ghodmode
Elifaz Filho
@Elifaz
Jan 25 2016 02:31
wiki spinal
CamperBot
@camperbot
Jan 25 2016 02:31

:point_right: bonfire spinal tap case [wiki]

Problem Explanation:

  • Convert the given string to an all lowercase sentence joined by dashes.
:pencil: read more about bonfire spinal tap case on the FCC Wiki
Mercedes Smith
@mercedessmith
Jan 25 2016 02:37
Hey guys. Stuck on this one. I need to add a number to the end of the array and remove the first element of the array. I thought I needed to use .push .shift but Im lost.
blob
blob
chriscchristensen
@chriscchristensen
Jan 25 2016 02:38
Capture.PNG
Could anyone point out what's wrong with my code?
Keith Janak
@greyhammer
Jan 25 2016 02:38
Hello
Mercedes Smith
@mercedessmith
Jan 25 2016 02:38
Also a link to how to copy code in here would help
GM-Connor
@GM-Connor
Jan 25 2016 02:39
help formatting
CamperBot
@camperbot
Jan 25 2016 02:39

: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

GM-Connor
@GM-Connor
Jan 25 2016 02:39
@chriscchristensen For you, myPlants has two objects in it. You need to choose which one with []
Keith Janak
@greyhammer
Jan 25 2016 02:40
can someone tell me why this function doesn't always return the right values back? Sometimes it returns the same number twice.
function largestOfFour(arr) {
  var newArr = 0;
  var finalArr = [];
  for (var x = 0; x < arr.length; x++){
    for (var i = 0; i < arr[x][i]; i++){
      if (newArr < arr[x][i]){
        newArr = arr[x][i];
      }
    }
    finalArr.push(newArr);
  }
  return finalArr;
}

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
GM-Connor
@GM-Connor
Jan 25 2016 02:40
@mercedessmith array.push(item) puts the item at the end of the array. array.shift() removes the first element from the array and returns it so you can return or store in variable like so removed = array.shift()
Vince Aggrippino
@VAggrippino
Jan 25 2016 02:43
@chriscchristensen myPlants is an array, so you need to access the trees using the index: myPlants[1]. Then you need the list using dot notation myPlants[1].list. list is also an array and you need the second element: myPlants[1].list[1].
Steven Osterwald
@keks411
Jan 25 2016 02:43
@chriscchristensen myplants.type or myplants.list but "trees" is just a string
Too slow ;)
mariocatch
@mariocatch
Jan 25 2016 02:43
@greyhammer nothing in that function will sometimes return something and sometimes not return something. those inputs will always yield the same output.
Vince Aggrippino
@VAggrippino
Jan 25 2016 02:44
@keks411 there's no myplants.type or myplants.list. Those are properties on the unnamed objects inside of myPlants
chriscchristensen
@chriscchristensen
Jan 25 2016 02:45
Thanks! @Ghodmode and @keks411 That solved my issue yet again! You guys are on fire tonight!
CamperBot
@camperbot
Jan 25 2016 02:45
chriscchristensen sends brownie points to @ghodmode and @keks411 :sparkles: :thumbsup: :sparkles:
:warning: chriscchristensen already gave keks411 points
:warning: chriscchristensen already gave ghodmode points
tommy
@tommygebru
Jan 25 2016 02:46
@greyhammer arr.length loops once I believe , the second loop accesses the numbers of the subarrays, and the if statement's condition says that 0 is less than indexed, then executes : o is assigned the indexed number which is later added and returned with the empty array :smile:
Keith Janak
@greyhammer
Jan 25 2016 02:46

what i mean is

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

but

largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]) returns [27, 27, 39, 1001]
estefanygcd
@estefanygcd
Jan 25 2016 02:49
I am stuck in this stage of html.

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

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

Steven Osterwald
@keks411
Jan 25 2016 02:49
@Ghodmode I know...What I wanted to say is that myplants.tree does not work. myPlants[1].list[1] it is
tommy
@tommygebru
Jan 25 2016 02:49
@keks411 reset and try again :+1:
cannelflow
@cannelflow
Jan 25 2016 02:49
@greyhammer means largest in each of individual array
Keith Janak
@greyhammer
Jan 25 2016 02:49
where does the second example get 27 twice? but the first example returns the correct values, are you saying that because im using a variable defined outside of the loop that it is keeping the value stored and then checking agains the next sub array?
cannelflow
@cannelflow
Jan 25 2016 02:50
@greyhammer like 9 in first 35 in second
Keith Janak
@greyhammer
Jan 25 2016 02:50
So i need to define the variable im storing values in for checking inside my loop
cannelflow
@cannelflow
Jan 25 2016 02:50
@estefanygcd i think you need to make style tag for css btw wtw which exercise ?
@greyhammer my suggestion is find largest number in each and push it in new array
Steven Osterwald
@keks411
Jan 25 2016 02:52
@estefanygcd What stage and whats not working?
Keith Janak
@greyhammer
Jan 25 2016 02:52
or at least reset it to 0 in the loop so that it is set to zero when the next sub array stars
tommy
@tommygebru
Jan 25 2016 02:53
@greyhammer it was a fluke my challenge didnt repeat 27
Keith Janak
@greyhammer
Jan 25 2016 02:53
so this worked, but is there a better way?
function largestOfFour(arr) {
  var newArr = 0;
  var finalArr = [];
  for (var x = 0; x < arr.length; x++){
    newArr = 0;
    for (var i = 0; i < arr[x][i]; i++){
      if (newArr < arr[x][i]){
        newArr = arr[x][i];
      }
    }
    finalArr.push(newArr);
  }
  return finalArr;
}
estefanygcd
@estefanygcd
Jan 25 2016 02:53
lol. I got it. I misread the question. Thank you @keks411
CamperBot
@camperbot
Jan 25 2016 02:53
estefanygcd sends brownie points to @keks411 :sparkles: :thumbsup: :sparkles:
:star: 272 | @keks411 | http://www.freecodecamp.com/keks411
Steven Osterwald
@keks411
Jan 25 2016 02:57
@greyhammer newArr is declared 0 at the top and in every time your code iterates trough for
Elifaz Filho
@Elifaz
Jan 25 2016 02:57
This doesn’t make any sense, how come I have 2 day streak if I actually have been submiting challenges for 15 days?
tommy
@tommygebru
Jan 25 2016 02:57
@greyhammer lose the first newArr and declare it in the loop;
i solved mine with one loop and .filter() and created one empty array :smile:
greg
@wearenotgroot
Jan 25 2016 02:57
@greyhammer you can do this with one for loop and sort
tommy
@tommygebru
Jan 25 2016 02:58
@Elifaz submitting or completing challenges?
Elifaz Filho
@Elifaz
Jan 25 2016 02:58
Screen Shot 2016-01-24 at 9.56.59 PM.png
completing.
tommy
@tommygebru
Jan 25 2016 02:59
@Elifaz lol i guess it has do to with github authentication ?
Elifaz Filho
@Elifaz
Jan 25 2016 03:00
@tommygebru I definitely have no idea why this is happenning, I haven’t done anything different. It’s just frustrating when you are trying to keep it up with the streak and suddently you see this.
tommy
@tommygebru
Jan 25 2016 03:00
@Elifaz for instance I never use safari but when i signed in once... it doesnt recognize me as returning ! but a new user.... try to stick with the same browser & computer :smile:
Elifaz Filho
@Elifaz
Jan 25 2016 03:02
@tommygebru It’s the second time that this had happened, the only thing I can think of was logging in through my iPhone yesterday to check the bonfire that I just finished on today, 10 min ago
Blank
@vuhuy1101
Jan 25 2016 03:04
@greyhammer I think it would be better if you use for(var i = 0; i < arr[x].length;i++) so you will go through all elements in the sub-array. Else, you might miss some elements and get the wrong result.
tommy
@tommygebru
Jan 25 2016 03:04

@Elifaz

through my iPhone yesterday to check the bonfire that I just finished on today, 10 min ago

a little confusing?

@vuhuy1101 is this as a first loop or second?
cannelflow
@cannelflow
Jan 25 2016 03:05
@Elifaz some days when im doing projects i didn't submit anything but then also i used to help and get help and it is counting my streak
Blank
@vuhuy1101
Jan 25 2016 03:06
@tommygebru the second loop
Keith Janak
@greyhammer
Jan 25 2016 03:06
This looked better
function largestOfFour(arr) {
  var finalArr = [];
  for (var x = 0; x < arr.length; x++){
    var newArr = arr[x].sort(function(a, b){
      return b - a});
    finalArr.push(newArr.shift());
  }
  return finalArr;
}
E
@1Emre-K
Jan 25 2016 03:08
Anyone willing to help? Stuck on "Record Collection" under JS!
tommy
@tommygebru
Jan 25 2016 03:08
@Elifaz also aside from dropping hints in the help rooms, you can maintain your streak, by submitting a link to FCC's News page once a day !
Elifaz Filho
@Elifaz
Jan 25 2016 03:08
@tommygebru haha why confusing? ah, you mean because it was different from my normal activity…yeah, but I’ve done that before and had never happened with me.
E
@1Emre-K
Jan 25 2016 03:08
Nevermind, got it :smile:
Elifaz Filho
@Elifaz
Jan 25 2016 03:08
@tommygebru yeah, I’m always here working with everyone on solving exercises and stuff.
tommy
@tommygebru
Jan 25 2016 03:09
@1Emre-K the best kind of problem is one that solves itself :+1:
Elifaz Filho
@Elifaz
Jan 25 2016 03:09
@cannelflow Yeah, same here, specially when working with ziplines.
E
@1Emre-K
Jan 25 2016 03:09
@tommygebru indeed :+1:
PooperPig
@PooperPig
Jan 25 2016 03:10
IN "Accessing Objects Properties with the Dot Operator, the instrucions are incorrect: It says "Set the property hat to the variable hatValue and the property shirt to shirtValue." but it means "Set the variable hatValue to the property hat, and the variable hatValue to the property shirt" - or is it just me?
Elifaz Filho
@Elifaz
Jan 25 2016 03:10
@tommygebru which bonfire are you working on currently?
tommy
@tommygebru
Jan 25 2016 03:11
@Elifaz yeah i see helping out .... sorry about the streak .... your next one will be green and longer .... I guarantee it :+1:
@Elifaz Mutations it is giving me the stink eye
PooperPig
@PooperPig
Jan 25 2016 03:12
Oops - I meant
IN "Accessing Objects Properties with the Dot Operator, the instrucions are incorrect: It says "Set the property hat to the variable hatValue and the property shirt to shirtValue." but it means "Set the variable hatValue to the property hat, and the variable shirtValue to the property shirt" - or is it just me?
Elifaz Filho
@Elifaz
Jan 25 2016 03:12
@PooperPig actually, it’s property. The property hat is a key of value ballcap
tommy
@tommygebru
Jan 25 2016 03:13
@greyhammer ohhh dude I meant .sort ! sorry for the confusion :smile_cat:
PooperPig
@PooperPig
Jan 25 2016 03:13
@Elifax - yes - but it is asking you to set the property to the variable value - but it means you to set the variable to the property value.
tommy
@tommygebru
Jan 25 2016 03:14
@PooperPig var myObject={property:value;} :smile:
PooperPig
@PooperPig
Jan 25 2016 03:15
@tommygebru I know how to do it to pass- but the actual description of what it wants you to do is wrong. It describes testObj.hat = hatValue; but what it wants is var hatValue = testObj.hat;
Elifaz Filho
@Elifaz
Jan 25 2016 03:15
@PooperPig in some way I think you can consider a property as a variable, since it can assign a value to itself, more like objects that has it’s property as other objects. Daamn, tesseract 4th dimension
PooperPig
@PooperPig
Jan 25 2016 03:17
@Elifaz - you can cosider a property as a variable, indeed. However, the instruction says "Set the property hat to the variable hatValue "
That instruction is incorrect
tommy
@tommygebru
Jan 25 2016 03:18
@PooperPig yeah i see your point but their are many challenges that "puts us off" in how the concept or exercise is first structured before we tackle it ...... for FCC this is part of the problem not the solution, and therefore we fix it :smile:
Elifaz Filho
@Elifaz
Jan 25 2016 03:19
@PooperPig yeah, your point makes sense, I think the best way to write this would be more like assign the variable hatValue with the hat property..
tommy
@tommygebru
Jan 25 2016 03:20

@PooperPig I did find a typo in the instructions :smiley_cat:
Instructions
Read in the property values of testObj using dot notation. Set the property hat to the variable hatValue and the property shirt to shirtValue.

should be Return the ...... do you guys agree ?
http://www.freecodecamp.com/challenges/accessing-objects-properties-with-the-dot-operator#

PooperPig
@PooperPig
Jan 25 2016 03:21
@Elifaz - well - probably be better if you didn't mix up hat and shirt ;) but yes -
Elifaz Filho
@Elifaz
Jan 25 2016 03:21
@PooperPig haha, yeah I was just point the assign word, let me fix that for future viewers.
PooperPig
@PooperPig
Jan 25 2016 03:21
@tommygebru it should just say "set the variable hatValue to the property hat
tommy
@tommygebru
Jan 25 2016 03:22
@PooperPig excellent :smile:
PooperPig
@PooperPig
Jan 25 2016 03:25
Glad to be of service :)
Elifaz Filho
@Elifaz
Jan 25 2016 03:26
@PooperPig create a pull request, and they will fix this up.
@tommygebru mutations is kind of tricky..where are you at currently?
tommy
@tommygebru
Jan 25 2016 03:28
@Elifaz currently I am pro
crastinating and should probably be writing some pseudocode :smiley_cat:
Joe Narvaez
@wordyallen
Jan 25 2016 03:29
hello @tommygebru and everyone. can someone please help me with closures?
Elifaz Filho
@Elifaz
Jan 25 2016 03:29
@tommygebru hahah, pseudo is everything, I like to build the logic on a physical notepad, then start on cracking
Andrew Bales
@agbales
Jan 25 2016 03:29
@wordyallen What problem are you on? Could you share your code?
Elifaz Filho
@Elifaz
Jan 25 2016 03:29
@wordyallen Closures, oh boy..show us what you’ve got
Joe Narvaez
@wordyallen
Jan 25 2016 03:30

@agbales absolutely!

function makeBarChart(x){
console.log(x+ 'this is outside!');
   return function(){
console.log(x+'this is inside');
  x+2;
};
}

the inside one isn't logging. what am I doing wrong? sorry bout all the editing. thanks

Yoel Trujillo
@y0el22
Jan 25 2016 03:31
hi guys i need help
Andrew Bales
@agbales
Jan 25 2016 03:31
@y0el22 What problem are you working on?
Yoel Trujillo
@y0el22
Jan 25 2016 03:32
sorry i already resolved @agbales thanks!
CamperBot
@camperbot
Jan 25 2016 03:32
y0el22 sends brownie points to @agbales :sparkles: :thumbsup: :sparkles:
:star: 307 | @agbales | http://www.freecodecamp.com/agbales
Andrew Bales
@agbales
Jan 25 2016 03:32
@y0el22 That's never a bad thing :) Give me a shout if you get stuck!
Joe Narvaez
@wordyallen
Jan 25 2016 03:35
I thought closures would grab the the variable...eg makeBarChart(1) would log both of them. instead I get a function
Rae
@cs-knight
Jan 25 2016 03:36
    <div class="row">
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">
    <form-control="btn btn-primary">
        <i class="fa fa-paper-plane"></i>Submit</button>
  </form>
</div>
where do I add form-control with input?
Andrew Bales
@agbales
Jan 25 2016 03:36
@wordyallen Hm. Honestly, I haven't seen this before. Is there a description of the problem I can take a look at?
Elifaz Filho
@Elifaz
Jan 25 2016 03:37
@wordyallen I played with your code a bit and this is what I’ve got, have you assigned a variable to the function afterwards?
function makeBarChart(x){
console.log(x+ 'this is outside!');
   return function(){
     var getter = x+2;
console.log(getter +'this is inside');

   };
}

var holder = makeBarChart(10);
var inside = holder();
console.log(inside);
Ghost
@ghost~564bf69916b6c7089cbb1fef
Jan 25 2016 03:37
@csrae in the form element
Rae
@cs-knight
Jan 25 2016 03:37
@AndrewGHC where is the form element?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Jan 25 2016 03:37
@csrae but I think it's just above from where you've pasted
Rae
@cs-knight
Jan 25 2016 03:38
    <div class="row">
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
        <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">
    <form-control="btn btn-primary">
        <i class="fa fa-paper-plane"></i>Submit</button>
  </form>
</div>
Ghost
@ghost~564bf69916b6c7089cbb1fef
Jan 25 2016 03:38
@csrae as in <form class="form-control"></form>
Rae
@cs-knight
Jan 25 2016 03:38
wait do you mean form action?
Andrew Bales
@agbales
Jan 25 2016 03:38
@csrae Is that a class you're wanting to add? If so, add it with class="form-control"
Just saw @AndrewGHC posted this-- what he's showing is the way to add the class.
Joe Narvaez
@wordyallen
Jan 25 2016 03:39
@Elifaz no. thats where i'm messing up. I think by assigning the variables I can make new instances
@Elifaz and @agbales thanks for your help. This helps alot!
CamperBot
@camperbot
Jan 25 2016 03:40
wordyallen sends brownie points to @elifaz and @agbales :sparkles: :thumbsup: :sparkles:
:star: 348 | @elifaz | http://www.freecodecamp.com/elifaz
:star: 308 | @agbales | http://www.freecodecamp.com/agbales
Elifaz Filho
@Elifaz
Jan 25 2016 03:40
@wordyallen you got this!
Rae
@cs-knight
Jan 25 2016 03:41
<form class="form-control"> 
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">
        <i class="fa fa-paper-plane"></i>Submit</button>
  </form>
here?
Ghost
@ghost~564bf69916b6c7089cbb1fef
Jan 25 2016 03:44
@csrae Apologies that was an error on my part
It's the class form-group that is placed in the form element, form-control is a class for inputs
Got em mixed up
@csrae Have this tab open as I've just made a form myself https://getbootstrap.com/css/#forms
Rae
@cs-knight
Jan 25 2016 03:50
@AndrewGHC thanks I got it
CamperBot
@camperbot
Jan 25 2016 03:50
csrae sends brownie points to @andrewghc :sparkles: :thumbsup: :sparkles:
:star: 311 | @andrewghc | http://www.freecodecamp.com/andrewghc
Joe Narvaez
@wordyallen
Jan 25 2016 03:55
man I really love this place
Rae
@cs-knight
Jan 25 2016 04:03
 <div class="row"
    <div class="col-xs-7"
         <input type="text" class="form-control" placeholder="cat photo URL" required>
    </div>
</div>
   <div class="row"
        <div class="col-xs-5"
    <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button>
</div>
</div>
  </form>
I can't seem to nest my buttons
Matthew Harames
@Harames
Jan 25 2016 04:04
You are missing a >
@csrae Looks like you are missing a few > on your opening div tags
James
@jammatpic
Jan 25 2016 04:08
Hey, I'm currently doing the Quote Generator zipline, and I'm trying to properly implement a tweet button, but I can never get it to display the right text in the tweet. I've already got a tweet button that works, it just doesn't display the right text in the tweet itself
that attribute is used by twitter's own button code to set the text
Eina
@thelittleblacksmith
Jan 25 2016 04:14
@jammatpic this was very helpful when I was trying to figure this out: http://stackoverflow.com/questions/32836456/updating-data-text-dynamically-for-twitter-button-in-javascript
Scott
@Gangezilla
Jan 25 2016 04:15
This will probably sound really dumb, but I'm trying to access elements in an array that has 25 entries, and then two values within each of those entries. If I type console.log(arr) it will show the array, but if I type console.log(arr[0]) it shows undefined? I have NO clue what I'm doing wrong, and no idea of what information to give here to actually get proper help haha. Any pointers would be tops :)
myJavascript
@myJavascript
Jan 25 2016 04:15

Sometimes you want to add a elements to your website before you know where they will link.

This is also handy when you're changing the behavior of a link using jQuery, which we'll learn about later.

Replace the value of your a element's href attribute with a #, also known as a hash symbol, to turn it into a dead link.

What does this mean? Where?
i dont get it. Seems Cryptic.
Eina
@thelittleblacksmith
Jan 25 2016 04:17
@myJavascript <a href="http://google.ca">Link to Google</a>"
@myJavascript in that href, you need to replace the link with # to make it a dead link. So when you click on it, instead of going to Google, it'll go nowhere.
myJavascript
@myJavascript
Jan 25 2016 04:18
SO? <a #href="http://google.ca">Link to Google</a>" ?
Rae
@cs-knight
Jan 25 2016 04:18
@Harames thanks
CamperBot
@camperbot
Jan 25 2016 04:18
csrae sends brownie points to @harames :sparkles: :thumbsup: :sparkles:
:star: 311 | @harames | http://www.freecodecamp.com/harames
Matthew Harames
@Harames
Jan 25 2016 04:19
@csrae You welcome
myJavascript
@myJavascript
Jan 25 2016 04:19
@thelittleblacksmith SO? <a #href= "http://google.ca"> Link to Google</a>" ?
Eina
@thelittleblacksmith
Jan 25 2016 04:20
@myJavascript did you see the message after? I just pressed the enter button too quickly
myJavascript
@myJavascript
Jan 25 2016 04:21
@thelittleblacksmith No?
Eina
@thelittleblacksmith
Jan 25 2016 04:21
@myJavascript in that href, you need to replace the link with # to make it a dead link. So when you click on it, instead of going to Google, it'll go nowhere.
myJavascript
@myJavascript
Jan 25 2016 04:22
@thelittleblacksmith Right. But i'm I placing it in the correct spot? <a #href= "http:..google.ca"> Link to Google </a>" LIKETHAT?
Eina
@thelittleblacksmith
Jan 25 2016 04:22
@myJavascript ah my bad, I didn't notice that. No the URL to google is where it's going to, so you need to remove it and replace it with the hash/pound sign
myJavascript
@myJavascript
Jan 25 2016 04:23
@thelittleblacksmith SO : <a # > LInk to Google </a> ?
Eina
@thelittleblacksmith
Jan 25 2016 04:25
@myJavascript no, keep the href, that's necessary for making links. Put the hash literally inside the quotes after href=
Rae
@cs-knight
Jan 25 2016 04:25
<h3 class="text-primary text-center"jQuery Playground </h3>
myJavascript
@myJavascript
Jan 25 2016 04:26
@thelittleblacksmith <a href ="#"> Link to Google </a>
Eina
@thelittleblacksmith
Jan 25 2016 04:27
@myJavascript yeah so just adapt it to the challenge, take out the URL inside the a href
myJavascript
@myJavascript
Jan 25 2016 04:28
@thelittleblacksmith Thanks Very much. Section could use a little more explanation.
CamperBot
@camperbot
Jan 25 2016 04:28
myjavascript sends brownie points to @thelittleblacksmith :sparkles: :thumbsup: :sparkles:
:star: 318 | @thelittleblacksmith | http://www.freecodecamp.com/thelittleblacksmith
myJavascript
@myJavascript
Jan 25 2016 04:29
@myJavascript Thanks Very Much.
CamperBot
@camperbot
Jan 25 2016 04:29
sorry myjavascript, you can't send brownie points to yourself! :sparkles: :sparkles:
Rae
@cs-knight
Jan 25 2016 04:29
nevermind
myJavascript
@myJavascript
Jan 25 2016 04:29
@myJavascript Thanks Very Much.
CamperBot
@camperbot
Jan 25 2016 04:29
sorry myjavascript, you can't send brownie points to yourself! :sparkles: :sparkles:
myJavascript
@myJavascript
Jan 25 2016 04:29
@thelittleblacksmith Thanks Very Much.
CamperBot
@camperbot
Jan 25 2016 04:29
myjavascript sends brownie points to @thelittleblacksmith :sparkles: :thumbsup: :sparkles:
:warning: myjavascript already gave thelittleblacksmith points
Eina
@thelittleblacksmith
Jan 25 2016 04:29
@myJavascript You can always contact the FCC team (email/GitHub/maybe even reddit?) with your revision suggestion if you'd like.
@Gangezilla did you figure out your array stuff?
Denny0976
@Denny0976
Jan 25 2016 04:35
Howdy, Im completely new to coding and have been working through the course. Im stuck on a Jquery task. How do I add multiple classes to an element? specifically to this line: $("#target1").addClass("animated shake"); I want to add the class "btn-primary" but have got confused with the syntax. Any hints. Cheers
Scott
@Gangezilla
Jan 25 2016 04:35
I'm sitting here baffled still haha. It's something that's SO dumb, like, I can feel it. But I just can't solve it haha.
cannelflow
@cannelflow
Jan 25 2016 04:36
@Denny0976 which exercise ? tried anything
Scott
@Gangezilla
Jan 25 2016 04:37
@Denny0976, animated and shake are both different kinds of classes. Keep that in mind :)
cannelflow
@cannelflow
Jan 25 2016 04:37
@Denny0976 <h2 class=" a b"></h2> h2 has two class a &b
Denny0976
@Denny0976
Jan 25 2016 04:37
Hi, it the JQuery "Target the same element" I tried placing the class in the selector e.g. $("#target1", "btn-primary") and also in the .adclass part
cannelflow
@cannelflow
Jan 25 2016 04:38
@Denny0976 perhaps you can post your code
Denny0976
@Denny0976
Jan 25 2016 04:38
ahh ok, thanks will go away and rethink this!!
Eina
@thelittleblacksmith
Jan 25 2016 04:38
@Gangezilla do you have your code somewhere so we can look into it as well? :D
Denny0976
@Denny0976
Jan 25 2016 04:39
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".btn").addClass("animated shake");
$("#target1").addClass("animated shake");
$("#target1").addClass("btn-primary");


});
</script>
Denny0976
@Denny0976
Jan 25 2016 04:40
@Gangezilla thanks for the tip that fixed one issue
CamperBot
@camperbot
Jan 25 2016 04:40
denny0976 sends brownie points to @gangezilla :sparkles: :thumbsup: :sparkles:
:star: 302 | @gangezilla | http://www.freecodecamp.com/gangezilla
Scott
@Gangezilla
Jan 25 2016 04:40
ignore how gross looking it is right now haha. it all sort of stems from JS line 27, with pushing the information into the array.
cannelflow
@cannelflow
Jan 25 2016 04:40

Add the animated class to all elements with type button.this is how yo do it

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

@Denny0976

Scott
@Gangezilla
Jan 25 2016 04:40
You're welcome, @Denny0976 !
DevPoetsSociety
@DevPoetsSociety
Jan 25 2016 04:40
@Denny0976 Adding anything is the same sort of operation. Just think about how you did that before and it'll be clear.
cannelflow
@cannelflow
Jan 25 2016 04:41
@Denny0976 read instruction carefully its their
Eina
@thelittleblacksmith
Jan 25 2016 04:48
@Gangezilla oh man, unfortunately i haven't gotten that far yet. if you still can't figure it out, I'd try asking in /HelpJavaScript or in the main chat room if no one's at the JS help room.
Scott
@Gangezilla
Jan 25 2016 04:49
Yeah, good suggestion! I'll ask around. Thanks for looking into it anyway, appreciate it :)
Denny0976
@Denny0976
Jan 25 2016 04:59
I should learn to read!! thanks all

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

});
</script>

Dan
@dee-one
Jan 25 2016 05:05
need help
need to make background grey in between <div> </div>
Lizet
@ljaramillom
Jan 25 2016 05:10
@dee-one <style> .gray-background {
background-color: gray;</style>
}
@dee-one <div class="gray-background">
@dee-one I'm sorry! It is <style> .gray-background {
background-color: gray;}</style>
Dan
@dee-one
Jan 25 2016 05:17
thanks
sspringer01
@sspringer01
Jan 25 2016 05:36
<p>Click here for <a #="http://www.freecatphotoapp.com">cat photos</a>.</p>
Help, it keeps saying my a element should be a dead link with a href attribute set to #
CamperBot
@camperbot
Jan 25 2016 05:36
no wiki entry for: it keeps saying my a element should be a dead link with a href attribute set to
sspringer01
@sspringer01
Jan 25 2016 05:36
which I think I jave
have*
Brian
@sludge256
Jan 25 2016 05:40
in order to make it a dead link
You should replace the url with #
notice how it says set the href
not replace href
Lizet
@ljaramillom
Jan 25 2016 05:41
@sspringer01 Try this! <p>Click here for <a href="#">cat photos</a>.</p>
sspringer01
@sspringer01
Jan 25 2016 05:41
Ah, it worked, thanks guys
Sorry, I'm new to this ;p
ignore the emoji lmao
:) *
Lizet
@ljaramillom
Jan 25 2016 05:42
@sspringer01 Ok, nope its free, I like this
thanks @ljaramillom :D
CamperBot
@camperbot
Jan 25 2016 05:42
ljaramillom sends brownie points to @sspringer01 and @ :sparkles: :thumbsup: :sparkles:
:star: 29 | @sspringer01 | http://www.freecodecamp.com/sspringer01
Lizet
@ljaramillom
Jan 25 2016 05:42
ups!! :D
sspringer01
@sspringer01
Jan 25 2016 05:43
Haha thanks, I have a few more questions I'll ask in private chat
I don't even know how to private chat ;/
jpg8127
@jpg8127
Jan 25 2016 05:45
I think you click their icon picture
sspringer01
@sspringer01
Jan 25 2016 05:55
Yes thanks!
myJavascript
@myJavascript
Jan 25 2016 06:14
Nest the existing img element within an a element.
<a href="#"> <img src="https://bit.ly/fcc-relaxing-cat"> </a>
Pete Considine
@pjconsidine
Jan 25 2016 06:15
hello all
and hello world too
;)
jpg8127
@jpg8127
Jan 25 2016 06:17
hi
@myJavascript was that a question?
myJavascript
@myJavascript
Jan 25 2016 06:18
Hi. The exercise asks yo to "Nest the existing img element within an element"
So I did it.
@jpg8127 Exercise requests "Nest the existing img element within an a element."
jpg8127
@jpg8127
Jan 25 2016 06:21
@myJavascript you do not have class on the img
myJavascript
@myJavascript
Jan 25 2016 06:21
@myJavascript @jpg8127 < href = "#"> <img src = "https://bit.ly/fcc-relaxing-cat"> </a>
@jpg8127 Well, a Class was not asked for.
jpg8127
@jpg8127
Jan 25 2016 06:22
@myJavascript a class was in the code at the start though
myJavascript
@myJavascript
Jan 25 2016 06:23

@jpg8127 You can make elements into links by nesting them within an a element.

Nest your image within an a element. Here's an example:

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

@jpg8127 I'm not seeing it.
jpg8127
@jpg8127
Jan 25 2016 06:24
@myJavascript I do not see anything about a class either but I checked and adding class to your code makes it right.
@myJavascript reset the code and do not remove class this time
myJavascript
@myJavascript
Jan 25 2016 06:25
@jpg8127 Adding Class to my Code makes it Right? So there is a Bug on the page?
jpg8127
@jpg8127
Jan 25 2016 06:25
@myJavascript I guess.. I am not sure
@myJavascript <img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"> that is what it looks like originally
@myJavascript you just add the <a stuff in the front and back then it will be right
myJavascript
@myJavascript
Jan 25 2016 06:29
@jpg8127 You know. I hit Reset and entered exactly what I did last time WITHOUT Class and got it right. BUT the page is stuck. wont go forward.
jpg8127
@jpg8127
Jan 25 2016 06:29
@myJavascript try refreshing?
myJavascript
@myJavascript
Jan 25 2016 06:30
@jpg8127 Yes, of course.
jpg8127
@jpg8127
Jan 25 2016 06:30
@myJavascript your profile does not say you got it right yet
myJavascript
@myJavascript
Jan 25 2016 06:31
@jpg8127 Really? On my end it shows double Green.
jpg8127
@jpg8127
Jan 25 2016 06:32
@myJavascript post your code
myJavascript
@myJavascript
Jan 25 2016 06:32
@myJavascript Oh. I see. there is a third below, hidden.
Make sure each of your a elements has a closing tag.
jpg8127
@jpg8127
Jan 25 2016 06:32
@myJavascript yeah was about to say theres 3
myJavascript
@myJavascript
Jan 25 2016 06:34
Y @jpg8127 You know, it is as you say. So the instructions are incorrect. There is a Bug in there.
Thanks very Much
jpg8127
@jpg8127
Jan 25 2016 06:35
np
myJavascript
@myJavascript
Jan 25 2016 06:35
I appreciate it.
Pete Considine
@pjconsidine
Jan 25 2016 06:36
Hi all. Can anyone help me out with one of the challenges?
the Lowest Common Multiple one
myJavascript
@myJavascript
Jan 25 2016 06:52
Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.
ARE SEE
@arethesee
Jan 25 2016 06:52
wsup everybody!
myJavascript
@myJavascript
Jan 25 2016 06:52
<form action ="/submit-cat-photo"> </form>
jpg8127
@jpg8127
Jan 25 2016 06:54
@myJavascript whats the name of the lesson?
myJavascript
@myJavascript
Jan 25 2016 06:55
@jpg8127 Create A Form Element
Raghuram
@Raghuram42
Jan 25 2016 06:57
hello ppl
jpg8127
@jpg8127
Jan 25 2016 06:58
@myJavascript put your text inbetween the form stuff
myJavascript
@myJavascript
Jan 25 2016 06:59
@jpg8127 My Text. What text? Any text?
jpg8127
@jpg8127
Jan 25 2016 07:00
@myJavascript input text field
@jpg8127 the text box that says cat photo url
@myJavascript Nest your text input element <<<text input element within a form element.
myJavascript
@myJavascript
Jan 25 2016 07:02
@jpg8127 Hmmmm. Thanks Very much.
CamperBot
@camperbot
Jan 25 2016 07:02
myjavascript sends brownie points to @jpg8127 :sparkles: :thumbsup: :sparkles:
:star: 274 | @jpg8127 | http://www.freecodecamp.com/jpg8127
myJavascript
@myJavascript
Jan 25 2016 07:02
But following it - th example instructions - its not explicit.
Raghuram
@Raghuram42
Jan 25 2016 07:20
anyone done filter waypoint in js
??
var oldArray = [1,2,3,4,5,6,7,8,9,10];
var newArray = [];

// Only change code below this line.
oldArray = oldArray.filter(function(val){
       return val > 5;                           
});
see this
wts wrng
anuragscsit
@anuragscsit
Jan 25 2016 07:26
anyone know "Word Blanks" solution

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

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("cat", "little", "hit", "slowly");

Raghuram
@Raghuram42
Jan 25 2016 07:34
could u provide the ques askd in that waypoint @anuragscsit
anuragscsit
@anuragscsit
Jan 25 2016 07:39
I get the answer....
Raghuram
@Raghuram42
Jan 25 2016 07:40
k
Xel
@medxel
Jan 25 2016 07:46
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
Lobster link, how should I apply to the whole HTML?

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

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

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


</style>

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

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

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

anuragscsit
@anuragscsit
Jan 25 2016 07:48
use
body{
.red-text {
color: red;
}
Xel
@medxel
Jan 25 2016 07:49
@anuragscsit I need to apply it to <h2>. With the external font (the link)..I'm on exercise 21
anuragscsit
@anuragscsit
Jan 25 2016 07:50
ok
Xel
@medxel
Jan 25 2016 07:51

I just did it. ```html

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

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

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


</style>

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

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

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

anuragscsit
@anuragscsit
Jan 25 2016 07:52
@medxel use inline style
Xel
@medxel
Jan 25 2016 07:53
@anuragscsit Sorry. It's copy paste problem.
Michal
@xMicRoz
Jan 25 2016 07:56
Hey guys, I've got some problems with "Target a Specific Child of an Element using jQuery" exercise. It's exercise no. 125. So far I've got: $(".well:nth-child(2)").addClass("animated bounce"); <- but that doesn't work for me (all the elements bounce instea of just the 2nd ones. Any help? :)
kirbyedy
@kirbyedy
Jan 25 2016 07:58
instead of .well you should put .target
the rest should be ok
Michal
@xMicRoz
Jan 25 2016 07:59
yeah, it works, thanks @kirbyedy . Would you mind telling me why it works, when there is no "target" element, but there are buttons "target1", "target2", "target3", etc.?
CamperBot
@camperbot
Jan 25 2016 07:59
xmicroz sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 330 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
Michal
@xMicRoz
Jan 25 2016 07:59
oh, got it - the buttons have a class of "target"
thanks man, I'd looke for that for hours ;)
kirbyedy
@kirbyedy
Jan 25 2016 08:01
yes, you are targeting the class
Richard Okari
@riqcee
Jan 25 2016 08:08
Im stuck on style text inputs as form controls can anyone assist?
cannelflow
@cannelflow
Jan 25 2016 08:37
@riqcee ?
Ademola Adegbuyi
@ooade
Jan 25 2016 08:39
@riqcee give your text input a class of form-control
Kris Chery
@krischery2150
Jan 25 2016 08:42
Hi everyone, I dont quite understand how .text function works with Jquery. Can anyone help.
Ayorinde
@Ayorinde
Jan 25 2016 08:48
@krischery2150 it gets the content of a tag or sets the content of a tag
@krischery2150
$("#myP").text(); //get the content of the element with Id myP
Kris Chery
@krischery2150
Jan 25 2016 08:50
@Ayorinde I get that part but i don't understand what they are asking me to do here
Ayorinde
@Ayorinde
Jan 25 2016 08:50
@krischery2150 what is the challenge name
Kris Chery
@krischery2150
Jan 25 2016 08:51
@Ayorinde Change Text Inside an Element Using jQuery
Ayorinde
@Ayorinde
Jan 25 2016 08:53
@krischery2150 as it is in the example given, just target the button with the said id and wrap it's content in a <i>original content here</i>
@krischery2150 you don't use .text() here but .html() because you are including markup in the content
@krischery2150 try it and let me see what you've written
Kris Chery
@krischery2150
Jan 25 2016 08:57
thats the code i tried
$("#target4").text("#target4");
Ayorinde
@Ayorinde
Jan 25 2016 08:57
@krischery2150 use .html instead of .text
@krischery2150 and wrap in an "<i> #target4</i>"
sanwalatta
@sanwalatta
Jan 25 2016 08:58
how can we write h1 element which have class pink-text
Kris Chery
@krischery2150
Jan 25 2016 08:59
it worked but why did they mention the text
Ayorinde
@Ayorinde
Jan 25 2016 09:00
@sanwalatta add pink-text class to the h1 and in your css/ style give pink-text selector a pink color
@krischery2150 u use .text() when you are not including markup like <i>..</i> in your content
Kris Chery
@krischery2150
Jan 25 2016 09:01
Ahhh you are awesome! thank you.
faraz
@silentarrowz
Jan 25 2016 09:01
when I use this code without the function part it works and yet, when I put the same code i.e. the loop part inside the function, then it doesnt pass the tests. could anyone tell me what I am doing wrong here??
function pair(str) {
  splitStr=str.split("");
  console.log("splitStr is:",splitStr);
  basePair={"A":"T","T":"A","G":"C","C":"G"};
  var resultArray=[];

  getPair(splitStr);


  return resultArray;
}
function getPair(splitStr){
    for(i=0;i<splitStr.length;i++){
    var smallArray=[];
    smallArray.push(splitStr[i]);
    var value=basePair[splitStr[i]];
    console.log("value is:",value);
    smallArray.push(value);
console.log("smallArray is:",smallArray);
    resultArray.push(smallArray);
      console.log("resultArray is:",resultArray);
           }
  }
pair("GCG");
Kris Chery
@krischery2150
Jan 25 2016 09:02
@Ayorinde THANK You so much
CamperBot
@camperbot
Jan 25 2016 09:02
krischery2150 sends brownie points to @ayorinde :sparkles: :thumbsup: :sparkles:
:star: 300 | @ayorinde | http://www.freecodecamp.com/ayorinde
Ayorinde
@Ayorinde
Jan 25 2016 09:02
@krischery2150 you are welcome
Kris Chery
@krischery2150
Jan 25 2016 09:03
I am not familiar with here but how does one give another brownie points? @Ayorinde
faraz
@silentarrowz
Jan 25 2016 09:03
by saying thanks to them @krischery2150
CamperBot
@camperbot
Jan 25 2016 09:03
silentarrowz sends brownie points to @krischery2150 :sparkles: :thumbsup: :sparkles:
:star: 90 | @krischery2150 | http://www.freecodecamp.com/krischery2150
faraz
@silentarrowz
Jan 25 2016 09:04
see??
Ayorinde
@Ayorinde
Jan 25 2016 09:04
@krischery2150 you mention the person with the text thanks or thank you
CamperBot
@camperbot
Jan 25 2016 09:04
ayorinde sends brownie points to @krischery2150 :sparkles: :thumbsup: :sparkles:
:star: 91 | @krischery2150 | http://www.freecodecamp.com/krischery2150
Kris Chery
@krischery2150
Jan 25 2016 09:04
brilliant I ove this
Emmanuel Evbuomwan
@iamnosa
Jan 25 2016 09:05
@krischery2150 lol it's funny yeah? Coding is fun
Kris Chery
@krischery2150
Jan 25 2016 09:05
Man i need to get this good when i can start implementing things like that on my site
sanwalatta
@sanwalatta
Jan 25 2016 09:06
how can we create CSS class
Emmanuel Evbuomwan
@iamnosa
Jan 25 2016 09:06
@krischery2150 with time you will, be patient and always learn.
Kris Chery
@krischery2150
Jan 25 2016 09:07
I hope my curiosity is persistent enough to reach that stage. Thanks @iamnosa
CamperBot
@camperbot
Jan 25 2016 09:07
krischery2150 sends brownie points to @iamnosa :sparkles: :thumbsup: :sparkles:
:star: 7 | @iamnosa | http://www.freecodecamp.com/iamnosa
Raghuram
@Raghuram42
Jan 25 2016 09:07
anyone know about replace in js
Emmanuel Evbuomwan
@iamnosa
Jan 25 2016 09:07
@sanwalatta use the "." before the element
sanwalatta
@sanwalatta
Jan 25 2016 09:08
thanks
Ayorinde
@Ayorinde
Jan 25 2016 09:08
@Raghuram42 yeah. what are you trying to do?
Emmanuel Evbuomwan
@iamnosa
Jan 25 2016 09:09
@sanwalatta for Example, you can say .p{ ---- } and that applies to all paragraphs. you should mention me when you say thanks. :*
CamperBot
@camperbot
Jan 25 2016 09:09
iamnosa sends brownie points to @sanwalatta :sparkles: :thumbsup: :sparkles:
:star: 55 | @sanwalatta | http://www.freecodecamp.com/sanwalatta
Raghuram
@Raghuram42
Jan 25 2016 09:10
@Ayorinde function capitalizeEachWord(str) {
return str.replace(/\w\S*/g, function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}
could u explain these?
@Ayorinde r u there
Emmanuel Evbuomwan
@iamnosa
Jan 25 2016 09:13
@Raghuram42 that is a function that Capitalizes each word. It takes in a string variable, that's the word to be capitalized and then returns the capitalized string. The code in the str.replace() function is a regular expression that does the replacement of the inputted string to a capitalized string. You could check out regular expressions later. So it then returns the First character as a capital letter and then the subsequent letters will be small letter.
Ayorinde
@Ayorinde
Jan 25 2016 09:14
This message was deleted
Jordi Vilagut Treserra
@jordivilagut
Jan 25 2016 09:16
Hi all!
I am trying to solve "Get JSON with the jQuery getJSON Method"
Ayorinde
@Ayorinde
Jan 25 2016 09:17
@Raghuram42 wait. what you are doing will also work. let me look into it
Jordi Vilagut Treserra
@jordivilagut
Jan 25 2016 09:17
I read it back and forth but I have no clue what they are teaching or asking me to do...
I would really appreciate it if someone can explain it in plain words... thank you
Naveen
@naveenkumarkg
Jan 25 2016 09:20
Add Font Awesome Icons to all of our Buttons
this is the error You should add a <i class="fa fa-trash"></i> within your delete button element.
''
You should add a <i class="fa fa-trash"></i> within your delete button element.
You should add a <i class="fa fa-trash"></i> within your delete button element.
Ayorinde
@Ayorinde
Jan 25 2016 09:21
@Raghuram42 your code is okay and correct. Do you still need explanation on it?
cannelflow
@cannelflow
Jan 25 2016 09:25
@navinkumarkg which exercise ?
Jocelyn
@jocelyn-ong
Jan 25 2016 09:29
@bcnjordi9 what are the instructions?
Nikolajs Korolkovs
@NickEU
Jan 25 2016 09:31
@Ayorinde it's not his code, that's why he wants an explanation ;)
Ayorinde
@Ayorinde
Jan 25 2016 09:32
@NickEU I see.
Darla Sudheer
@sudheerdarla
Jan 25 2016 09:39
Hello..my question is...Why FreeCodeCamp community removed the 'The Data Visualization Certificate', 'The Back End Development Certificate' and ' The Coding Interview Preparation' from theire curriculum? And i want to earn those too..So how can I achiev them. Any one please help me.
Raghuram
@Raghuram42
Jan 25 2016 09:39
@Ayorinde yes
Alexander Køpke
@alexanderkopke
Jan 25 2016 09:42
@sudheerdarla those things are still there. I just looked.
Darla Sudheer
@sudheerdarla
Jan 25 2016 09:43
@alexanderkopke where are they ?
Alexander Køpke
@alexanderkopke
Jan 25 2016 09:43
@sudheerdarla click map and scroll down.
Darla Sudheer
@sudheerdarla
Jan 25 2016 09:45
Well..I got it now...Thanks anyway.. @alexanderkopke
CamperBot
@camperbot
Jan 25 2016 09:45
sudheerdarla sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star: 450 | @alexanderkopke | http://www.freecodecamp.com/alexanderkopke
Darla Sudheer
@sudheerdarla
Jan 25 2016 09:45
And How much time it ll take to complete the freecodecamp for intermediate progammers?
Ayorinde
@Ayorinde
Jan 25 2016 09:46
@Raghuram42 are you there
Enrique Cahua
@enriquecahua
Jan 25 2016 09:54

// Only change code below this line
function lookUp(firstName, prop){

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

    if (firstName == contacts.firstName){

      if(contacts.hasOwn('prop')){
       return contacts[i][prop];
      }
    }
    if (firstName != contacts.firstName){
      return "No such contact";
    }
    if (prop != contacts[i]['prop']){
      return "No such property";
    }
  }
}
Can someone tell me why my code is not working? I am working on Profile Lookup in Javascript
Mohit Nehru
@MohitNehru
Jan 25 2016 09:58
Nesting For Loops
Modify function multiplyAll so that it multiplies the product variable by each number in the sub-arrays of arr
i am not able to follow this example, Can anyone give me some insight how does it work
Ayorinde
@Ayorinde
Jan 25 2016 09:59
@Raghuram42 you are selecting a word xter with \w along with everything that's not a space \S*. So, you will havd a word. And you are taking the first xter of the selected word with charAt(0), uppercasing it and then concatenating it with the rest of the word. That is why you are using substr(1) rather than substr(0)
Andu033
@Andu033
Jan 25 2016 10:00
Need some help
Ayorinde
@Ayorinde
Jan 25 2016 10:00
@Raghuram42 let me know if you understand that
Enrique Cahua
@enriquecahua
Jan 25 2016 10:00

@MohitNehru ```js
function multiplyAll(arr) {
var product = 1;
// Only change code below this line
for (var i =0; i< arr.length; i++){
for (var j =0; j< arr[i].length; j++) {
product *= arr[i][j];
}
}
// Only change code above this line
return product;
}

```

Ayorinde
@Ayorinde
Jan 25 2016 10:00
@Andu033 help with what exactly
Andu033
@Andu033
Jan 25 2016 10:01
Your p element should contain the first few words of the provided additional kitty ipsum text.
Give elements with the p tag a font-size of 16px. Browser and Text zoom should be at 100%.
i dont know what it means
Enrique Cahua
@enriquecahua
Jan 25 2016 10:01
function multiplyAll(arr) {
  var product = 1;
  // Only change code below this line
  for (var i =0; i< arr.length; i++){
    for (var j =0; j< arr[i].length; j++) {
      product *=  arr[i][j];
    }
  }
  // Only change code above this line
  return product;
}

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Ayorinde
@Ayorinde
Jan 25 2016 10:01
@Andu033 what is the challenge name?
Enrique Cahua
@enriquecahua
Jan 25 2016 10:01
@MohitNehru this is my solution
Andu033
@Andu033
Jan 25 2016 10:01
Change the Font Size of an Element
Enrique Cahua
@enriquecahua
Jan 25 2016 10:02
the first index refers to the first array, the second index refers to the second array from the first array's index @MohitNehru
Mohit Nehru
@MohitNehru
Jan 25 2016 10:04
@enriquecahua how does this arr[i].length
sudheerdarla @sudheerdarla
Enrique Cahua
@enriquecahua
Jan 25 2016 10:06
the first arr.length refers to the array that holds the rest of the arrays. in the second for-loop, the arr[i] refers to the index of the first array.
arr[0] means iterate through the entire array within the first index of initial array which holds all the arrays
Ayorinde
@Ayorinde
Jan 25 2016 10:07
@Andu033 create another <p> just like the one created for you and put into it the said text. and make a p selector in your style and give it font-size: 16px;
Mohit Nehru
@MohitNehru
Jan 25 2016 10:08
@enriquecahua thanks
CamperBot
@camperbot
Jan 25 2016 10:08
mohitnehru sends brownie points to @enriquecahua :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for enriquecahua
Kris Chery
@krischery2150
Jan 25 2016 10:18
anyone has a solution for this i dont quite understand how to do this.
Target a Specific Child of an Element Using jQuery
Jocelyn
@jocelyn-ong
Jan 25 2016 10:18
@krischery2150 what do you need help with?
Kris Chery
@krischery2150
Jan 25 2016 10:19
Should i be using Jquery functions to find the child element and then use the Targetting child function
Ayorinde
@Ayorinde
Jan 25 2016 10:22
@krischery2150 with jquery selector, select the second of the element with class target:
@krischery2150 something like $(".target:nth-...
Kris Chery
@krischery2150
Jan 25 2016 10:25
anyone has a solution for this i dont quite understand how to do this. @jocelyn-ong
Jocelyn
@jocelyn-ong
Jan 25 2016 10:25
@krischery2150 maybe you can post the instructions and your own code then we can take a look at it?
Kris Chery
@krischery2150
Jan 25 2016 10:25
how do i select the div that they are contained in ? @Ayorinde
@jocelyn-ong how do i do that?
Jocelyn
@jocelyn-ong
Jan 25 2016 10:26
@krischery2150 which lesson are you on?
Ayorinde
@Ayorinde
Jan 25 2016 10:27
@krischery2150 each of the buttons has the target class. so you are selecting the second button with the target class
Kris Chery
@krischery2150
Jan 25 2016 10:28
@jocelyn-ong "Target a Specific Child of an Element Using jQuery” in the Jquery course
Ayorinde
@Ayorinde
Jan 25 2016 10:29
@krischery2150 :nth-child means among some particular elements(i.e element with the .target class) select the one (i.e .target:nth-child(2)) that is the second of their parent.
@krischery2150 you are not to select the div that they are contained in. You are to select the one that is the second child of the div that they are contained in. You don't need to target the div they are contained in.
Kris Chery
@krischery2150
Jan 25 2016 10:31
Wouldnt that change every element that has 2nd child as parent
Jocelyn
@jocelyn-ong
Jan 25 2016 10:32

@krischery2150

Here's how you would give the third element in each well the bounce class:

$(".target:nth-child(3)").addClass("animated bounce");

Make the second child in each of your well elements bounce. You must target the children of element with the target class.

@krischery2150 this is on the left hand panel in the lesson, using the same syntax, you should be able to target the 2nd child instead of the 3rd?
Kris Chery
@krischery2150
Jan 25 2016 10:33
"$(".target:nth-child(3)”)” this part of the script is what i am not
Jose Dzireh Chong
@CodingDucky
Jan 25 2016 10:34
Is there any way to implement padding relative to another element?
let's say I want an element 100px below the other, is that possible?
Ayorinde
@Ayorinde
Jan 25 2016 10:34
@krischery2150 no. that is the 2nd child of a parent. but that has the particular class or that are of a particular type
Kris Chery
@krischery2150
Jan 25 2016 10:35
so what would the whole code look lik
Ayorinde
@Ayorinde
Jan 25 2016 10:35
@krischery2150 $(".target:nth-child(2)").addClass("animated bounce"); // I shouldn't give it away like that. but there you have it
@krischery2150 if you go through our conversation so far, you should understand
Kris Chery
@krischery2150
Jan 25 2016 10:38
yeah i get that code i can read and follow what it does. What i am having trouble with understanding is the second button is nested within the left-well and then reach to the buttons @Ayorinde
@Ayorinde in css to reach it. It would be #left-well > button {} and so on thats what i dont get it
Ayorinde
@Ayorinde
Jan 25 2016 10:41
@krischery2150 yeah. here you are saying, you don't care what the parent is, I just want the element with class target that is a 2nd child of a parent. But I don't care what parent
@krischery2150 the parent could be #left-well, but i don't care
@krischery2150 if you care, it would be $("#left-well .target:nth-child(2)")
@krischery2150
$("#left-well  .target:nth-child(2)")
@krischery2150 note that css selectors will also work in $(...)
Kris Chery
@krischery2150
Jan 25 2016 10:49
ahhh i see. the “.target” refers to the target class instilled in the div @Ayorinde
Raghuram
@Raghuram42
Jan 25 2016 10:51
@Ayorinde tnx
CamperBot
@camperbot
Jan 25 2016 10:51
raghuram42 sends brownie points to @ayorinde :sparkles: :thumbsup: :sparkles:
:star: 301 | @ayorinde | http://www.freecodecamp.com/ayorinde
Kris Chery
@krischery2150
Jan 25 2016 10:54
thank you @Ayorinde
CamperBot
@camperbot
Jan 25 2016 10:54
krischery2150 sends brownie points to @ayorinde :sparkles: :thumbsup: :sparkles:
:star: 302 | @ayorinde | http://www.freecodecamp.com/ayorinde
Mohit Nehru
@MohitNehru
Jan 25 2016 10:54
Selection_001.jpg
where m i going wrong?
Raghuram
@Raghuram42
Jan 25 2016 11:00
@MohitNehru wt de output were u gettng
Ayorinde
@Ayorinde
Jan 25 2016 11:00
@MohitNehru you are doing no such contact outsid of the for loop
Raghuram
@Raghuram42
Jan 25 2016 11:00
post the whole code
@MohitNehru yes after else scope write de return "no Such contacts found";
Ayorinde
@Ayorinde
Jan 25 2016 11:03
@MohitNehru you could assign "no such contacts" to a variable inside the loop after if(firstname===... and return it outside the loop
Mohit Nehru
@MohitNehru
Jan 25 2016 11:05

function lookUp(firstName, prop){
// Only change code below this line
for (var x = 0;x<contacts.length;x++)
{
  if(contacts[x].firstName === firstName)
  {
    if(contacts[x][prop]){
      return contacts[x][prop];
    }
    else
      {
       return "No such Property";
      }
  }
}
  return "No Such Contacts";
}
Ayorinde
@Ayorinde
Jan 25 2016 11:07
@MohitNehru this should run fine. am i missing sth?
Mohit Nehru
@MohitNehru
Jan 25 2016 11:07
@Ayorinde Well it give me error
Abas123
@Abas123
Jan 25 2016 11:07
hi plz help me)
Your a element should be nested within your new p element.
Your p element should have the text "View more " (with a space after it).
Your a element should not have the text "View more".
Mohit Nehru
@MohitNehru
Jan 25 2016 11:08
trying to look for Bob & Akira
Ayorinde
@Ayorinde
Jan 25 2016 11:08
@MohitNehru could it be the capital S in Such Contacts?
alex argunov
@troglotit
Jan 25 2016 11:09
@MohitNehru should be " No such contact" & "No such property"
Ayorinde
@Ayorinde
Jan 25 2016 11:09
@MohitNehru and the capital P in Property
Mohit Nehru
@MohitNehru
Jan 25 2016 11:11
let me give a shot
@Ayorinde @troglotit got it, typo
thanks @Ayorinde @troglotit
CamperBot
@camperbot
Jan 25 2016 11:13
mohitnehru sends brownie points to @ayorinde and @troglotit :sparkles: :thumbsup: :sparkles:
:star: 303 | @ayorinde | http://www.freecodecamp.com/ayorinde
:star: 249 | @troglotit | http://www.freecodecamp.com/troglotit
RjBertille
@rjbertille
Jan 25 2016 11:16
hi, i have a issue with exercise Local Scope and Function, But it has nothing to do with exercise. I have a bug. i clear my code but nothing and also i refresh my browser cache Cmd + Opt + J but still nothing. Please someone can help me thank you
Sahil Joseph
@Warlord77
Jan 25 2016 11:24
hey i mstuck
heres the link http://www.freecodecamp.com/challenges/add-placeholder-text-to-a-text-field#?solution=%3Clink%20href%3D%22http%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3Ecat%20photos%3C%2Fa%3E.%3C%2Fp%3E%0A%0A%3Ca%20href%3D%22%23%22%3E%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20alt%3D%22A%20cute%20orange%20cat%20lying%20on%20its%20back%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%3C%2Fa%3E%0A%0A%3Cp%3EThings%20cats%20love%3A%3C%2Fp%3E%0A%3Cul%3E%0A%20%20%3Cli%3Ecat%20nip%3C%2Fli%3E%0A%20%20%3Cli%3Elaser%20pointers%3C%2Fli%3E%0A%20%20%3Cli%3Elasagna%3C%2Fli%3E%0A%3C%2Ful%3E%0A%3Cp%3ETop%203%20things%20cats%20hate%3A%3C%2Fp%3E%0A%3Col%3E%0A%20%20%3Cli%3Eflea%20treatment%3C%2Fli%3E%0A%20%20%3Cli%3Ethunder%3C%2Fli%3E%0A%20%20%3Cli%3Eother%20cats%3C%2Fli%3E%0A%3C%2Fol%3E%0A%3Cinput%20type%3D%22text%22%20placeholder%3D%22%20https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%0A
Eran Finkle
@finklez
Jan 25 2016 11:31
@SahilJoseph you created the placeholder attrib but did not added the text between quotes
Sahil Joseph
@Warlord77
Jan 25 2016 11:34
i added the url .. but aftr adding the text also ther is no difference
sanwalatta
@sanwalatta
Jan 25 2016 11:49
i am confuse plz guide me how can we skip current code assigment number to next number
cannelflow
@cannelflow
Jan 25 2016 12:00
@sanwalatta just go to next exercise from map
Andu033
@Andu033
Jan 25 2016 12:03
import a google font challenge help pls
cannelflow
@cannelflow
Jan 25 2016 12:03
@Andu033 tried anything ?
Andu033
@Andu033
Jan 25 2016 12:03
yes
i think its bug
because the font is corect an they say that i changed the font of p
cannelflow
@cannelflow
Jan 25 2016 12:04
can you show
Chris Zumbika
@cotzanium
Jan 25 2016 12:04
@Andu033 whats the eror you are getting?
Andu033
@Andu033
Jan 25 2016 12:04
Your p element should still use the font Monospace.
<style>
  .red-text {
    color: red;
  }
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
   h2{font-family: Lobster;}
  p {
    font-size: 16px;
    font-family: Monospace;
  }

</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
Jan 25 2016 12:06
@Andu033 put <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> outside style tag
ten it will pass
Andu033
@Andu033
Jan 25 2016 12:09
Thanks @cannelflow
CamperBot
@camperbot
Jan 25 2016 12:09
andu033 sends brownie points to @cannelflow :sparkles: :thumbsup: :sparkles:
:star: 534 | @cannelflow | http://www.freecodecamp.com/cannelflow
Chris Zumbika
@cotzanium
Jan 25 2016 12:09
@Andu033 do what @cannelflow suggested also add Lobster to your font family you want to use it
cannelflow
@cannelflow
Jan 25 2016 12:10
@cotzanium17 @Andu033 :+1:
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:33
hi can someone help me with the exercise Using Objects for Lookups?
im lost and dont even know how to start
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:35

Hi can any one give me hints I am getting Range Error ```// Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d) {
console.log(c + d);
}

myFunction(1, 2);

Jia Shern Tan
@saffront
Jan 25 2016 12:36
hey guys, having issues with displaying my background image section as a cover on larger resolution computers, any suggestions? http://codepen.io/jiashern/full/rxJPZV/
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:36
Hi can any one give me hints I am getting Range Error
// Example function ourFunction(a, b) { console.log(a - b); } ourFunction(10, 5); // Outputs 5 // Only change code below this line. function myFunction(c, d) { console.log(c + d); } myFunction(1, 2);
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:37
@debojitkakoti i think its like this function myFunction(c, d) {
console.log(c + d);
};
myFunction(1, 2);
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:40
@fahadh14 ; after function ?
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:42
@debojitkakoti my bad , saw wrong. Anyways your code should be fine..
Hassan Shabbir
@iHassan
Jan 25 2016 12:42
a little help here?
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:42
@debojitkakoti what exercise is it i'll check it for you
Hassan Shabbir
@iHassan
Jan 25 2016 12:42

`function queue(arr, item) {
// Your code here
testArr.push(6);
testArr.shift(1);
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([], 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

`

Mohamed Fahadh
@fahadh14
Jan 25 2016 12:43
@iHassan change the return to : return testArr.shift();
@iHassan and for shift(); you dont need to put in the value, it automatically removes the first value of an array
Hassan Shabbir
@iHassan
Jan 25 2016 12:45
@fahadh14 okay i've done it? next step? thanks btw
CamperBot
@camperbot
Jan 25 2016 12:45
ihassan sends brownie points to @fahadh14 :sparkles: :thumbsup: :sparkles:
:star: 231 | @fahadh14 | http://www.freecodecamp.com/fahadh14
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:46
@iHassan no problem :)
Hassan Shabbir
@iHassan
Jan 25 2016 12:46
how do i test it? im like stuck at this point @fahadh14
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:47
@fahadh14 exercise Passing Values to Functions with Arguments
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:49

@debojitkakoti my answer was this ```js
function myFunction (c, d){
console.log (c + d);
}

myFunction(5,6);
```

@iHassan tell me the exercise name , i'll read the instructions
Nick
@skyllo
Jan 25 2016 12:50
you can also do console.log(c, d)
Hassan Shabbir
@iHassan
Jan 25 2016 12:50
@fahadh14 Stand in Line
Andu033
@Andu033
Jan 25 2016 12:52
need help
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:52
@iHassan ok your mistake is , they dont want you push number 6 into the array but rather they want you to put the item into the array
Andu033
@Andu033
Jan 25 2016 12:52
Your p element should have the text "View more " (with a space after it).
<p>View more <a href="http://www.freecatphotoapp.com">
what is wrong
?
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:53
@iHassan so its goes like that , arr.push(item); var test = arr.shift(); return test;
there
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:53

@skyllo // Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d) {
console.log(c+d);
}
myfunction(7,9);

Hassan Shabbir
@iHassan
Jan 25 2016 12:53
okay i was returning arr.shift(); but didn't work. then i took it in a variable(var) and returned it. that did the trick
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:54
@iHassan yep,
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:54
var x= 'hello';
Hassan Shabbir
@iHassan
Jan 25 2016 12:54
@fahadh14 thanks again!
CamperBot
@camperbot
Jan 25 2016 12:54
ihassan sends brownie points to @fahadh14 :sparkles: :thumbsup: :sparkles:
:warning: ihassan already gave fahadh14 points
Andu033
@Andu033
Jan 25 2016 12:55
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a> </p>
Your a element should not have the text "View more"
is not same??
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:56
@Andu033 what exercise is it again?
Andu033
@Andu033
Jan 25 2016 12:56
Nest an Anchor Element within a Paragraph
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:56
Can any one help
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d) {
  console.log(c+d);
}
myfunction(7,9);
it is giving Range Error
Andu033
@Andu033
Jan 25 2016 12:58
function myFunction(c, d) {
console.log(c + d );
Hassan Shabbir
@iHassan
Jan 25 2016 12:58
@debojitkakoti exercise name?
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 12:58
@iHassan excercise name is Passing Values to Functions with Arguments
@iHassan it is in javascript excercise
Mohamed Fahadh
@fahadh14
Jan 25 2016 12:59
@Andu033 ok read it so what do you need again
Hassan Shabbir
@iHassan
Jan 25 2016 12:59
@debojitkakoti you have not written function's name propoerly
'F' in myFunction should be capital
myFunction
Andu033
@Andu033
Jan 25 2016 13:01
@fahadh14 site says that i didnt have view more in p
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:02
@iHassan
Now corrected but still getting error
// Example
function ourFunction(a, b) {
  console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d) {
  console.log(c+d);
}
myFunction(1,2);
Hassan Shabbir
@iHassan
Jan 25 2016 13:02
@debojitkakoti sane error?
@debojitkakoti same*
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:02
@iHassan Yes
cannelflow
@cannelflow
Jan 25 2016 13:03
@debojitkakoti which exercise ?
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:03
@iHassan I am getting Range Error: Maximum call stack size exceed in test and in chrome console
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:03
@Andu033 paste your code
Hassan Shabbir
@iHassan
Jan 25 2016 13:04
@debojitkakoti okay, so i copy/pasted your code in the same exercise and it's working fine. Maybe refresh your browser and try again
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:04
@cannelflow It is in basic javascript new
Andu033
@Andu033
Jan 25 2016 13:04
@fahadh14 <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
Mubashir Hussain
@ThisIsMubashir
Jan 25 2016 13:04
@debojitkakoti Try to restart the browser. I hope it may help
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:05
@iHassan Thanks !! Aftre refreshing it is working
CamperBot
@camperbot
Jan 25 2016 13:05
debojitkakoti sends brownie points to @ihassan :sparkles: :thumbsup: :sparkles:
:star: 185 | @ihassan | http://www.freecodecamp.com/ihassan
Hassan Shabbir
@iHassan
Jan 25 2016 13:05
@debojitkakoti anytime :)
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:05
@Andu033 they want you to remove the view more
DEBOJIT KAKOTI
@debojitkakoti
Jan 25 2016 13:05
Ha ha thank you guys. I thought the problem is in my coding
Andu033
@Andu033
Jan 25 2016 13:06
@fahadh14 dont work
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:07
@Andu033 <p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
@Andu033 this line is correct , maybe you went wrong somewhere else
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:22
anyone here can with Using Objects for Lookups exercise ~
helpp
Steven Osterwald
@keks411
Jan 25 2016 13:25
Anybody here who finished the Zipline:Random Quote Generator already? I finished it already but I am not happy with my solution. I stored 30 quotes and just choose randomly from those. What I want is to quote from other websites. Somebody a hint on how to do that?
Aleksander Gębicki
@Takumar
Jan 25 2016 13:29
@fahadh14 what is your problem?
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:29
lookup.val = result;
Chris Zumbika
@cotzanium
Jan 25 2016 13:29
@keks411 i havent completed the challenge yet so i might be wrong but try searching for some free json apis available to get randoms quotes
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:30
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line

  var lookup = {

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

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

// Change this value to test
phoneticLookup("alpha");
@Takumar
Aleksander Gębicki
@Takumar
Jan 25 2016 13:30
@fahadh14 it work the other side, you should assign value from lookup to result variable.
In your case, for argument "alpha" your result variable should contain value of "alpha" property, so it should be equal to "Adams".
Chris Zumbika
@cotzanium
Jan 25 2016 13:31
@keks411 one that i found now is http://quotesondesign.com/api/3.0/api-3.0.json
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:31
@Takumar it still doesnt work for the top part
Eran Finkle
@finklez
Jan 25 2016 13:31
@fahadh14 as said, what you did is to add the result string into the property named 'val' inside lookup
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:32
phoneticLookup("alpha") should equal "Adams"
Aleksander Gębicki
@Takumar
Jan 25 2016 13:32
@fahadh14 also , you cannot use val as property after dot, because it is not name of property, but variable containing name of property - use bracket notation.
Natalia
@NIcie
Jan 25 2016 13:32

please, help me somebody, it's a very simple excercise. what's wrong, I don't know :( again about the cats :) Here is my code:

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

BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:32
Good day everybody! :)
Steven Osterwald
@keks411
Jan 25 2016 13:32
@cotzanium17 Thanks, will search a bit more ;)
CamperBot
@camperbot
Jan 25 2016 13:32
keks411 sends brownie points to @cotzanium17 :sparkles: :thumbsup: :sparkles:
:star: 217 | @cotzanium17 | http://www.freecodecamp.com/cotzanium17
Natalia
@NIcie
Jan 25 2016 13:32
and I have an error "Your p element should have the text "View more " (with a space after it)."
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:33
Can someone help on counting cards? I'm kinda stuck.
Haroon Ghawsi
@HaroonGhawsi
Jan 25 2016 13:33
Hi, What is the best place to upload my images and then get a link to mention it in my projects in Free Code Camp?
Aleksander Gębicki
@Takumar
Jan 25 2016 13:33
@NIcie this line looks good, but maybe you have added such line at the end of your code, not modified existing link?
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:33
@Takumar did i do the table wrong tho? They still say , when the function is used, still cant figure out the answer
Aleksander Gębicki
@Takumar
Jan 25 2016 13:34
@fahadh14 I cannot give you more hints, because solution is: result = lookup[val];
I have told you to use bracket notation.
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:34
blob
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:35
@Takumar why doesnt dot notation work?
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:35
blob
I'm not too sure what's wrong. It wouldn't print the count
Natalia
@NIcie
Jan 25 2016 13:36
oh, thanks @Takumar i have to be more careful
CamperBot
@camperbot
Jan 25 2016 13:36
nicie sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1881 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Jan 25 2016 13:36
@BorneoBuzz for positive values ( count > 0) you should return count + " Bet"; and second message for negative or equal to zero values.
@NIcie so this was your error? You have added new link? If yes, don't worry, many people do so :-)
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:37
@Takumar can you explain why in that scenario , why dot notation doesnt work? why do we have to use []?
Eran Finkle
@finklez
Jan 25 2016 13:37
@BorneoBuzz you can't use comma in return, it's as if you try to return 2 values
also you don't need the count = count part, just skip it
Natalia
@NIcie
Jan 25 2016 13:38
@Takumar Yes, I was wrong with the position of the paragraph
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:38
@Takumar @finklez ...thank you soo much! I'll give it another try then
CamperBot
@camperbot
Jan 25 2016 13:38
borneobuzz sends brownie points to @takumar and @finklez :sparkles: :thumbsup: :sparkles:
:star: 1882 | @takumar | http://www.freecodecamp.com/takumar
:star: 304 | @finklez | http://www.freecodecamp.com/finklez
Eran Finkle
@finklez
Jan 25 2016 13:39
@fahadh14 in dot notation it's the actual string 'val', what you want is the value inside val, you must use bracket not
Aleksander Gębicki
@Takumar
Jan 25 2016 13:39
@fahadh14
var obj = {
  name: "Suzan",
  "long name": "Popopipopiza"
}
var prop = "name";
var result = obj.name;  // you can get "Susan" name in such way because "name" is name of property of "obj" object
  result = obj["long name"]; // you have to put name of property in quotation marks, because it contains space
  result = obj[prop];  // prop contains name of property
  result = obj.prop; // this is wrong, because there is no such property in object
Mohamed Fahadh
@fahadh14
Jan 25 2016 13:41
@Takumar arhhhh , got it. :)
Thanks! @Takumar
CamperBot
@camperbot
Jan 25 2016 13:41
fahadh14 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1883 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Jan 25 2016 13:41
@fahadh14 you are welcome :-)
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 13:45
how to see the property names of a object ?
Keith Janak
@greyhammer
Jan 25 2016 13:47
@Takumar Hello Sir!
Eran Finkle
@finklez
Jan 25 2016 13:52
@Takumar thanks too, did not know .keys
CamperBot
@camperbot
Jan 25 2016 13:52
finklez sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 1887 | @takumar | http://www.freecodecamp.com/takumar
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:52
@Takumar @finklez would you know if cc(7); cc(8); cc(9); also means calling the cc function 3 times with it's respective var i.e 7, 8, 9?
The + sign did the job of printing the count, thank you very much for that!!!
However, I can't get the required output - Cards Sequence 2, 3, 4, 5, 6 should return "5 Bet" right.
With this sequence, I get the 1 Bet output
Aleksander Gębicki
@Takumar
Jan 25 2016 13:54
@greyhammer hello :-)
Keith Janak
@greyhammer
Jan 25 2016 13:54
@Takumar been working through the Basic Algorithm Scripting , fun stuff
Eran Finkle
@finklez
Jan 25 2016 13:54
@BorneoBuzz can you paste your fixed code? put it inside ```
Aleksander Gębicki
@Takumar
Jan 25 2016 13:54
@BorneoBuzz for first question answer is yes, it is called 3 times.
@BorneoBuzz I showed you only how to correct first pack of cards, I thought you will correct rest by your own.
In first part you increment count variable, in last (third) decrement.
@greyhammer basic part is fun, rest is harder :-)
But very good you have completed this part.
Munish Tayal
@munishtayal
Jan 25 2016 13:56
how to write a function in javascript, that if a button is pressed a url will open?
Keith Janak
@greyhammer
Jan 25 2016 13:57
@Takumar It's def getting harder. Lots of thinking, less coding than the "lessons" before it
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:57

var count = 0;

function cc(card) {
// Only change code below this line

var count = 0;

switch (card) {
case 2:
case 3:
case 4:
case 5:
case 6:
count = count+1;
break;

case 7:
case 8:
case 9:
  break;

case 10:
case "J":
case "Q":
case "K":
case "A":
  count = count -1;
  break;

}

if (count > 0 && count < 5) {
return count + " Bet";
}

else if ((count === 0) || (count < 0)) {
return count + " Hold";
}

return "Change Me";
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(4); cc(5); cc(6);

oops..sorry..ignore the print screen part
Aleksander Gębicki
@Takumar
Jan 25 2016 13:58
@BorneoBuzz oh I see on your screenshot, that you declare your own local var count = 0; variable, that's wrong because you always start from 0!
@BorneoBuzz your counter should be in global variable (above the function). That's why when you call your function multiple times, it stores your value.
BorneoBuzz
@BorneoBuzz
Jan 25 2016 13:59
@Takumar right..ok...so duuhh of me. Thank you! Thank you very much for your help and patience. I'll try again
CamperBot
@camperbot
Jan 25 2016 13:59
borneobuzz sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: borneobuzz already gave takumar points
Aleksander Gębicki
@Takumar
Jan 25 2016 14:00
@BorneoBuzz try to simplify your conditions, you need only if-else condition. There are only two cases:
  • positive count value
  • negative or equal to 0 value
BorneoBuzz
@BorneoBuzz
Jan 25 2016 14:01
@Takumar Ok...thank you so much for the help. Let me try to re-write that in if else.
CamperBot
@camperbot
Jan 25 2016 14:01
borneobuzz sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: borneobuzz already gave takumar points
BorneoBuzz
@BorneoBuzz
Jan 25 2016 14:02
Now I realized the impact of global var vs local var...thanks again @Takumar !
CamperBot
@camperbot
Jan 25 2016 14:02
borneobuzz sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:warning: borneobuzz already gave takumar points
Bhavin Dave
@bhavindave88
Jan 25 2016 14:08
Hi There ! I'm stuck at Title case a sentence in the Basic algorithm section...
tried different test cases and the output returned is whats desired. However, the challenge doesn't mark it complete
function titleCase(str) {

var str1 = str.split(" ");
var temp = "";
var str2 = "";
  for (var i = 0; i < str1.length; i++){
    temp = str1[i];
    temp = temp[0].toUpperCase() + temp.substring(1).toLowerCase();
    str2 += " " + temp;
  }
  return str2;
}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");
Anyone faced similar issue?
Markus Kiili
@Masd925
Jan 25 2016 14:10
@bhavindave88 You have a space at the start of returned string.
You can .trim() it away, if you like.
Bhavin Dave
@bhavindave88
Jan 25 2016 14:12
@Masd925 Thanks for pointing it out. However, it still isnt complete
CamperBot
@camperbot
Jan 25 2016 14:12
bhavindave88 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
Bhavin Dave
@bhavindave88
Jan 25 2016 14:12
function titleCase(str) {

var str1 = str.split(" ");
var temp = "";
var str2 = "";
  for (var i = 0; i < str1.length; i++){
    temp = str1[i];
    temp = temp[0].toUpperCase() + temp.substring(1).toLowerCase();
    if(i == 1){
      str2 = temp;
    }
    str2 += " " + temp;
  }
  return str2;
}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");
CamperBot
@camperbot
Jan 25 2016 14:12
:star: 808 | @masd925 | http://www.freecodecamp.com/masd925
faraz
@silentarrowz
Jan 25 2016 14:12
need help with the arguments optional bonfire - could you tell why it doesnt work??
here's the code I am using.
function add(x,y) {
  var result;
  if(x!==[0-9]||y!==[0-9]){
    return undefined;
  }
    console.log("x is :",x);
    console.log("y is :",y);
    result=x+y;
    console.log("result is :",result);


  return result;
}

add(2,3);
CamperBot
@camperbot
Jan 25 2016 14:12
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Markus Kiili
@Masd925
Jan 25 2016 14:13
@bhavindave88 Just return str2.trim(); and it works.
greg
@wearenotgroot
Jan 25 2016 14:13
@silentarrowz you need to return a function add(a) that accepts 1 argument if the passed argument is only 1
@silentarrowz also read up on closures
Bhavin Dave
@bhavindave88
Jan 25 2016 14:14
@Masd925 It did. Thanks a lot.
CamperBot
@camperbot
Jan 25 2016 14:14
bhavindave88 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:warning: bhavindave88 already gave masd925 points
Bekzod Khakimov
@Bek777
Jan 25 2016 14:15
Please help me with this. I don't understand what it is said.Only add one class with each of your three selectors.
Markus Kiili
@Masd925
Jan 25 2016 14:15
@silentarrowz When only one argument is passed, you have to return a function. You can write it or use add.bind() method.
greg
@wearenotgroot
Jan 25 2016 14:16
@silentarrowz use this to determine if the arguments supplied are numbers
if(typeof arguments[0] !== 'number' || typeof arguments[1] !== 'number')
{
          return undefined;  
}
Bekzod Khakimov
@Bek777
Jan 25 2016 14:17
Please help me with this. I don't understand what it is said in "Target the same element with multiple jQuery Selectors" section. what does this mean? - Only add one class with each of your three selectors."
OK got it. No help needed
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 14:21

@Masd925 why is .prototype used exactly .read through mdn page.didnt understand...-->Since JavaScript doesn't exactly have sub-class objects, prototype is a useful workaround to make a “base class” object of certain functions that act as objects. For example:

var Person = function() {
  this.canTalk = true;
};

Person.prototype.greet = function() {
  if (this.canTalk) {
    console.log('Hi, I am ' + this.name);
  }
};

or why is it done like

str.prototype.split("" );
Markus Kiili
@Masd925
Jan 25 2016 14:24
@chaitanyaashtekar If you put the method inside the constructor, every object will have a copy of the method. If you put the method on the constructors prototype, all the objects will use the one method that is on the prototype. Objects inherit it and use it along the prototype chain.
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 14:26
@Masd925 ok
thanks
Markus Kiili
@Masd925
Jan 25 2016 14:27
@chaitanyaashtekar That is why you find all the array methods on Array.prototype.
faraz
@silentarrowz
Jan 25 2016 14:27
@Masd925 ok. but why didnt my code work. what was wrong. if we leave aside the task of the bonfire, why didnt my code do what I wanted it to i.e. return undefined if it wasnt a number and return the sum if both are numbers. why didnt it return 5 when both arguments are numbers @wearenotgroot
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 14:28
@Masd925 i didnt get you.explain with an example pls ?
faraz
@silentarrowz
Jan 25 2016 14:29
@wearenotgroot that's a nice way to check if it's a number or not. I didnt know we could just check typeof and see if it is a number
@Masd925 I dont know the bind method...yet. will have to read up on it.
greg
@wearenotgroot
Jan 25 2016 14:32
@silentarrowz hint! test the length of the arguments to execute appropriate response
Alexey
@al-pa
Jan 25 2016 14:35

Hi everyone!
Could you help me understand something, please?
I have problems with jQuery:
'< $("#target5").clone().appendTo("#left-well"); >'
When page loading first time - it is ok. (block "target5 copy to left side")
But if i refresh page. I will have one more "target 5 block" in #left-well
Why this happen and how to prevent this?

This is my code:
http://goo.gl/H4bl42

Markus Kiili
@Masd925
Jan 25 2016 14:39
@chaitanyaashtekar Here is an example:
function Car (model) {
    this.model = model;
    this.getModel = function () {
        return this.model;
    }
}

Car.prototype.setModel = function (model) {
    this.model = model;
}

var myCar = new Car("Ford");
console.log(myCar.getModel()); // Ford
myCar.setModel("Bentley");
console.log(myCar.getModel()); // Bentley
greg
@wearenotgroot
Jan 25 2016 14:40
@silentarrowz steps
  1. if the arguments length equals 2, test if those are numbers then return the result
  2. if the arguments length is 1, test if those are numbers then store the passed argument into variable. then return an add(a)-function that only accepts 1 parameter. you can either return an anonymous function or a function you created inside the current add-function
function add()
{
   //
//normal steps above
    //
     if(arguments.length === 1)
      {
          if arguments[0] is a number           
          var temp is equal arguments[0]  //get a reference variable to store the value of the current parameter
           return   add;             //return the custom function below
       }

     //custom function that accepsts only 1 argument
       function add(a)
     {
              return temp + a;               //this custom function has access to the variable above making it possible to add the number passed if add is called again
     }
}
Toye
@danielbber
Jan 25 2016 14:43
when do i run “npm install dl”, i get the following error, who can help me

Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/Users/Daniel/.node/bin/npm" "install" "bl"
npm ERR! node v5.4.1
npm ERR! npm v3.5.3
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR! at Object.exports._errnoException (util.js:856:11)
npm ERR! at exports._exceptionWithHostPort (util.js:879:20)
npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
npm ERR! { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 15443 }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

John Garrison
@johntg96
Jan 25 2016 14:45
Waypoint: Accessing Nested Arrays in JSON
I need some help with dot and array bracket notation.
I do not know how to select the correct string within the JSON.
// Setup
var myPlants = [
  { 
    type: "flowers",
    list: [
      "rose",
      "tulip",
      "dandelion"
    ]
  },
  {
    type: "trees",
    list: [
      "fir",
      "pine",
      "birch"
    ]
  }  
];

// Only change code below this line

var secondTree = myPlants.type.trees[2]; // Change this line
Markus Kiili
@Masd925
Jan 25 2016 14:45
@chaitanyaashtekar Here is a Car constructor that with the new keyword can create cars. Cars have model and getModel method. The constructor has a prototype property that points originally to an empty object (that has Object.prototype as its prototype). Then we add setModel method to this Car.prototype. Because all cars get the same object Car.prototype as their prototype, all the cars can use setModel method. When setModel method is called, the JS engine goes to the car's prototype looking for the method.
That way we can have one method that all the cars can use.
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 14:52
@Masd925 thanks.understood it
CamperBot
@camperbot
Jan 25 2016 14:52
chaitanyaashtekar sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star: 810 | @masd925 | http://www.freecodecamp.com/masd925
abhishekbose87
@abhishekbose87
Jan 25 2016 14:59
@Dooboopdee here's a hint, myPlants is an array .. so if you want to go access trees hash, you need to do myPlants[1]
Craig Morrison
@frogmorton
Jan 25 2016 15:01
hey guys... quick question regarding the use of dropbox for hosting image resources to link to codepen...
is there something special I have to do to make the image visible to the outside world?
dtieu387
@dtieu387
Jan 25 2016 15:14
I'm having trouble assigning a background color class to a div element...can anybody assist?
Craig Morrison
@frogmorton
Jan 25 2016 15:15
@DevPoetsSociety thanks for the link
abhishekbose87
@abhishekbose87
Jan 25 2016 15:17
@dtieu387 you could do it using <div style='background-color: red'> Some text </div>
or if you are using css you can add a specific class for that div and define the style rules
liangke
@liangkecho
Jan 25 2016 15:30
does anyone can teach me how to use border-radius?
ronald
@ronstarcool
Jan 25 2016 15:31
sure
whats not clear?
whats ur code?
@liangkecho
eg give ur div or img a border: 3px solid red;
liangke
@liangkecho
Jan 25 2016 15:32
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
ronald
@ronstarcool
Jan 25 2016 15:32
ok
y, i always use the shorthand, but this is fine too
then below that: you do:
border-radius: 20px;
or, 20%
or any other number
50% makes it round
higher then 50% does nothing
liangke
@liangkecho
Jan 25 2016 15:33
just add it in it?
ronald
@ronstarcool
Jan 25 2016 15:33
yes
as a new line
a new propertie
i asume ur .thick-green-border is a div?
@dtieu387
liangke
@liangkecho
Jan 25 2016 15:35
that's weird. I was doing that way but now it work
ronald
@ronstarcool
Jan 25 2016 15:35
any luck jet?
magic :)
liangke
@liangkecho
Jan 25 2016 15:35
thanks. im a beginner to HTML
ronald
@ronstarcool
Jan 25 2016 15:35
np
maybe a typo
liangke
@liangkecho
Jan 25 2016 15:36
yeah. maybe
cha.ma
@chama2016
Jan 25 2016 15:57
hi
in this step should i create a file for the style or what : http://www.freecodecamp.com/challenges/use-a-css-class-to-style-an-element

my code
<<<<<<<<<<<<<<<<<<<

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

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

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

>

Amante Reale
@m4nti
Jan 25 2016 15:58
no need just put the <style> tag right there in the html
cha.ma
@chama2016
Jan 25 2016 15:58
i did it @m4nti but i dose not work
Amante Reale
@m4nti
Jan 25 2016 15:58
remove the spaces around =
cha.ma
@chama2016
Jan 25 2016 15:59
i removed it but same probleme
Kevin Elser
@CoffeeCodeKevin
Jan 25 2016 15:59
I'm running into a bit of an issue with building the calculator in that my numbers that I enter in add to each other instead of moving to the end of one another. So, for example, I enter 3 and then 4 and it returns 7 instead of the 34 I'm looking for. I tried turning the numbers to strings and using concat, but that didn't work. Is there any other way to make that work?
ronald
@ronstarcool
Jan 25 2016 16:00
@chama2016 <h2 class="red-text">CatPhotoApp</h2>
cha.ma
@chama2016
Jan 25 2016 16:01
@m4nti : i think the probleme is here "Your stylesheet should declare a red-text class and have its color set to red."
ronald
@ronstarcool
Jan 25 2016 16:01
<style>
  .red-text {
    color: red;
  }
</style>
@chama2016 this should do it
cha.ma
@chama2016
Jan 25 2016 16:01
i copy your code but same proleme
tskorupka
@tskorupka
Jan 25 2016 16:01
Hello guys, inserting objects into MongoDB, am I doing it right?
var mongo = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/learnyoumongo";

mongo.connect(url, function(err, db) {
  if (err) console.log(err);
  var docs = db.collection('docs');

  var doc = {
    firstName: process.argv[2],
    lastName: process.argv[3]
  };

  docs.insert(doc, function (err, data) {
    if (err) console.log(err);

    console.log(JSON.stringify(data));
  });
});
ronald
@ronstarcool
Jan 25 2016 16:01
pm
greg
@wearenotgroot
Jan 25 2016 16:02
@keccakec dont do the operation unless the user press the +,-,= etc. signs
Kevin Elser
@CoffeeCodeKevin
Jan 25 2016 16:02
@wearenotgroot My issue is getting the multi digit numbers entered. I want to add the strings together, so that clicking 3 and then 4 makes 34 in the box.
The way it is right now I have the currentEntry having the number entered added to it, which I know is wrong
But with concat not working I'm not sure exactly how to add num to the end of currentEntry
Where num = the number I click and currentEntry = what's already in the display
greg
@wearenotgroot
Jan 25 2016 16:05
@keccakec that is why you do a check if the next button pressed is +,-,*,/,= else just
someInput.value += number pressed
Kevin Elser
@CoffeeCodeKevin
Jan 25 2016 16:07
@wearenotgroot Thanks, to be honest I didn't know .text() existed before now and I was trying to use toString with concat.
CamperBot
@camperbot
Jan 25 2016 16:07
keccakec sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star: 545 | @wearenotgroot | http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Jan 25 2016 16:08
@keccakec if it is input type="text" i believe it is .value
Kevin Elser
@CoffeeCodeKevin
Jan 25 2016 16:08
@wearenotgroot I believe I made it harder for myself in that I used <button> and not <span> or <input>
and for the display it's just a p element inside of a styled div
Rob Simpson
@pertrai1
Jan 25 2016 16:26
Hi all. Question: why would you only want to have one instance of an object - i.e. singleton?
sspringer01
@sspringer01
Jan 25 2016 16:29
Hey guys, after FCC I want to learn Java and Python, which one shouldI learn first
GM-Connor
@GM-Connor
Jan 25 2016 16:33
@sspringer01 Python is easier, Java is harder, but also one of most popular
sspringer01
@sspringer01
Jan 25 2016 16:34
@GM-Connor Yeah, but would learning Python make Java easier or vice versa
GM-Connor
@GM-Connor
Jan 25 2016 16:35
@sspringer01 Also if you choose Python, which I think would be a good option if you are somewhat a beginnier, here is an excellent resource. It's a free online video course. https://www.coursera.org/course/cs101
Woodman
@btcmacroecon
Jan 25 2016 16:35
i think i got the catphotoapp thing right it says i need a closing element
sspringer01
@sspringer01
Jan 25 2016 16:36
@GM-Connor Thanks
CamperBot
@camperbot
Jan 25 2016 16:36
sspringer01 sends brownie points to @gm-connor :sparkles: :thumbsup: :sparkles:
:star: 152 | @gm-connor | http://www.freecodecamp.com/gm-connor
GM-Connor
@GM-Connor
Jan 25 2016 16:36
@sspringer01 If that course you learn how to build a basic search engine
Woodman
@btcmacroecon
Jan 25 2016 16:36
where do i find the answer?
GM-Connor
@GM-Connor
Jan 25 2016 16:36
@btcmacroecon Check your closing tags. Almost every opening tag should have a closing tag
@btcmacroecon ex. <div> should have a </div>
Woodman
@btcmacroecon
Jan 25 2016 16:37
<h2>CatPhotoApp</h2>
i did
got hung up on this 2 times already, i have to then go back and repeat a bunch of steps
if this doesnt work im down the road
sspringer01
@sspringer01
Jan 25 2016 16:39
@GM-Connor The course you sent doesn't teach Python
Woodman
@btcmacroecon
Jan 25 2016 16:41
tell me there is no fake little obstacles to prompt you like corporate america
Luke Kearney
@lukekearney
Jan 25 2016 16:42

@sspringer01 It depends on what you your end goal is (I don’t know your background). It could be that the best language might be something other than those 2. However, Python would probably be better to start with if you’re not sure. It will allow you to mess around with code without needing to worry about object oriented and static typing, which Java would do. Also, django and flask are popular web development frameworks.

However, if you feel you’d be more interested in going down the application/software development route I’d say to do Java. It’s arguably lower level (as in closer to machine code) than python and is a better introduction to data structures (linkedlists, arrays, queues, stacks etc). Of course, if you wanted to do data structures and algorithms properly I’d advise C. It would be a steep enough learning curve, but will set you up nicely to understand higher level languages better. You don’t have to master it, so in this case I’d recommend cs50x on the edx platform

That’s just my 2 cents…likely biased because of my own learning path
sspringer01
@sspringer01
Jan 25 2016 16:43
@lukekearney Thanks for the advice. Can I message you to ask some more questions
CamperBot
@camperbot
Jan 25 2016 16:43
sspringer01 sends brownie points to @lukekearney :sparkles: :thumbsup: :sparkles:
:star: 85 | @lukekearney | http://www.freecodecamp.com/lukekearney
Luke Kearney
@lukekearney
Jan 25 2016 16:44
@sspringer01 Sure. I’m still learning myself, but I’ll help out as best I can. This course teaches python https://www.udacity.com/course/viewer#!/c-cs101
Just in case anyone else is looking for one. there’s also codecademy and MIT’s 6.001x
Woodman
@btcmacroecon
Jan 25 2016 16:45
yah if thats a prompt to get me to do github, im outta here
martina carrington
@MartinaCarrington
Jan 25 2016 16:47
i have question what does it mean Your h2 element should degrade to the font Monospace when Lobster is not available.
Lia J
@lili718
Jan 25 2016 16:49
that if for some reason your website colud not access the lobster font it would change to monospace instead @MartinaCarrington
martina carrington
@MartinaCarrington
Jan 25 2016 16:51
ohhh
so have to change it to monospace
Lia J
@lili718
Jan 25 2016 16:52
no you just
h2 {
font-family: Lobster, Monospace;
}
TheKingIsHere
@TheKingIsHere
Jan 25 2016 16:53
you can add monospace to font-family just have space in between, so if first option does not read second option will work
martina carrington
@MartinaCarrington
Jan 25 2016 16:53
oh ok thank you for the help
Lia J
@lili718
Jan 25 2016 16:53
it allows you to still use lobster font but have monospace as backup @MartinaCarrington
martina carrington
@MartinaCarrington
Jan 25 2016 16:53
now i got it thanks Lili718
nmistry158
@nmistry158
Jan 25 2016 16:54
hi all, im really stuck on this task - Convert Celsius to Fahrenheit - I've done this:
var farenheit = celsius * 9/5 + 32; is that even close?
ronald
@ronstarcool
Jan 25 2016 16:55
looks good
Luke Kearney
@lukekearney
Jan 25 2016 16:56
Yeah that looks right. What’s the problem?
ronald
@ronstarcool
Jan 25 2016 16:57
if thats exactly what you got, you forgot 1 "h"
nmistry158
@nmistry158
Jan 25 2016 16:57
i have this as an error: farenhiet not defined
GM-Connor
@GM-Connor
Jan 25 2016 16:57
@sspringer01 I apologize. This is the one! https://www.udacity.com/course/cs101
nmistry158
@nmistry158
Jan 25 2016 16:57
function convert(celsius) {
  // Only change code below this line

  var farenheit = celsius * 9/5 + 32;

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

// Change the inputs below to test your code
convert(30);
ronald
@ronstarcool
Jan 25 2016 16:57
its the typo
TYPO
Luke Kearney
@lukekearney
Jan 25 2016 16:57
Yep type
typo
ronald
@ronstarcool
Jan 25 2016 16:57
var fahhhhhhhhrenheit
nmistry158
@nmistry158
Jan 25 2016 16:57
ahh
ronald
@ronstarcool
Jan 25 2016 16:57
ok :)
nmistry158
@nmistry158
Jan 25 2016 16:58
yay thanks ! really need to read it closer
sometimes another eye is all it needs :)
Luke Kearney
@lukekearney
Jan 25 2016 16:59
It happens
Eran Finkle
@finklez
Jan 25 2016 17:01
@nmistry158 btw, no need for the else, since the if will exit
or you can oneline it
    return typeof fahrenheit !== 'undefined'  ? fahrenheit : 'fahrenheit not defined';
ronald
@ronstarcool
Jan 25 2016 17:01
default code finklez
Eran Finkle
@finklez
Jan 25 2016 17:03
just in general
ronald
@ronstarcool
Jan 25 2016 17:03
ok
Pranjal Mishra
@Pranjal77
Jan 25 2016 17:11
hi can anyone tell me why the name of class and method cannot be same in Ruby?
Alidu Maltiti
@Code123456789
Jan 25 2016 17:12
Hi, Guys, can you help me out with this
Luke Kearney
@lukekearney
Jan 25 2016 17:13
@Code123456789 We could if you told us the problem
Herman Fassett
@HermanFassett
Jan 25 2016 17:13
@Code123456789 it should be li not il
<li>milk</li>
I think li stands for list item if it helps remember
Alidu Maltiti
@Code123456789
Jan 25 2016 17:13
Please check this out for me

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

<ul>
<il>milk</il>
<il>cheese</il>
<il>fish</il>
</ul>

Herman Fassett
@HermanFassett
Jan 25 2016 17:14
^^^ as I said, change il to li
srinjay
@srinjay
Jan 25 2016 17:14
yup change it to li
yhat should work
that*
Alidu Maltiti
@Code123456789
Jan 25 2016 17:14
Okay, thanks
GM-Connor
@GM-Connor
Jan 25 2016 17:15
@Code123456789 Just remember,li stands for list item
Alidu Maltiti
@Code123456789
Jan 25 2016 17:15
Okay, i will
Yes, it's done. Thanks a lot guys
anybody?
i cant find on G what /+ means
any pro regex inhere??
Nerando Johnson
@nerajno
Jan 25 2016 17:18
i need help with this , Waypoint : Global Scope and Functions
cannelflow
@cannelflow
Jan 25 2016 17:19
@nerajno tried something ?
ronald
@ronstarcool
Jan 25 2016 17:19
@nerajno whats the problem?
yeah.. i tried 4 * /
but no luck
the dot could be anything right?
ow. ur not even talking to me :)
Nerando Johnson
@nerajno
Jan 25 2016 17:20
@ronstarcool @cannelflow i am trying to remember how to do declare a var
ronald
@ronstarcool
Jan 25 2016 17:20
type var
cannelflow
@cannelflow
Jan 25 2016 17:20
var sbc=10;
@nerajno
Luke Kearney
@lukekearney
Jan 25 2016 17:20
@ronstarcool Not a regex expert, but / is a delimiter (so separating regex expressions), and + means to match one or many characters. I imagine the / would have to be escaped with a backslash, in which case /+ would match one or many forward slash characters. Dunno how that works on the regex crossword thing
cannelflow
@cannelflow
Jan 25 2016 17:20
like this
Nerando Johnson
@nerajno
Jan 25 2016 17:20
sorry define it @ronstarcool
cannelflow
@cannelflow
Jan 25 2016 17:21
@nerajno declare a variable name xyz like var xyz
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:21
Untitled.png
ronald
@ronstarcool
Jan 25 2016 17:21
so: 1 forwars slach means forwars slash right?
cannelflow
@cannelflow
Jan 25 2016 17:22
and assign value 10 to it like var xyz=10 @nerajno
clifrockh
@clifrockh
Jan 25 2016 17:22
hi can someone review my attempt to change the image size to 100 pixels for the "size your images" challenge? I have changed the browser zoom setting to 100% and I created the class but no luck on image size:
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:22
@cannelflow see the screenshot pls.
cannelflow
@cannelflow
Jan 25 2016 17:22
@chaitanyaashtekar seeing
Nerando Johnson
@nerajno
Jan 25 2016 17:22
@cannelflow lemmie show u what i have

function fun1() {
  // Assign 5 to oopsGlobal Here
 var myGlobal =  10;

}

// Only change code above this line
function fun2() {
  var output = "";
  if (typeof myGlobal != "undefined") {
    output += "myGlobal: " + myGlobal;
  }
  if (typeof oopsGlobal != "undefined") {
    output += " oopsGlobal: " + oopsGlobal;
  }
  console.log(output);
}
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:23
@cannelflow why does collection have diff values in the output ??
@nerajno read the propblem again
ronald
@ronstarcool
Jan 25 2016 17:23
@nerajno looks good
sorry!
not good :)
cannelflow
@cannelflow
Jan 25 2016 17:24
@nerajno decleare var myGlobal=10; outside function
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:24
@ronstarcool bad
cannelflow
@cannelflow
Jan 25 2016 17:24
@chaitanyaashtekar trying to understand

@nerajno Declare a global variable myGlobal outside of any function. Initialize it to have a value of 10

Inside function fun1, assign 5 to oopsGlobal without using the var keyword.

chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:24
@cannelflow
clifrockh
@clifrockh
Jan 25 2016 17:24

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

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

h2 {
font-family: Lobster, Monospace;
}

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

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

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

Luke Kearney
@lukekearney
Jan 25 2016 17:24
@ronstarcool I guess so
cannelflow
@cannelflow
Jan 25 2016 17:25
@chaitanyaashtekar what we are doing here ?
ronald
@ronstarcool
Jan 25 2016 17:25
@lukekearney so, the second line has got to be 2 times /
and 1horizontal could be anything
cannelflow
@cannelflow
Jan 25 2016 17:26
@clifrockh which exercise
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:26
@cannelflow doing nothing now specifically.just printing the collection
John Long
@jlongdesign
Jan 25 2016 17:26
Can anyone explain why this is wrong? myVar = myVar--;
Nerando Johnson
@nerajno
Jan 25 2016 17:26
@cannelflow almost there
ronald
@ronstarcool
Jan 25 2016 17:26
myvar--
does the job i guess
Ryan Thomas
@Placid7
Jan 25 2016 17:27
@ronstarcool don't give answers
ronald
@ronstarcool
Jan 25 2016 17:27
sorry
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:27
@JohnnieRebel71 it must bemyVar -=myVar; it means myVar=myVar-1;
ronald
@ronstarcool
Jan 25 2016 17:28
ok, i solved it, h1 is 2 times *, and h2 is 2 times /
@lukekearney
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:28
@cannelflow anything ???
Nerando Johnson
@nerajno
Jan 25 2016 17:28
@cannelflow how do you assign a value without using var ?
John Long
@jlongdesign
Jan 25 2016 17:28
@chaitanyaashtekar Cool thanks
CamperBot
@camperbot
Jan 25 2016 17:28
johnnierebel71 sends brownie points to @chaitanyaashtekar :sparkles: :thumbsup: :sparkles:
:star: 289 | @chaitanyaashtekar | http://www.freecodecamp.com/chaitanyaashtekar
cannelflow
@cannelflow
Jan 25 2016 17:29
@nerajno simply write abc=10 that is global variable
tommy
@tommygebru
Jan 25 2016 17:29
@nerajno you can reassign a value :smile:
var myString="";
myString="something";
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:29
@nerajno do str="hello";instead of var str="hello";
Luke Kearney
@lukekearney
Jan 25 2016 17:29
@ronstarcool Yeah I think so. That said, I’m trying to solve it now and I can’t seem to get it. let me know if it works
clifrockh
@clifrockh
Jan 25 2016 17:29
@cannelflow hi its the "size your images" challenge
cannelflow
@cannelflow
Jan 25 2016 17:29
@chaitanyaashtekar not yet men :worried:
ronald
@ronstarcool
Jan 25 2016 17:29
@lukekearney it works :)
blob
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:30
@cannelflow arrr ok.but you too think both should give same value of collection na ??
Nerando Johnson
@nerajno
Jan 25 2016 17:30
@cannelflow ok
tommy
@tommygebru
Jan 25 2016 17:30
This message was deleted
cannelflow
@cannelflow
Jan 25 2016 17:30
@chaitanyaashtekar can you send repl link perhaps can tweek something
@chaitanyaashtekar i think so
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:31
@cannelflow https://repl.it/Bg04/2.
John Long
@jlongdesign
Jan 25 2016 17:31
@chaitanyaashtekar Actually figured it out, the challenge requires me to use - - ; to get the answer. Just changed it to myVar- -; (without the equals sign)
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:32
@JohnnieRebel71 yup.both are the same.
cannelflow
@cannelflow
Jan 25 2016 17:32
@chaitanyaashtekar i will try it but pls let me know if you solve it first
tommy
@tommygebru
Jan 25 2016 17:32
@clifrockh the size your image pay attention to what you are referencing , the challenge asks that you add a class to your image tags.... as well as create the css syntax inside of the existing style tags like in the example code :smile:
cannelflow
@cannelflow
Jan 25 2016 17:32
@nerajno worked?
chaitanya ashtekar
@chaitanyaashtekar
Jan 25 2016 17:32
@cannelflow yup.i think its a bug maybe ???
Fredrik E
@freddjah
Jan 25 2016 17:33
does anyone have a good idea if i want to use a css animation on my pomodoro clock, but i want the length of the animation to be x seconds. how would i go about that? preferably without jquery.
Nerando Johnson
@nerajno
Jan 25 2016 17:33
@cannelflow working on it
cannelflow
@cannelflow
Jan 25 2016 17:34
@nerajno oho let me know if it worked
Nerando Johnson
@nerajno
Jan 25 2016 17:36
this is where I am at
// Declare your variable here


function fun1() {
  // Assign 5 to oopsGlobal Here
  oopsGLobal = "5";

}

var myGlobal =  10;
// Only change code above this line
function fun2() {
  var output = "";
  if (typeof myGlobal != "undefined") {
    output += "myGlobal: " + myGlobal;
  }
  if (typeof oopsGlobal != "undefined") {
    output += " oopsGlobal: " + oopsGlobal;
  }
  console.log(output);
}
Luke Kearney
@lukekearney
Jan 25 2016 17:37
@ronstarcool Yeah I got it just there. had to go refresh my regex knowledge a bit more. This is a pretty cool site though
ronald
@ronstarcool
Jan 25 2016 17:37
yeah, i just found it
lets make a regex-chat ! :P
Nerando Johnson
@nerajno
Jan 25 2016 17:37
i jus cant remember how to do it without using var @cannelflow
ronald
@ronstarcool
Jan 25 2016 17:38
take it out the function nera
Fredrik E
@freddjah
Jan 25 2016 17:38
@tommygebru I've been looking all over :) I have no problem animating it but the thing is that I want the duration of the css-animation to be equal to a variable that is defined in js. So lets say that the user selected the timer to be 12 minutes, I would like the animation to be 12 minutes. And if the user selects 8 minutes instead it the animation should be 8 minutes, and so on. :p
cannelflow
@cannelflow
Jan 25 2016 17:38
@nerajno abc=10 it is global variable
Nerando Johnson
@nerajno
Jan 25 2016 17:38
yes @cannelflow got that \
next issue
cannelflow
@cannelflow
Jan 25 2016 17:39
@nerajno ?
Nerando Johnson
@nerajno
Jan 25 2016 17:39
i cant remember how assign the value of 5 without using var
inside function 1
tommy
@tommygebru
Jan 25 2016 17:40
@freddjah sounds good ! i wouldn't know how to do that do you have a codepen? also you should try the ZiplinesRoom :smile: https://gitter.im/FreeCodeCamp/HelpZiplines?source=orgpage
cannelflow
@cannelflow
Jan 25 2016 17:40
@nerajno Inside function fun1, assign 5 to oopsGlobal without using the var keyword.
like abc=10
Nerando Johnson
@nerajno
Jan 25 2016 17:40
ok