These are chat archives for FreeCodeCamp/Help

12th
Sep 2015
Anthony DeGregorio
@ADG88
Sep 12 2015 00:10
@qualitymanifest I'm trying everything I know to get a new property in this waypoint but nothing seems to work
@qualitymanifest I found a page about the "new" keyword but I cant quite decipher it
DJ
@qualitymanifest
Sep 12 2015 00:12
@ADG88 to give you an example of how it works, if i had an object called myLife and i wanted to add some data about currentJobPay it would go like this
myLife.currentJobPay = peanuts;
Jason Wood
@catapixel
Sep 12 2015 00:13
Anyone completed the Angular.js section yet? I have a question....
Anthony DeGregorio
@ADG88
Sep 12 2015 00:13
@qualitymanifest wow!
thanks @qualitymanifest
CamperBot
@camperbot
Sep 12 2015 00:13
adg88 sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 200 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Anthony DeGregorio
@ADG88
Sep 12 2015 00:13
I feel like a dolt
DJ
@qualitymanifest
Sep 12 2015 00:14
no problem, it happens
also i forgot to use quotation marks around peanuts. whoops haha.
Moisés Man
@moigithub
Sep 12 2015 00:33
@catapixel just ask, if some1 knows u will get an answer :)
Jason Wood
@catapixel
Sep 12 2015 00:35
@moigithub appreciate it. I got an opinion. The question was about the first waypoint for angular.js and when the waypoint should be considered completed (e.g. finish the first level on Code School or finish all angular levels on Code School)...
Moisés Man
@moigithub
Sep 12 2015 00:38
if i recall.. there are few waypoits for angular... pointing to differents sections of codeschool.. so at the end.. after u do all waypoints ... u will finish all codeschool
each waypoint p oint to a "section " of angular in codeschool
Ghost
@ghost~55ee52540fc9f982beaff6cd
Sep 12 2015 00:46
```js
```
function reverseString(str) {
  return str.reverse();
}

reverseString('hello');
Can anyone tell me what I'm missing?
I'm doing the second bonfire and trying to reverse 'hello'
Moisés Man
@moigithub
Sep 12 2015 00:52
reverse is NOT an string function..
but an Array function
Ghost
@ghost~55ee52540fc9f982beaff6cd
Sep 12 2015 00:52
Ahhh thanks so much @moigithub
CamperBot
@camperbot
Sep 12 2015 00:52
peternguyen604 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star: 335 | @moigithub | http://www.freecodecamp.com/moigithub
adcor
@adcor
Sep 12 2015 00:55
I have a question I was wondering if someone can help me with. I'm trying to connect node to an sql database. I have node-mysql installed, but am not really sure how to set up a server that can connect with a database
Adam Sickmiller
@progmacattack
Sep 12 2015 01:09
hey all. i'm working on the JSON API. I'm trying to use this code
$.getJSON(("https://api.twitch.tv/kraken/streams/FreeCodeCamp"), function(result){
$.each(result, function(i, field){
$("#test").append(field + " ");
});
});
it returns [object Object] null
i was expecting it to give me the data from the api
Moisés Man
@moigithub
Sep 12 2015 01:14
@progmacattack open devtools.. and check if u have any error on console
Adam Sickmiller
@progmacattack
Sep 12 2015 01:19
@moigithub hmm, nothing. i'm wondering if it has something to do with stringify...i can get a decent result if i send it to console instead of to the web page
Moisés Man
@moigithub
Sep 12 2015 01:20
post ur codepen link
Adam Sickmiller
@progmacattack
Sep 12 2015 01:21
got it.
$("#test").append(JSON.stringify(field) + " ");
that seemed to do it
it's a mess
Ammar Ali Shah
@AmmarAliShah
Sep 12 2015 02:13
Need help with where do i belong
Chocobowings
@chocobowings
Sep 12 2015 02:14
@AmmarAliShah What do you need help with ?
Ammar Ali Shah
@AmmarAliShah
Sep 12 2015 02:15
@chocobowings my code isn't working
function where(arr, num) {
  // Find my place in this sorted array.
  for(i=0;i<arr.length;i++){
    c = i + 1;
    if(arr[i]<num && arr[i] > arr[c]) {
      return true;
    }
    else {
      return false;
    }
  }
}
Jason Confere
@wvmtnboy
Sep 12 2015 02:17
so, I'm having some difficulty with .push()
Chocobowings
@chocobowings
Sep 12 2015 02:18
@AmmarAliShah did you get my mp
Jason Confere
@wvmtnboy
Sep 12 2015 02:18
``` <---- Is this what you use to post code?? I apologize, I haven't been here long
DTing
@dting
Sep 12 2015 02:18
@AmmarAliShah you need to return the index
not true or false
also if you have an if else statement that both have return statements inside a loop you will always exit the function on the first iteration
@wvmtnboy
help formatting
CamperBot
@camperbot
Sep 12 2015 02:20

: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, then type js or html and then press [shift + enter ⏎]

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

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

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

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

Ammar Ali Shah
@AmmarAliShah
Sep 12 2015 02:21
@dting The true and false are there for debugging
@dting I'm going to remove them. Was testing out what part of my code isn't working
DTing
@dting
Sep 12 2015 02:21
you dont need c
Ammar Ali Shah
@AmmarAliShah
Sep 12 2015 02:21
I get fasle everytime
function where(arr, num) {
  // Find my place in this sorted array.
  for(i=0;i<arr.length;i++){
    if(arr[i]<num && arr[i] > arr[i + 1]) {
      return i + 1;
    }
  }
}
@dting ^
Jason Confere
@wvmtnboy
Sep 12 2015 02:23
@dting thank you!
CamperBot
@camperbot
Sep 12 2015 02:23
wvmtnboy sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1133 | @dting | http://www.freecodecamp.com/dting
Jason Confere
@wvmtnboy
Sep 12 2015 02:24
``` js
doh!
Ammar Ali Shah
@AmmarAliShah
Sep 12 2015 02:26
@dting Thanks I'll check them out
CamperBot
@camperbot
Sep 12 2015 02:26
ammaralishah sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1134 | @dting | http://www.freecodecamp.com/dting
Jason Confere
@wvmtnboy
Sep 12 2015 02:26
I actually ended up solving that myself as I was posting!
go me
Ubaidillah Waseem
@uwaseem
Sep 12 2015 02:28
Hey Guys, need some help on Waypoint 15 -> Waypoint: Target a Specific Child of an Element Using jQuery
Not sure why this line is not correct
$('.well:nth-child(2)').addClass('animated bounce’);
Hans van Riet
@hansinla
Sep 12 2015 02:30
@uwaseem add a space after well
Alejandro Tejada
@wannabecoding
Sep 12 2015 02:32
Anybody want to help on a non FCC problem? :)
Ubaidillah Waseem
@uwaseem
Sep 12 2015 02:32
@hansinla That works. Thanks !!
CamperBot
@camperbot
Sep 12 2015 02:32
uwaseem sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 358 | @hansinla | http://www.freecodecamp.com/hansinla
Ubaidillah Waseem
@uwaseem
Sep 12 2015 02:32
Might telling me a bit why the space is necessary ??
Mind*
Ubaidillah Waseem
@uwaseem
Sep 12 2015 02:33
@dting Thanks !! I’ll check that out
CamperBot
@camperbot
Sep 12 2015 02:33
uwaseem sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1135 | @dting | http://www.freecodecamp.com/dting
Ubaidillah Waseem
@uwaseem
Sep 12 2015 02:35
Okay, that make sense now.
sciguy13
@sciguy13
Sep 12 2015 02:47
how can I import google lobster font and apply it to my h2 tag element
Rory Smith
@alanbuchanan
Sep 12 2015 02:48
@sciguy13 it tells you here
hmm the link doesn't go where i expected
@sciguy13 search lobster on google fonts, then click 'Quick use' ( the little arrow pointing right ) and it'll give you instructions
sciguy13
@sciguy13
Sep 12 2015 02:53
@alanbuchanan Thanks alan .. I found the way
CamperBot
@camperbot
Sep 12 2015 02:53
sciguy13 sends brownie points to @alanbuchanan :sparkles: :thumbsup: :sparkles:
:star: 330 | @alanbuchanan | http://www.freecodecamp.com/alanbuchanan
DavidThms
@DavidThms
Sep 12 2015 03:22
Bonfire: Factorialize a Number
CamperBot
@camperbot
Sep 12 2015 03:22

:fire:Bonfire: Factorialize a Number :link:

function factorialize(num) {
  return num;
}

factorialize(5);

Return the factorial of the provided integer.

more info:  bf details | bf links | hint

DavidThms
@DavidThms
Sep 12 2015 03:22
hint
CamperBot
@camperbot
Sep 12 2015 03:22
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Hans van Riet
@hansinla
Sep 12 2015 03:28
@DavidThms Need help?
DavidThms
@DavidThms
Sep 12 2015 03:33
@hansinla yes im stuck not sure how to even start writing the code for this
DTing
@dting
Sep 12 2015 03:33
@DavidThms you can use recursion or a loop
Alan Fong
@alanfongtzebun
Sep 12 2015 03:34
Dear all, I need help on Check for Palindromes, this is what I've done, still got this failed: "0_0 (: /-\ :) 0-0" is a palindrome: expected false to equal true
function palindrome(str) {
  // Good luck!
  str = str.replace(/\W/gi, '').toLowerCase();
  if(str == str.split('').reverse().join('')){
    return true;
  }
  else{
    return false;
  }
}

palindrome("eye");
DTing
@dting
Sep 12 2015 03:35
if you use a loop
start a variable at 1
then for i from 1 to num set that variable to variable * i then return the variable.
@alanfongtzebun \W excludes underscores too
you need to include then using | or []
see what you can add to the regex to make it include _ to your matches
Alan Fong
@alanfongtzebun
Sep 12 2015 03:39
@dting thanks for the useful link :+1:
CamperBot
@camperbot
Sep 12 2015 03:39
alanfongtzebun sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1136 | @dting | http://www.freecodecamp.com/dting
AlyAbdelghany
@AlyAbdelghany
Sep 12 2015 03:40
hey everybody
I need help with Bonfire: Reverse a String please
CamperBot
@camperbot
Sep 12 2015 03:41
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
DTing
@dting
Sep 12 2015 03:42
bf reverse
CamperBot
@camperbot
Sep 12 2015 03:42

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

DTing
@dting
Sep 12 2015 03:42
bf links
DTing
@dting
Sep 12 2015 03:42
those 3 links at the bottom should be able to help ya out.
i took some notes on the basic bonfires if you want to take a look after you find your solution. https://github.com/dting/fccbonfires/blob/master/basic/Basic%2002%20-%20Reverse%20a%20String.ipynb
AlyAbdelghany
@AlyAbdelghany
Sep 12 2015 03:46
in the quiz is completely different than the examples
different from*
Miguel Bertaud
@miguelbertaud
Sep 12 2015 03:50
blob
i have a problem helpe what i need to do?
Alejandro Tejada
@wannabecoding
Sep 12 2015 03:56
Arrays can have any type of data in them correct? Strings, numbers, booleans?
Hans van Riet
@hansinla
Sep 12 2015 03:57
@miguelbertaud The code already created a new Car object for you called myCar. It has a property wheels. You need to add the property engines (with the value of one) to myCar.
Miguel Bertaud
@miguelbertaud
Sep 12 2015 04:00
@hansinla thanks, but how can i do that ?
CamperBot
@camperbot
Sep 12 2015 04:00
miguelbertaud sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 359 | @hansinla | http://www.freecodecamp.com/hansinla
Hans van Riet
@hansinla
Sep 12 2015 04:01
Well, looks at the Object itself. A new property is created by this.wheels = 4;
Miguel Bertaud
@miguelbertaud
Sep 12 2015 04:01
@hansinla can you give me an example?
@hansinla thanks
CamperBot
@camperbot
Sep 12 2015 04:01
miguelbertaud sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:warning: miguelbertaud already gave hansinla points
Hans van Riet
@hansinla
Sep 12 2015 04:02
Now you have to do something similar with myCar, and the property is engines. How would you do that?
Joseph odhiambo
@Theonlysmartboy
Sep 12 2015 04:36
@miguelbertaud here is an example to add the property steering which is equal to a number, we shall use jscar.steering = 1
Tom Seymour
@Seytom
Sep 12 2015 04:39
Can someone help me understand what's going on with the bonfire "DNA Pairing"? It seems like I have it right; my code is generating answers that match the answers , but it is marking all of the test cases as fails. I tried the code in jsfiddle.net too, and it works fine there.....I'm confused, is it a bug?
CamperBot
@camperbot
Sep 12 2015 04:39
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Tom Seymour
@Seytom
Sep 12 2015 04:40
bonfire name "DNA Pairing"
Hans van Riet
@hansinla
Sep 12 2015 04:44
bonfire dna
CamperBot
@camperbot
Sep 12 2015 04:44

:fire:Bonfire: DNA Pairing :link:

function pair(str) {
 return str;
}

pair("GCG");

The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.

more info:  bf details | bf links | hint

Hans van Riet
@hansinla
Sep 12 2015 04:44
@Seytom My guess is that you’re not returning a 2D array, in other words an array of arrays.
Tom Seymour
@Seytom
Sep 12 2015 04:45
Nope, it's a 2D array.
Hans van Riet
@hansinla
Sep 12 2015 04:45
@Seytom Mind sharing your code?
Tom Seymour
@Seytom
Sep 12 2015 04:46
Not at all, is it ok to do it here?

var arr = [];

function pair(str) {
for(var i=0; i<str.length;i++){
switch(str[i]){
case 'G':
arr.push(['G', 'C']);
break;
case 'C':
arr.push(['C', 'G']);
break;
case 'A':
arr.push(['A', 'T']);
break;
case 'T':
arr.push(['T', 'A']);
break;
}
}

return arr;
}

pair("TTGAG");

DJ
@qualitymanifest
Sep 12 2015 04:48
put three backticks on separate lines above and below your code to format it
var arr = [];

function pair(str) {
  for(var i=0; i<str.length;i++){
    switch(str[i]){
      case 'G':
        arr.push(['G', 'C']);
        break;
      case 'C':
        arr.push(['C', 'G']);
        break;
      case 'A':
        arr.push(['A', 'T']);
        break;
      case 'T':
        arr.push(['T', 'A']);
        break;
    }
  }

 return arr;
}

pair("TTGAG");
Tom Seymour
@Seytom
Sep 12 2015 04:48
@qualitymanifest thanks, was trying to figure out how to do that!
CamperBot
@camperbot
Sep 12 2015 04:48
seytom sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 201 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Hans van Riet
@hansinla
Sep 12 2015 04:50
@Seytom Did you try putting the arr declaration inside the function and not make it global?
Tom Seymour
@Seytom
Sep 12 2015 04:51
@hansinla I'll try, doesn't seem like it should make a difference.
Hans van Riet
@hansinla
Sep 12 2015 04:52
@Seytom I know, but your output is correct as far as I can see.
Tom Seymour
@Seytom
Sep 12 2015 04:52
@hansinla --- That worked, thanks very much! Any idea why it works?
CamperBot
@camperbot
Sep 12 2015 04:52
seytom sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 360 | @hansinla | http://www.freecodecamp.com/hansinla
Hans van Riet
@hansinla
Sep 12 2015 04:53
@Seytom must be something in the test.
Tom Seymour
@Seytom
Sep 12 2015 04:53
@hansinla Oh, I see. Thanks for the insight.
CamperBot
@camperbot
Sep 12 2015 04:53
seytom sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:warning: seytom already gave hansinla points
deaninous
@deaninous
Sep 12 2015 04:58
hell0 campers
Hans van Riet
@hansinla
Sep 12 2015 05:00
@deaninous hI
deaninous
@deaninous
Sep 12 2015 05:01
I am stuck on another brick again
if someone can unstuck me

function replace(str, before, after) {

 if(before.charCodeAt(0)>=65 && before.charCodeAt(0)<= 65+26){

  after = after.slice(0,1).toUpperCase + " " + after.slice(1);
    }else {
      after = after.toLowerCase();
    }
  console.log(str, before, after);

console.log(str.replace(before, after));





}

replace("He is Sleeping on the couch", "Sleeping", "sitting");
bf
search and replace
CamperBot
@camperbot
Sep 12 2015 05:02

:fire:Bonfire: Search and Replace :link:

function replace(str, before, after) {
 return str;
}

replace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");

Perform a search and replace on the sentence using the arguments provided and return the new sentence.

more info:  bf details | bf links | hint

calisham
@calisham
Sep 12 2015 05:22
Anyone out there willing to give me feedback on my zipline portfolio site?
Rashid Thompson
@RashidT
Sep 12 2015 05:29

hello all, I need some help on this bonfire : truncate a string. It seems like I am not slicing the string properly. My code is below:

function truncate(str, num) {
  // Clear out that junk in your trunk
  str = str.split('');

  for(var i = num; i < str.length; i++){
    var j = str[i].slice(i);
  }
  return str.join('') ;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);

Any help is appreciated, thanks.

deaninous
@deaninous
Sep 12 2015 05:32
bf truncate
CamperBot
@camperbot
Sep 12 2015 05:32

:fire:Bonfire: Truncate a string :link:

function truncate(str, num) {
  // Clear out that junk in your trunk
  return str;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);

Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.

more info:  bf details | bf links | hint

deaninous
@deaninous
Sep 12 2015 05:37
@RashidT
try something like if str.length>num
return str.slice(num)
you might not need a for loop
.slice(0,num)
Rashid Thompson
@RashidT
Sep 12 2015 05:40
@deaninous ok, let me try that. I was thinking that I needed an If statement , but wasn't sure where to implement it in the code.
deaninous
@deaninous
Sep 12 2015 05:46
let me know if you need hints on that
@RashidT
Hans van Riet
@hansinla
Sep 12 2015 05:50
@RashidT You will need an if statement. When you test the edge cases (if str.length == num) you’ll find out why.
Rashid Thompson
@RashidT
Sep 12 2015 06:17
@hansinla i think i'm doing my if statement all wrong. Just can't seem to get it. :worried:
Hans van Riet
@hansinla
Sep 12 2015 06:19
@RashidT what do you have so far?
Marc bernardoni
@mbernardoni
Sep 12 2015 06:20
hint seek and destroy
CamperBot
@camperbot
Sep 12 2015 06:20
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
zeal
@zoorz
Sep 12 2015 06:23
Anybody can help me build the FreeCodeCamp on my macbook。
After clone from github。and follow the README there some error occur with the staging branch
kmo1
@kmo1
Sep 12 2015 06:24
@zoorz what's the error?
zeal
@zoorz
Sep 12 2015 06:25
@kmo1 wait a moment.
I will show you the screenshot
Rashid Thompson
@RashidT
Sep 12 2015 06:25

@hansinla ``` function truncate(str, num) {
// Clear out that junk in your trunk
if (str.length = num)
{
return str.slice(0, num);
}

}

truncate('A-tisket a-tasket A green and yellow basket', 11);
```

kmo1
@kmo1
Sep 12 2015 06:27

@calisham - it looks great! I'd recommend evening out your articles I'm seeing 4, 4 and 2. 3, 3 and 3 would be better or even centering the last 2. Bootstrap can do that stuff easily.

Also, center your contact me section

Hans van Riet
@hansinla
Sep 12 2015 06:28
@RashidT So far so good. Now keep in mind that they want you to append “…” to the string when it’s bigger than num. Those three dots are three character, so in that case your slice must be three characters shorter. Also when the string str is already shorter thanor equal to num, you should return the original string. You’re almost there.
zeal
@zoorz
Sep 12 2015 06:28
@kmo1 when I run the command npm install. there are some warning
npm WARN peerDependencies The peer dependency loopback-datasource-juggler@^2.19.0 included from loopback will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
Hans van Riet
@hansinla
Sep 12 2015 06:29
@RashidT so I would do something like:
if (num >= str.length) { return str; }
  else {
//do something to the string str
}
Rashid Thompson
@RashidT
Sep 12 2015 06:31
@hansinla So something like this .
function truncate(str, num) {
  // Clear out that junk in your trunk
  if (str.length > num) 
    {
    return str.slice(0, num - 3) + '...';
    }

  return str;

}

truncate('A-tisket a-tasket A green and yellow basket', 11);
Hans van Riet
@hansinla
Sep 12 2015 06:33
@RashidT Yep
Rashid Thompson
@RashidT
Sep 12 2015 06:33
That worked. thanks @hansinla .
CamperBot
@camperbot
Sep 12 2015 06:33
rashidt sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 361 | @hansinla | http://www.freecodecamp.com/hansinla
Hans van Riet
@hansinla
Sep 12 2015 06:34
@RashidT NP
Garrett Schultz
@garettschultz
Sep 12 2015 06:34
I am very confused and need some help. I am by no means new to the coding world but the way things are described in the beginning of the course is very confusing and wont let me go ahead even though I am doing what its telling me to do.
zeal
@zoorz
Sep 12 2015 06:35
@kmo1 this is my .env file
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'

MANDRILL_PASSWORD='my mandrill password"
MANDRILL_USER='my mandrill account'

SESSION_SECRET='session secret'
DTing
@dting
Sep 12 2015 06:35
@gratschultz2013 post your problems here some one can probably help you
zeal
@zoorz
Sep 12 2015 06:35
@kmo1 after run node seed/
error occur
Error: Cannot find module '../rev-manifest.json'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Function.<anonymous> (/Users/zozorz/freecodecamp/node_modules/pmx/lib/transaction.js:62:21)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/zozorz/freecodecamp/server/middlewares/revision-helpers.js:9:24)
    at Module._compile (module.js:460:26)
    at normalLoader (/Users/zozorz/freecodecamp/node_modules/babel-core/lib/api/register/node.js:199:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/zozorz/freecodecamp/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (module.js:355:32)
Garrett Schultz
@garettschultz
Sep 12 2015 06:36
how do you post probmels @dting
jojacino
@jojacino
Sep 12 2015 06:37
So I am having a problem with Angular.js
Garrett Schultz
@garettschultz
Sep 12 2015 06:37
i need an example of how to put 2 classes inside of 1 element
jojacino
@jojacino
Sep 12 2015 06:38
@gratschultz2013 class="class1 class2"
separated by a space
or better...
<element class="class1 class2" > </element>
I ajax a call to twitch tv and the call does not return data before angular sets up so the html ends up full of undefined or empty
Garrett Schultz
@garettschultz
Sep 12 2015 06:40
I did that, Its asking me to put a smaller image class and a thick green border class inside my img element, I did this and it looks exactly like that but its saying Im missing one of the classes.
jojacino
@jojacino
Sep 12 2015 06:40
ah I remember that one
Garrett Schultz
@garettschultz
Sep 12 2015 06:41
this is what i have: <img class="smaller-image, thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
jojacino
@jojacino
Sep 12 2015 06:41
remove the comma
and run again
separated only by a single space
Garrett Schultz
@garettschultz
Sep 12 2015 06:41
thank you @jojacino it worked
CamperBot
@camperbot
Sep 12 2015 06:41
gratschultz2013 sends brownie points to @jojacino :sparkles: :thumbsup: :sparkles:
:star: 315 | @jojacino | http://www.freecodecamp.com/jojacino
jojacino
@jojacino
Sep 12 2015 06:42
Hooray!
Coding is so picky
Garrett Schultz
@garettschultz
Sep 12 2015 06:43
i see that, but its nice because it forces you to have a high attention to detail.
jojacino
@jojacino
Sep 12 2015 06:43
yeah
My chihuahua just wants to go to bed but I just want to finish my TwitchTV zipline and then go to bed
DTing
@dting
Sep 12 2015 06:45
@gratschultz2013 you can post code using this
help formatting
CamperBot
@camperbot
Sep 12 2015 06:45

: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, then type js or html and then press [shift + enter ⏎]

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

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

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

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

Ali-Haider5
@Ali-Haider5
Sep 12 2015 06:51
This message was deleted
This message was deleted
slertka
@slertka
Sep 12 2015 06:53
Hi all, need help regarding bonfire: chunky monkey
function chunk(arr, size) {
  // Break it up.
  empty = [];
  if (arr <= size) { return true; }
  else {
    test = [];
    for (var i = 0; i < arr.length/size; i++) {
      test.push(arr[i]);
      empty.push(test);
    }
  }
  return empty;
}

chunk(['a', 'b', 'c', 'd'], 2);
This message was deleted
Output is [["a","b"],["a","b"]]
Can't figure out how to get the second nested array to be ["c", "d"]
Ali-Haider5
@Ali-Haider5
Sep 12 2015 06:55
This message was deleted
DTing
@dting
Sep 12 2015 06:56
@slertka there are several ways to do that one
Ali-Haider5
@Ali-Haider5
Sep 12 2015 06:57
This message was deleted
This message was deleted
DTing
@dting
Sep 12 2015 06:57
hmm
slertka
@slertka
Sep 12 2015 06:58
Hi @Ali-Haider5 , what do you need help with?
To add two classes, it would take the following format <element class="class1 class2">
Ali-Haider5
@Ali-Haider5
Sep 12 2015 07:00
thanks worked
CamperBot
@camperbot
Sep 12 2015 07:00
if you want to thank someone, put an @ before their name!
Ali-Haider5
@Ali-Haider5
Sep 12 2015 07:00
@slertka
thanks
CamperBot
@camperbot
Sep 12 2015 07:00
if you want to thank someone, put an @ before their name!
DTing
@dting
Sep 12 2015 07:04
@slertka sorry got distracted
slertka
@slertka
Sep 12 2015 07:04
@dting no worries - i'm trying a while loop now
DTing
@dting
Sep 12 2015 07:05
hmm okay let me know if you need help.
Batman
@complexsion
Sep 12 2015 07:06
Is the jQuery section broken, because the instructions disappear after I do what is needed then nothing happens
DTing
@dting
Sep 12 2015 07:09
that probably means you have a missing bracket
or curley brace
Batman
@complexsion
Sep 12 2015 07:12
hmm I read up on it thinking the same thing but I think I have it correct. I did find in GitHub about 5 days ago someone mentioned the same thing.
DTing
@dting
Sep 12 2015 07:13
which waypoint and whats your code?
help formatting
CamperBot
@camperbot
Sep 12 2015 07:13

: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, then type js or html and then press [shift + enter ⏎]

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

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

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

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

Batman
@complexsion
Sep 12 2015 07:14
@dting I am very new here do I just post the url or is there some thing my noob eyes are missing?
DTing
@dting
Sep 12 2015 07:15
copy and past the code you added
Batman
@complexsion
Sep 12 2015 07:15

First, add a script element at the top of your page. Be sure to close it on the following line.

Your browser will run any JavaScript inside a script element, including jQuery.

Inside your script element, add this code: $(document).ready(function() { to your script. Then close it on the following line (still inside your script element) with: });

<script>
$(document).ready(function() {

});
</script>
DTing
@dting
Sep 12 2015 07:17
thats working for me
what happens when you hit run tests?
Batman
@complexsion
Sep 12 2015 07:17
blank
nothing
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:17
bf Arguments Optional
CamperBot
@camperbot
Sep 12 2015 07:17

:fire:Bonfire: Arguments Optional :link:

function add() {
  return false;
}

add(2,3);

Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.

more info:  bf details | bf links | hint

DTing
@dting
Sep 12 2015 07:17
which browser are you using?
Batman
@complexsion
Sep 12 2015 07:17
could be my browser
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:17
bf details
CamperBot
@camperbot
Sep 12 2015 07:17

:fire:Bonfire: Arguments Optional :link:

function add() {
  return false;
}

add(2,3);
Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.
For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that <code>var sum2And = add(2); return sum2And(3); // 5</code>
If either argument isn't a valid number, return undefined.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:17
hint
CamperBot
@camperbot
Sep 12 2015 07:17
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
DTing
@dting
Sep 12 2015 07:17
ya try refreshing the page
if that doesnt help try a different browser
Batman
@complexsion
Sep 12 2015 07:18
Done that I will switch to chrome
I'm using ms10 default garbage
DTing
@dting
Sep 12 2015 07:18
ya i think the tests have problems with explorer
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:18
Can anyone help me with Arguments Optional? My brain is fried.
I can paste code here if someone can help point me in the right direction.
Daniel Mendoza
@dmendoza05
Sep 12 2015 07:19
help Bonfire: Seek and Destroy
CamperBot
@camperbot
Sep 12 2015 07:19

:point_right: bonfire seek and destroy [wiki]

Explanation:

This problem is a bit tricky because you have to familiarize yourself with Arguments, as you will have to work with two or more but on the script you only see two. Many people hardcode this program for three arguments. You will remove any number from the first argument that is the same as any other other arguments.

:pencil: read more about bonfire seek and destroy on the FCC Wiki

Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:20
help Bonfire: Arguments Optional
CamperBot
@camperbot
Sep 12 2015 07:20

:point_right: bonfire arguments optional [wiki]

Explanation:

It can be quite complicated to understand what needs to be done. There is always many ways to do something when coding but regardless of the algorithm used, we have to create a program that does the following:

  • It has to add two numbers passed as parameters and return the addition.
  • It has to check if any of the numbers are actual numbers, otherwise return undefined and stop the program right there.
  • It has to check if it has one or two arguments passed. More re ignored.
  • If it has only one then it has to return a function that used that number and expects another one, to then add it.

:pencil: read more about bonfire arguments optional on the FCC Wiki

Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:21
The part I need help with exactly is 'If it has only one then it has to return a function that used that number and expects another one, to then add it.'
Batman
@complexsion
Sep 12 2015 07:21
@dting thanks for the help, that worked.
CamperBot
@camperbot
Sep 12 2015 07:21
complexsion sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1139 | @dting | http://www.freecodecamp.com/dting
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:21
return a function?
DTing
@dting
Sep 12 2015 07:22
you can return functions that can be called later
function a() {
  return function(something) {
    console.log("say " + something);
  }
}

var b = a();
b('hi');
// say hi
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:24
hmmm.. okay.
DTing
@dting
Sep 12 2015 07:24
function a returns a function. you can also call it immediately:
a()('hi');
// say hi
Ali-Haider5
@Ali-Haider5
Sep 12 2015 07:26
Hi all, I am just a beginner in this world. Could any one plz tell me is this curriculum enough or should I learn other stuff like php or .net to land a job.
CamperBot
@camperbot
Sep 12 2015 07:26

welcome to FreeCodeCamp @Ali-Haider5!

Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:26
Could I show you my code dting?
DTing
@dting
Sep 12 2015 07:27
in this case they want you to write add so you call it with 1 argument or 2. if it is one argument. they want you to return a function that takes a value that will add it to what add was originally called with.
function add() {
   // if one argument, return a function
   // if two arguments, return the sum
}
add(1, 2)
// 3
add(1)(2)
// 3
and a bunch of type checking stuff
ya you can paste it here i'll take a look
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:28
function add() {
  var sum = 0;

  if (arguments.length > 2 || arguments.length <= 0) {
    return undefined;
  } else if (arguments.length === 1) {
    if (Number.isInteger(arguments[0])) {
      return function(a) {
      return a += arguments[0];
    }
    else {
      return undefined;
    }
  }
  else {
    if (arguments.length === 2) {
      for (var i = 0; i < 2; i++) {
        if (Number.isInteger(arguments[i])) {
          return sum += arguments[i];
          console.log('sum: '+sum);
        }
        else {
          return undefined;
        }
      }
    }
    return sum;
  }
}

add(2,3);
DTing
@dting
Sep 12 2015 07:28
@danieldrasdo the function you return has its own arguments object
you cant refer to the outer function's arguments object from within that function
you can declare and assign a local variable to that value that can be accessed within that function tho
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:29
ahh, ok
alright, let me take a look, and I am gonna also rearrange stuff, I like your 'if one argument' thing.
DTing
@dting
Sep 12 2015 07:31
you are missing a closing brace
function add() {
  var sum = 0;

  if (arguments.length > 2 || arguments.length <= 0) {
    return undefined;
  } else if (arguments.length === 1) {
    if (Number.isInteger(arguments[0])) {
      return function(a) {
      return a += arguments[0];
    } // missing brace
    else {
      return undefined;
    }
  }
  else {
    if (arguments.length === 2) {
      for (var i = 0; i < 2; i++) {
        if (Number.isInteger(arguments[i])) {
          return sum += arguments[i];
          console.log('sum: '+sum);
        }
        else {
          return undefined;
        }
      }
    }
    return sum;
  }
}
oh nm
wait i think you are missing a brace
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:37
function add() {
  var sum = 0;

  if (arguments.length === 1) {
    var firstArg = arguments[0];
    //Check if the one argument is an integer
    if (Number.isInteger(firstArg)) {
      return function(a) {
        return a += firstArg;
      }
    } else {
      return undefined;
    }
  } else if (arguments.length === 2) {
    for (var i = 0; i < 2; i++) {
      if (Number.isInteger(arguments[i])) {
        return sum += arguments[i];
        console.log('sum: '+sum);
      } else {
        return undefined;
      }
    }
    return sum;
  } else if (arguments.length > 2 || arguments.length <= 0) {
    return undefined;
  }
  return undefined;
}

add(2,3);
Oops, I meant...
function add() {
  var sum = 0;

  if (arguments.length === 1) {
    var firstArg = arguments[0];
    //Check if the one argument is an integer
    if (Number.isInteger(firstArg)) {
      return function(a) {
        return a += firstArg;
      }
    } else {
      return undefined;
    }
  } else if (arguments.length === 2) {
    for (var i = 0; i < 2; i++) {
      if (Number.isInteger(arguments[i])) {
        sum += arguments[i];
        console.log('sum: '+sum);
      } else {
        return undefined;
      }
    }
    return sum;
  } else if (arguments.length > 2 || arguments.length <= 0) {
    return undefined;
  }
  return undefined;
}

add(2,3);
Looks like I'm still struggling with the last one... expect(add(2)([3])).to.be.undefined;expected '32' to be undefined
DTing
@dting
Sep 12 2015 07:39
your returned function should also check if the argument it is called with is a number
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:39
Ahh!
DTing
@dting
Sep 12 2015 07:39
that test is calling your returned function with an array. in that case i should return undefined
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:40
Wow, thanks @dting, you've done it again.
CamperBot
@camperbot
Sep 12 2015 07:40
danieldrasdo sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1141 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Sep 12 2015 07:41
this isnt one of the test case but your function could work with non integers if you changed the isInteger to using a typeof check
if (typeof firstArg === 'number') ...
you can also see the first answer to this so question for another way to check if something is a number http://stackoverflow.com/questions/1303646/check-whether-variable-is-number-or-string-in-javascript
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:42
Oh okay
deaninous
@deaninous
Sep 12 2015 07:43
now trying to write a regex to take letters from b-z and negate vowels
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:43
function add() {
  var sum = 0;

  if (arguments.length === 1) {
    var firstArg = arguments[0];
    //Check if the one argument is an integer
    if (Number.isInteger(firstArg)) {
      return function(a) {
        if (Number.isInteger(a)) {
          return a += firstArg;
        } else {
          return undefined;
        }
      }
    } else {
      return undefined;
    }
  } else if (arguments.length === 2) {
    for (var i = 0; i < 2; i++) {
      if (Number.isInteger(arguments[i])) {
        sum += arguments[i];
        console.log('sum: '+sum);
      } else {
        return undefined;
      }
    }
    return sum;
  } else if (arguments.length > 2 || arguments.length <= 0) {
    return undefined;
  }
  return undefined;
}

add(2,3);
deaninous
@deaninous
Sep 12 2015 07:43
its been a long way googling
[b-z^[aeiou]]
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:43
this worked, thanks again @dting, and thx for the SO link
CamperBot
@camperbot
Sep 12 2015 07:43
danieldrasdo sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: danieldrasdo already gave dting points
deaninous
@deaninous
Sep 12 2015 07:44
I cant get it quite write
any clue anyone?
DTing
@dting
Sep 12 2015 07:44
@deaninous what are you trying to do?
oh nm i see
what does negate a vowel mean?
deaninous
@deaninous
Sep 12 2015 07:45
yea i am working on pig latin
DTing
@dting
Sep 12 2015 07:45
@danieldrasdo np
/[^aeiou]/
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:46
Hey @dting how many b points you have? just curious.
deaninous
@deaninous
Sep 12 2015 07:46
I want it to return consonants without the vowels
DTing
@dting
Sep 12 2015 07:46
about @dting
CamperBot
@camperbot
Sep 12 2015 07:46
:star: 1141 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Sep 12 2015 07:46
too many =O
deaninous
@deaninous
Sep 12 2015 07:46
@dting
Daniel Drasdo
@danieldrasdo
Sep 12 2015 07:46
bravo
DTing
@dting
Sep 12 2015 07:46
/[^aeiou]/ this matches any character that isnt aeio or u
deaninous
@deaninous
Sep 12 2015 07:46
/[^aeiou]/
i was concerned it would match white spaces
DTing
@dting
Sep 12 2015 07:47
it will
deaninous
@deaninous
Sep 12 2015 07:48
but i see there is no need for that since the test cases wont include any spaces
DTing
@dting
Sep 12 2015 07:49
This message was deleted
hmm for piglatin you would be dealing with words one at a time so i dont think you need to worry about white space
deaninous
@deaninous
Sep 12 2015 07:51
thats right, @dting. thatnk you
Ali-Haider5
@Ali-Haider5
Sep 12 2015 07:54
This message was deleted
DTing
@dting
Sep 12 2015 07:59
np
cubajean10
@cubajean10
Sep 12 2015 09:13
Hello, anyone knows why I'm getting this error ?$ is not defined
Dealga McArdle
@zeffii
Sep 12 2015 09:16
@cubajean10 where? codepen?
Taro
@TaroWong
Sep 12 2015 10:21
Hey guys
Florian Peninon
@florianpnn
Sep 12 2015 10:23
@cubajean10 You probably forgot to integrate jQuery
Raven Fuentes
@RavenFuentes
Sep 12 2015 10:25
hello im newbie here
Florian Peninon
@florianpnn
Sep 12 2015 10:26
For the bonfire Pig Latin, how do you define a consonant cluster? There is no formal rule and I struggle with it. Should I just write the code to pass the test and that’s all?
Taro
@TaroWong
Sep 12 2015 10:31
Are there any bugs for the waypoint titled "Waypoint: Check the Length Property of a String Variable"?
Valon Haliti
@valonhaliti
Sep 12 2015 11:07
@TaroWong let me see
@TaroWong why would you say, are there any bugs? it's only an example, you don't need to write nothing there
Taro
@TaroWong
Sep 12 2015 11:14
Sorry. It was my poor understanding of the code. Thank you for your time. :)
@valonfhaliti
CamperBot
@camperbot
Sep 12 2015 11:14
if you want to thank someone, put an @ before their name!
swordfish77
@swordfish77
Sep 12 2015 11:21
Create an a element that links to http://freecatphotoapp.com and has "cat photos" as its anchor text ??
how??
Valon Haliti
@valonhaliti
Sep 12 2015 11:23
@swordfish77
<a href="http://freecatphotoapp.com">cat photos</a>
swordfish77
@swordfish77
Sep 12 2015 11:23
I'm stack..
:) thank you
CamperBot
@camperbot
Sep 12 2015 11:24
if you want to thank someone, put an @ before their name!
swordfish77
@swordfish77
Sep 12 2015 11:24
sorry
@valonfhaliti thank you
CamperBot
@camperbot
Sep 12 2015 11:24
swordfish77 sends brownie points to @valonfhaliti :sparkles: :thumbsup: :sparkles:
:star: 203 | @valonfhaliti | http://www.freecodecamp.com/valonfhaliti
Alan Wilson
@nulland
Sep 12 2015 11:41
Could someone please help me figure out where I went wrong with this piece of code: <script $(document).ready(function(){})> </script> I just started the jQuery waypoint. I'm assuming it's just an issue with syntax.
Valon Haliti
@valonhaliti
Sep 12 2015 11:43
@nulland
This message was deleted
<script type="javascript">
$(document).ready(function(){
})
</script>
DTing
@dting
Sep 12 2015 11:44
@nulland they use string matching to check the answer. you just need to make your }); on another line
Aleksandar B.
@aleksandar-b
Sep 12 2015 11:44
@nulland place jquery beetween scripts
DTing
@dting
Sep 12 2015 11:44
<script>
$(document).ready(function() {
});
</script>
Valon Haliti
@valonhaliti
Sep 12 2015 11:45
<script type="text/javascript">
$(document).ready(function(){
})
</script>
Alan Wilson
@nulland
Sep 12 2015 11:45
@valonfhaliti @dting @samosale Thank you!
CamperBot
@camperbot
Sep 12 2015 11:45
nulland sends brownie points to @valonfhaliti and @dting and @samosale :sparkles: :thumbsup: :sparkles:
:star: 204 | @valonfhaliti | http://www.freecodecamp.com/valonfhaliti
:star: 262 | @samosale | http://www.freecodecamp.com/samosale
:star: 1144 | @dting | http://www.freecodecamp.com/dting
swordfish77
@swordfish77
Sep 12 2015 11:58
replace href with #... Doesn't work... :(
..to making a dead link..
simply replace href with # or.. what?
if that help was more efficient..
Joseph odhiambo
@Theonlysmartboy
Sep 12 2015 12:02
@swordfish77 to make a dead link, replace the url with # not the href i.e. href="#"
swordfish77
@swordfish77
Sep 12 2015 12:03
pff, jizs' and how the hell I should know that?? I start to loosing my pacience... @Theonlysmartboy thank you
CamperBot
@camperbot
Sep 12 2015 12:03
swordfish77 sends brownie points to @theonlysmartboy :sparkles: :thumbsup: :sparkles:
:star: 167 | @theonlysmartboy | http://www.freecodecamp.com/theonlysmartboy
swordfish77
@swordfish77
Sep 12 2015 12:07
No explanation, no help on learning page.. I'm a newbie and at the beginning of learning lessons it was a frase who help me to understand... But now, at lvl 22 , nothing!!
Joseph odhiambo
@Theonlysmartboy
Sep 12 2015 12:09
@swordfish77 don't worry we are there to help each other
swordfish77
@swordfish77
Sep 12 2015 12:09
It;s very annoying to ask questions at every steps.. waste of precious time!
Thank again
CamperBot
@camperbot
Sep 12 2015 12:09
if you want to thank someone, put an @ before their name!
swordfish77
@swordfish77
Sep 12 2015 12:09
yes I know... @camperbot
you are a nice bot too :))
Joseph odhiambo
@Theonlysmartboy
Sep 12 2015 12:10
@swordfish77 No it's not even we begun like that, all that you need to do is do plenty of research from google
swordfish77
@swordfish77
Sep 12 2015 12:11
I just wanna do a test...
@Theonlysmartboy thank you
CamperBot
@camperbot
Sep 12 2015 12:12
swordfish77 sends brownie points to @theonlysmartboy :sparkles: :thumbsup: :sparkles:
:warning: swordfish77 already gave theonlysmartboy points
swordfish77
@swordfish77
Sep 12 2015 12:12
@Theonlysmartboy thank you@Theonlysmartboy thank you@Theonlysmartboy thank you@Theonlysmartboy thank you@Theonlysmartboy thank you
CamperBot
@camperbot
Sep 12 2015 12:12
swordfish77 sends brownie points to @theonlysmartboy :sparkles: :thumbsup: :sparkles:
:warning: swordfish77 already gave theonlysmartboy points
swordfish77
@swordfish77
Sep 12 2015 12:12
aha
I cannot give more points..
good to know
Joseph odhiambo
@Theonlysmartboy
Sep 12 2015 12:13
Then don't fear asking questions with every step that you make @swordfish77. Maybe that is your way of learning
swordfish77
@swordfish77
Sep 12 2015 12:15
I wanna t hank y ou again but camperbot is "on me" :)))
Rudi Coles
@rarc
Sep 12 2015 13:19
This message was deleted
gts00k
@gts00k
Sep 12 2015 13:20
some help with pomodoro app ?
Florian Peninon
@florianpnn
Sep 12 2015 13:21
@gts00k Go ahead, where are you stuck?
Jeremy Gorniak
@Gornstats
Sep 12 2015 13:21
@gts00k whatre you having trouble with, counting down?
calisham
@calisham
Sep 12 2015 13:31
thanks for the feedback @kmo1
CamperBot
@camperbot
Sep 12 2015 13:31
calisham sends brownie points to @kmo1 :sparkles: :thumbsup: :sparkles:
:star: 257 | @kmo1 | http://www.freecodecamp.com/kmo1
Evan Davis
@davisec52
Sep 12 2015 13:57
Question on the OOP Waypoint 3, Make Object Properties Private--http://freecodecamp.com/challenges/waypoint-make-object-properties-private Not sure what we are supposed to do. Do we rewrite the existing function, write a new function that we add to the existing function or what?
@someone question on the OOP Waypoint 3. Please see the post above. Forgot to reference @someone.
Rudi Coles
@rarc
Sep 12 2015 14:16
@davisec52 I would edit the existing code.
Evan Davis
@davisec52
Sep 12 2015 14:24
@rarc Well, I was wondering. The existing code has nothing to do with the instructions. It is almost as if there is code missing from the interface.
There is nothing there except the few lines for var Car.
Is there a way to upload a screenshot?
Rudi Coles
@rarc
Sep 12 2015 14:30
@davisec52 It should be related to the question, try reset and edit after.
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:33
hey guy is there anyone who could help me with a bit of jqurey ?
i'm a bit lost there
Omar
@oab00
Sep 12 2015 14:34
@AnbuKakashi what's the problem?
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:35
@oab00 here ill show
its fair to say i reall dont undrestand what do tehy want here
use some jqurey selectors to target button1 than ad some classes to it
Jeremy Gorniak
@Gornstats
Sep 12 2015 14:40
@AnbuKakashi yep, you undersatnd it. try selecting 3 times and adding a new class with each
might want to check the spelling on your addClass() function too
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:41
@Gornstats do i need to target same button 3 times?
but how di i pinpoint it if i use just class or just button?
Jeremy Gorniak
@Gornstats
Sep 12 2015 14:44
try using all three, i dont think they neccessarily want you to target the same element every time
so target all buttons, then all class 'btn', then only the element with id target1
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:47
ok i will try it
Deep2322
@Deep2322
Sep 12 2015 14:51

function chunk(arr, size) {
var newArray = [];
for (var i = 0; i < arr.length; i++){
newArray.push(arr.slice(i, i + size));
}
return newArray;
}

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

what is wrong in this code.?
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:53
@Gornstats thank you, you were right, but they could have worded the challenge a bit less confusing tho
CamperBot
@camperbot
Sep 12 2015 14:53
anbukakashi sends brownie points to @gornstats :sparkles: :thumbsup: :sparkles:
:star: 296 | @gornstats | http://www.freecodecamp.com/gornstats
Jeremy Gorniak
@Gornstats
Sep 12 2015 14:53
@AnbuKakashi no worries. i agree that challenge has a very confusing description
Mike Chan
@mikechan0731
Sep 12 2015 14:55
hi guys~
AnbuKakashi
@AnbuKakashi
Sep 12 2015 14:56
@Mas7er hello
Jack Demynn
@infectiouscode
Sep 12 2015 15:15
im confused, it wants me to add the text #target1 to target1 etc how do i add text to the buttons?
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1"></button>
        <button class="btn btn-default target" id="target2"></button>
        <button class="btn btn-default target" id="target3"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4"></button>
        <button class="btn btn-default target" id="target5"></button>
        <button class="btn btn-default target" id="target6"></button>
      </div>
    </div>
  </div>
</div>
AnbuKakashi
@AnbuKakashi
Sep 12 2015 15:16
@infectiouscode between the </button> and last yellow target
so in between <button> text </button>
Jack Demynn
@infectiouscode
Sep 12 2015 15:17
ahhh I see, thankyou @AnbuKakashi
thanks @AnbuKakashi
CamperBot
@camperbot
Sep 12 2015 15:17
infectiouscode sends brownie points to @anbukakashi :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for anbukakashi
AnbuKakashi
@AnbuKakashi
Sep 12 2015 15:17
np
@Gornstats could you look at this, it seems to be bugging out :/
solved :D
didnt add animated
Jonathan Coleman
@jondcoleman
Sep 12 2015 15:32
Hi, I was wondering if I could get some help with the Make A Person Bonfire - I don't know how to initialize the bob values without exceeding the 6 object key limit test.
Here is my code:
'code'
var Person = function (firstAndLast) {
    this.setFullName = function (firstAndLast) {
        this.fullName = firstAndLast;
    }
    this.getFullName = function (firstAndLast) {
        return this.fullName;
    }
    this.setFirstName = function (first) {
        this.firstName = first;
    }
    this.getFirstName = function () {
        return this.firstName;
    }
    this.setLastName = function (last) {
        this.lastName = last;
    }
    this.getLastName = function () {
        return this.lastName;
    }

    return firstAndLast;

};
var bob = new Person('Bob Ross');
bob.getFullName();
Moisés Man
@moigithub
Sep 12 2015 15:42
@jondcoleman use private variables to hold first/last name (dont attach em to person -using this- )
( u do NOT need fullname variable )
Jonathan Coleman
@jondcoleman
Sep 12 2015 15:43
@moigithub Ok, thanks. I think I understand. I will try that.
CamperBot
@camperbot
Sep 12 2015 15:43
jondcoleman sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star: 336 | @moigithub | http://www.freecodecamp.com/moigithub
Brad cox
@bravo1c
Sep 12 2015 15:53
anyone abe to help with factoral numbers bonfire?
CamperBot
@camperbot
Sep 12 2015 15:53
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Eric Gu (@ericguuu)
@ericcgu
Sep 12 2015 15:56
i can help you @bravo1c
Brad cox
@bravo1c
Sep 12 2015 15:56
that would be a amzing
@ericcgu
i know i need a loop and to use the factorals but the thing i dont et is how to enter this in terms of on the screen, i have been trying to use loops but i cant get it to work @ericcgu
Eric Gu (@ericguuu)
@ericcgu
Sep 12 2015 15:58
can you invite me to a screenshare like screenhero or googlehangout
Brad cox
@bravo1c
Sep 12 2015 15:58
yea thats cool
Brad cox
@bravo1c
Sep 12 2015 16:05
i need to addy bud
Eric Gu (@ericguuu)
@ericcgu
Sep 12 2015 16:06
This message was deleted
tedmarley
@tedmarley100
Sep 12 2015 16:06
blob
Morning Team, i running into an issue when i try Uncommenting. This is what i got {
Dietmar Lichota
@dlichota
Sep 12 2015 16:22
This message was deleted
This message was deleted
This message was deleted
Brad cox
@bravo1c
Sep 12 2015 16:26
@ericcgu thanks for the help man
CamperBot
@camperbot
Sep 12 2015 16:26
bravo1c sends brownie points to @ericcgu :sparkles: :thumbsup: :sparkles:
:star: 187 | @ericcgu | http://www.freecodecamp.com/ericcgu
Jack Demynn
@infectiouscode
Sep 12 2015 16:39
I'm confused, ive just started the j query part and it asks me to add the element script, but when I use it like this <script> it says unexpected token?
Matěj Musil
@mckillem
Sep 12 2015 16:41
Hello, I think there is an error on Bonfire: Check for Palindrome. It suggests this: assert.strictEqual(palindrome("0_0 (: /-\ :) 0-0"), true, "\"0_0 (: /-\ :) 0-0\" is a palindrome");
"0_0 (: /-\ :) 0-0" is a palindrome: expected false to equal true
Mateja Trifunovski
@Matko95
Sep 12 2015 16:49
@mckillem It's kinda of an bad example
@mckillem but after you remove all white space, punctuations and signs it becomes a palindrome
Jack Demynn
@infectiouscode
Sep 12 2015 16:51
Can anyone help me at all please? Im really confused because it doesnt teach you how to use jquery, then expects me to know the commands?
JamesKee
@JamesKee
Sep 12 2015 16:52
@infectiouscode you type the text between the button tags :smile:
Jack Demynn
@infectiouscode
Sep 12 2015 16:53
That's been sorted now above by someone else, but thanks anyway, I posted a question above mckillem about jquery
CamperBot
@camperbot
Sep 12 2015 16:53
if you want to thank someone, put an @ before their name!
Mateja Trifunovski
@Matko95
Sep 12 2015 16:53
@infectiouscode does your code look like this <script>$(document).ready(function() { });</script>?
and it's at the top
Jack Demynn
@infectiouscode
Sep 12 2015 16:55
Oh ok, see I thought I had to do it like this: <script $(document blah blah blah,
but thanks @Matko95
CamperBot
@camperbot
Sep 12 2015 16:55
infectiouscode sends brownie points to @matko95 :sparkles: :thumbsup: :sparkles:
:star: 258 | @matko95 | http://www.freecodecamp.com/matko95
Jack Demynn
@infectiouscode
Sep 12 2015 16:56
it doesn't teach us what any of it means, and just tells us to put it in, im assuming ill learn what it means later, but surely it should teach that first otherwise i have no idea why im typing any of it
Matěj Musil
@mckillem
Sep 12 2015 16:56
@Matko95 It can't be a palindrome because it starts 0_0..... and end ....0-0
JamesKee
@JamesKee
Sep 12 2015 16:58
I've just started the ziplines, and I feel like I'm jumping out of a plane without a parachute! :smile: could people here give me some general tips about putting it all together? I'm fine with just building static stuff with html and css, but I don't really know where javascript really fits into the picture. any help would be appreciated!
Abdelaziz Mokhnache
@Abdelaziz18003
Sep 12 2015 16:58
could someone tell mes how to tweet a quote in zipline 3 ?
Mateja Trifunovski
@Matko95
Sep 12 2015 16:58
@infectiouscode <script></script> tag introduces jquery code into your html. and $(document).ready function literally says when html loads and is ready, do this code
@mckillem I sad after you remove all spaces, punctuation and signs. etc[_-/:()] and so on..
@JamesKee Are you referring to the first zipline?
JamesKee
@JamesKee
Sep 12 2015 17:00
yeah, building a personal portfolio
Tim P
@xTimpi
Sep 12 2015 17:01
Hey guys! I am trying to set my cloud9 workspace up for basejumps but I can’t finish the yeoman build process it always fails at the "What would you like to write tests with?“ question, no matter what I pick, can anyone help me with that? since its not mentioned in the tutorial video
Mateja Trifunovski
@Matko95
Sep 12 2015 17:01
@JamesKee You don't need much javascript for that one, you can add some jquery for some cool animations, but it's mostly visual stuff :) you will use javascript and jquery for other ziplines when you get to use APIs
JamesKee
@JamesKee
Sep 12 2015 17:03
ok cool, I don't really know how to add jquery stuff, or how to use APIs.....none of that was covered much in the waypoints
I guess I'll just make something really simple and add to it as my skillset gets better
thanks @Matko95 !
CamperBot
@camperbot
Sep 12 2015 17:04
jameskee sends brownie points to @matko95 :sparkles: :thumbsup: :sparkles:
:star: 259 | @matko95 | http://www.freecodecamp.com/matko95
Mateja Trifunovski
@Matko95
Sep 12 2015 17:04
@JamesKee Neither did I, but you learn through that project, grab some idea and start googling on how to do it :)
it's not really hard
gts00k
@gts00k
Sep 12 2015 17:05
any help on pomodoro app ?
JamesKee
@JamesKee
Sep 12 2015 17:06
ok cool. I'd really love to figure out how to do parallax scrolling, but that may be biting off more than I can chew :smile:
Hans van Riet
@hansinla
Sep 12 2015 17:07
@gts00k Maybe I can help
Felipe Rodrigues
@feliperdius
Sep 12 2015 17:07
Hello everybody!!!!
Matěj Musil
@mckillem
Sep 12 2015 17:07
@Matko95 Oh I misunderstood. Thanks :-)
CamperBot
@camperbot
Sep 12 2015 17:07
mckillem sends brownie points to @matko95 :sparkles: :thumbsup: :sparkles:
:star: 260 | @matko95 | http://www.freecodecamp.com/matko95
Abdelaziz Mokhnache
@Abdelaziz18003
Sep 12 2015 17:10
hi guys, could someone tell mes how to tweet a quote in zipline 3 ?
Emanuele Antonelli
@Em-Ant
Sep 12 2015 17:11
@Abdelaziz18003 read this https://dev.twitter.com/web/intents
@Abdelaziz18003 this is a little harder, but feasible https://about.twitter.com/resources/buttons
Abdelaziz Mokhnache
@Abdelaziz18003
Sep 12 2015 17:15
thanks @Em-Ant
CamperBot
@camperbot
Sep 12 2015 17:15
abdelaziz18003 sends brownie points to @em-ant :sparkles: :thumbsup: :sparkles:
:star: 332 | @em-ant | http://www.freecodecamp.com/em-ant
Jack Demynn
@infectiouscode
Sep 12 2015 17:17
Hey guys, just learning about the animated bounce thing with my buttons in jquery. Confused me, when it asks me to add the command, this is what I wrote but it's saying im doing it wrong?
<script>
  $(document).ready(function() {

  });
  $("button").addClass("animated bounce")
</script>

<!-- You shouldn't need to modify code below this line -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
marzelin
@marzelin
Sep 12 2015 17:18
@infectiouscode you need to put your code inside document ready
Jack Demynn
@infectiouscode
Sep 12 2015 17:19
I don't understand
marzelin
@marzelin
Sep 12 2015 17:19
@infectiouscode
<script>
  $(document).ready(function() {
    $("button").addClass("animated bounce");
  });
</script>
Jack Demynn
@infectiouscode
Sep 12 2015 17:20
Oh okay, thanks @marzelin
CamperBot
@camperbot
Sep 12 2015 17:20
infectiouscode sends brownie points to @marzelin :sparkles: :thumbsup: :sparkles:
:star: 179 | @marzelin | http://www.freecodecamp.com/marzelin
Jack Demynn
@infectiouscode
Sep 12 2015 17:20
Haha that's cool to see the bounce
marzelin
@marzelin
Sep 12 2015 17:21
@infectiouscode read about document ready function https://learn.jquery.com/using-jquery-core/document-ready/
Jack Demynn
@infectiouscode
Sep 12 2015 17:21
Thankyou :)
Tim P
@xTimpi
Sep 12 2015 17:31
no one here to help me with my yeoman problems? :D
jojacino
@jojacino
Sep 12 2015 17:32
What is Yeoman
If I can help, @xTimpi I will
Tim P
@xTimpi
Sep 12 2015 17:34
Its the build system used for basejumps @jojacino
Tirolês
@tiroles
Sep 12 2015 17:36
Hi guys! I have a question here about the Portfolio zipline: can we use stack overflow and bootstrap website for solutions?
Abdelaziz Mokhnache
@Abdelaziz18003
Sep 12 2015 17:40
@tiroles yes you can .. the only condition is not to look at the example source code
Jack Demynn
@infectiouscode
Sep 12 2015 17:41

Hey guys, this is my objective: Now you know three ways of targeting elements: by type: $("button"), by class: $(".btn"), and by id $("#target1").

Use each of these jQuery selectors to target your button element with the class btn and the id target1.

Use the addClass() jQuery function to give the element one new class for each selector: animated, shake, and btn-primary.

Run tests (ctrl + enter)

I'm not sure how to write it out?
Tirolês
@tiroles
Sep 12 2015 17:44
@Abdelaziz18003 nice! thanks!
CamperBot
@camperbot
Sep 12 2015 17:44
tiroles sends brownie points to @abdelaziz18003 :sparkles: :thumbsup: :sparkles:
:star: 247 | @abdelaziz18003 | http://www.freecodecamp.com/abdelaziz18003
Jack Demynn
@infectiouscode
Sep 12 2015 17:45
its really confused me.
Anyone?
taittram
@taittram
Sep 12 2015 17:49
Hi guys! I had a quick question, for the first zipline challenge, were we supposed to replicate the the portfolio page that was shown to us or to make our own personal portfolio page?
Sean Campbell
@natac13
Sep 12 2015 17:49
@infectiouscode which bonfire?
marzelin
@marzelin
Sep 12 2015 17:49
@infectiouscode use each of these ways with method .addclass()
Sean Campbell
@natac13
Sep 12 2015 17:49
or challenge?
Jack Demynn
@infectiouscode
Sep 12 2015 17:49
I'ts not a bonfire, its a waypoint
and @marzelin I'm not sure how to structure it, could you show me an example please?
marzelin
@marzelin
Sep 12 2015 17:50
@taittram do our own based on the provided portfilo
Sean Campbell
@natac13
Sep 12 2015 17:51
$("button").addClass();
 $(".btn").addClass();
 $("#target1").addClass();
marzelin
@marzelin
Sep 12 2015 17:51
@infectiouscode $('button').addClass('animated');
taittram
@taittram
Sep 12 2015 17:51
@marzelin oooooooh awesome, thanks! for some reason the wording didn't make sense to me lol
CamperBot
@camperbot
Sep 12 2015 17:51
taittram sends brownie points to @marzelin :sparkles: :thumbsup: :sparkles:
:star: 181 | @marzelin | http://www.freecodecamp.com/marzelin
Jack Demynn
@infectiouscode
Sep 12 2015 17:52
Oh okay, so I put them on different lines, I thought it was asking me to structure it into one sentence
thanks @natac13 thanks @marzelin
CamperBot
@camperbot
Sep 12 2015 17:52
infectiouscode sends brownie points to @natac13 and @marzelin :sparkles: :thumbsup: :sparkles:
:warning: infectiouscode already gave marzelin points
:star: 338 | @natac13 | http://www.freecodecamp.com/natac13
Jack Demynn
@infectiouscode
Sep 12 2015 18:02
im onto removing html elements with jquery, it asks me to remove target4, I entered this and it's incorrect? I dont know what it wants me to type after I put in .remove
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove("target4");

  });
</script>

<!-- You shouldn't need to modify code below this line -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
Sean Campbell
@natac13
Sep 12 2015 18:02
just .remove() @infectiouscode
Jack Demynn
@infectiouscode
Sep 12 2015 18:04
nothing after it?
marzelin
@marzelin
Sep 12 2015 18:05
@infectiouscode In the same way you can add classes to an element with jQuery's addClass() function, you can remove them with jQuery's removeClass() function.
Jack Demynn
@infectiouscode
Sep 12 2015 18:05
it's just usually when you add a class you put something in the brackets, it confused me when it had the brackets after .remove I didn't think they still needed to be there
thanks @marzelin and thanks @natac13
CamperBot
@camperbot
Sep 12 2015 18:05
infectiouscode sends brownie points to @marzelin and @natac13 :sparkles: :thumbsup: :sparkles:
:warning: infectiouscode already gave natac13 points
:warning: infectiouscode already gave marzelin points
marzelin
@marzelin
Sep 12 2015 18:07
@infectiouscode parentheses () mean that this is a function call, that the function will be executed
sometimes you need to provide arguments wihtin () sometimes you don't
Jack Demynn
@infectiouscode
Sep 12 2015 18:08
Awesome, how do you know when they are and aren't needeD?
marzelin
@marzelin
Sep 12 2015 18:10
@infectiouscode all you need to know is in jquery documentation http://api.jquery.com/
Cristi
@GhihanisCristianAlexandru
Sep 12 2015 18:13

Hi everyone !
I need a little help with my html "learning process" .
i am at the "Nest an Anchor Element within a Paragraph" part and i deleted a part of the text and now my first point-to-complete says "Cannot read property 'length' of null"

Can you please help me ?

marzelin
@marzelin
Sep 12 2015 18:14
find nest an anchor
CamperBot
@camperbot
Sep 12 2015 18:14
DTing
@dting
Sep 12 2015 18:14
you can hit reset code to reset the editor
Cristi
@GhihanisCristianAlexandru
Sep 12 2015 18:14
i see
i'll try and update you on the results
Ok , the problem is resolved .
Thanks for the help , and also help for the waypoint nest an anchor element within a paragraph help
CamperBot
@camperbot
Sep 12 2015 18:15
if you want to thank someone, put an @ before their name!
Cristi
@GhihanisCristianAlexandru
Sep 12 2015 18:15
Nice .
Thanks : @marzelin @camperbot @dting
CamperBot
@camperbot
Sep 12 2015 18:15
ghihaniscristianalexandru sends brownie points to @marzelin and @camperbot and @dting :sparkles: :thumbsup: :sparkles:
:star: 186 | @marzelin | http://www.freecodecamp.com/marzelin
:star: 209 | @camperbot | http://www.freecodecamp.com/camperbot
:star: 1150 | @dting | http://www.freecodecamp.com/dting
Cristi
@GhihanisCristianAlexandru
Sep 12 2015 18:16
I just thanked the camperbot . This just made my night
slertka
@slertka
Sep 12 2015 18:28
bf mutations
don't know what i'm doing wrong. any suggestions?
function mutation(arr) {
  var text = arr[0].toLowerCase();
  var con = arr[1].toLowerCase().split("");
  for ( var i = 0; i < con.length; i++ ) {
    if ( text.indexOf(con[i]) === -1 ) { return false; }
    else { return true; }
  }
}

mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu']);
CamperBot
@camperbot
Sep 12 2015 18:28
Sorry, can't find a bonfire called mutationsdont know what im doing wrong any suggestionsjsfunction mutationarr var text arr0tolowercase var con arr1tolowercasesplit for var i 0 i conlength i if textindexofconi -1 return false else return true mutationzyxwvutsrqponmlkjihgfedcba qrstu. [ Check the map? ]
Akash Chavan
@CruiseDevice
Sep 12 2015 18:32
why there are so less campers on radiostation?
Nathan Vogel
@techlock
Sep 12 2015 18:33
hey guys, in Waypoint: Declare JavaScript Variables I have no instructions it just says Program Execution FailureNo user tests were run.Unexpected token
What do I do?
Jason Wood
@catapixel
Sep 12 2015 18:34
@techlock try clearing your browser's cache
@techlock It ultimately means there's an error in your code. Also copy your code BEFORE clearing the cache or the code will be lost. Sorry should have said that first...
Deep2322
@Deep2322
Sep 12 2015 18:42

function mutation(arr) {
var elem0 = arr[0].toLowerCase();
var elem1 = arr[1].toLowerCase();

for(var i = 0; i < elem1.length; i++){
var check = elem0.indexOf(elem1[i]);
if (check === -1){
return false;
}
}
return true;
}

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

hope that helps u
slertka
@slertka
Sep 12 2015 18:50
thanks @Deep2322
CamperBot
@camperbot
Sep 12 2015 18:50
slertka sends brownie points to @deep2322 :sparkles: :thumbsup: :sparkles:
:star: 2 | @deep2322 | http://www.freecodecamp.com/deep2322
Deep2322
@Deep2322
Sep 12 2015 18:51
welcome :-)
pyramidal-neuron
@pyramidal-neuron
Sep 12 2015 18:54
hi everybody
need to test something. i think i found some bug
Intermediate Algorithm Scripting, pig latin

'''function translate(str) {
consonantLetters = "BCDFGHJKLMNPQRSTVWXZ".toLowerCase().split("");
if (consonantLetters.indexOf(str[0])!== -1) {
str += str[0];
str = str.substr(1);
} else {
str += "w";
}
if (consonantLetters.indexOf(str[0])!== -1){
translate(str);
} else {
str += "ay";
console.log(str);
return str + "ay";
}
}

translate("california");
''''

CamperBot
@camperbot
Sep 12 2015 18:56
:bulb: to format code use backticks! ``` more info
pyramidal-neuron
@pyramidal-neuron
Sep 12 2015 18:56
sory

```function translate(str) {
consonantLetters = "BCDFGHJKLMNPQRSTVWXZ".toLowerCase().split("");
if (consonantLetters.indexOf(str[0])!== -1) {
str += str[0];
str = str.substr(1);
} else {
str += "w";
}
if (consonantLetters.indexOf(str[0])!== -1){
translate(str);
} else {
str += "ay";
console.log(str);
return str + "ay";
}
}

translate("california");
```

This message was deleted
Jimmy
@Nerdherdx
Sep 12 2015 19:03
bonfire: confirm the ending
CamperBot
@camperbot
Sep 12 2015 19:03

:fire:Bonfire: Confirm the Ending :link:

function end(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor
  return str;
}

end('Bastian', 'n');

Check if a string (first argument) ends with the given target string (second argument).

more info:  bf details | bf links | hint

Jimmy
@Nerdherdx
Sep 12 2015 19:03
here's what i did

function end(str, target) {

var s = str.substr(-1);

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

if(target == s) {

  return true;

} 

}

return false;

}

function end(str, target) {
var s = str.substr(-1);

for(var i = 0; i < str.length;i++){
if(target == s) {
return true;
}

}

return false;
}

Nathan Vogel
@techlock
Sep 12 2015 19:08
Why are all the jscript instructions like this:
assert((function(){if(typeof(myLastName) !== "undefined" && typeof(myLastName) === "string" && myLastName.length > 0){return true;}else{return false;}})(), 'myLastName should be a string with a least one character in it');
Nathan Vogel
@techlock
Sep 12 2015 19:21
anyone?
Jimmy
@Nerdherdx
Sep 12 2015 19:26
bonfire: Truncate a string
CamperBot
@camperbot
Sep 12 2015 19:26

:fire:Bonfire: Truncate a string :link:

function truncate(str, num) {
  // Clear out that junk in your trunk
  return str;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);

Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.

more info:  bf details | bf links | hint

Korry Williams
@korrywill
Sep 12 2015 19:26
Anyone familiar with shift/unshift in javascript?
max77p
@max77p
Sep 12 2015 19:33
can anyone tell me how to pick the first string in an array?
i.e The grey goose is the sentence...and lets say after splitting it, we call it newarray
so now i want to use char at newarray[0]...
would it be newarray[0].charat?
DTing
@dting
Sep 12 2015 19:41
@max77p if you split the string with str.split(' ') and want the first word The you can just do
var newArray = str.split(' ');
console.log(newArray[0]);
// "The"
Jimmy
@Nerdherdx
Sep 12 2015 19:41
hint
CamperBot
@camperbot
Sep 12 2015 19:41
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Eric
@takethefifth08
Sep 12 2015 19:46
Can anyone help me out with Waypoint: Make Instances of Objects with a Constructor Function? I would really appreciate it!
Dang it was just a typo :smile:
tva10
@tva10
Sep 12 2015 19:50
Hello. Sorry for my broken English, but I have troubles with infinity loops in task. When I go to the task, code is auto-execute and browser tab breaks. I don't know how to reset task or stop it auto-executing on page.
DTing
@dting
Sep 12 2015 19:50
@datFox clear the browser cache
tva10
@tva10
Sep 12 2015 19:53
@dting Oh, great thanks
CamperBot
@camperbot
Sep 12 2015 19:53
datfox sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1151 | @dting | http://www.freecodecamp.com/dting
Korry Williams
@korrywill
Sep 12 2015 19:54
I need some assistance with waypoint 23, anybody?
max77p
@max77p
Sep 12 2015 19:57
@dting thanks
CamperBot
@camperbot
Sep 12 2015 19:57
max77p sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1152 | @dting | http://www.freecodecamp.com/dting
max77p
@max77p
Sep 12 2015 19:58
function titleCase(str) {
  var newstr=str.toLowerCase();
  var resarray=newstr.split(" ");
  var i=0;

  for(resarray[i];i<resarray.length;i++)
  {
    var first=resarray[i].charAt(0).toUpperCase();
    var replace=resarray[i].charAt(0).replace(resarray[i].charAt(0), first);
  }


  return replace;
}
titleCase("I'm a little tea pot");
@dting or anyone else, what am i doing wrong here?
var replace is not putting the array or string back together
help?
Jimmy
@Nerdherdx
Sep 12 2015 19:59
Bonfire: Chunky Monkey
CamperBot
@camperbot
Sep 12 2015 19:59

:fire:Bonfire: Chunky Monkey :link:

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

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

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

more info:  bf details | bf links | hint

Jimmy
@Nerdherdx
Sep 12 2015 19:59
hint
CamperBot
@camperbot
Sep 12 2015 19:59
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Jason Emerson
@jasone1993
Sep 12 2015 20:06
Could someone help me? New to the site. Trying to add a class for a smaller image size to my image but I can't seem to figure it out.
Not sure how to post the code here.
It's Waypoint: Size your Images.
max77p
@max77p
Sep 12 2015 20:09
@jasone1993 to post code type js at start of code then shift + enter and then at end of code and shift + enter
Jack Demynn
@infectiouscode
Sep 12 2015 20:13
@jasone1993 Have you got a link to the waypoint?
max77p
@max77p
Sep 12 2015 20:14
wiki post code
CamperBot
@camperbot
Sep 12 2015 20:14
Nathan Wind
@Nathan-Wind
Sep 12 2015 20:15
Hey guys so I went back to see what I did in one of my lessons and it was reset... but it says I finished the lesson... do your lessons not save if I clear my cache?
Jack Demynn
@infectiouscode
Sep 12 2015 20:15
@jasone1993 you're probably looking for this: .smaller-image { width:100px; }
Jason Emerson
@jasone1993
Sep 12 2015 20:15

...

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

Ah that didn't work
Jack Demynn
@infectiouscode
Sep 12 2015 20:15
@jasone1993 try what I suggested above
Jason Emerson
@jasone1993
Sep 12 2015 20:16
Ok
That was what I was trying before. Do I need a new <style> or can I put it in the one I already have?
If I do a new style, the whole thing disappears.
Jack Demynn
@infectiouscode
Sep 12 2015 20:17
You put it in the one you already have
Jason Emerson
@jasone1993
Sep 12 2015 20:17
Ah I see I was missing the class in the image.
Jack Demynn
@infectiouscode
Sep 12 2015 20:17
Anything that adds to the visuals of the page, color, font-familys etc, go inside <style> It's like a makeshift css editor
Jason Emerson
@jasone1993
Sep 12 2015 20:18
<img src="https://bit.ly/fcc-relaxing-cat"> then I added the class <img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat"> and it worked
Thanks for the help!
CamperBot
@camperbot
Sep 12 2015 20:18
if you want to thank someone, put an @ before their name!
Jack Demynn
@infectiouscode
Sep 12 2015 20:19
Thats okay :)
Jason Emerson
@jasone1993
Sep 12 2015 20:19
@infectiouscode
Jack Demynn
@infectiouscode
Sep 12 2015 20:19
for future reference, to thank its like this: thanks @jasone1993
CamperBot
@camperbot
Sep 12 2015 20:19
infectiouscode sends brownie points to @jasone1993 :sparkles: :thumbsup: :sparkles:
:star: 19 | @jasone1993 | http://www.freecodecamp.com/jasone1993
Jason Emerson
@jasone1993
Sep 12 2015 20:20
thanks @infectiouscode
CamperBot
@camperbot
Sep 12 2015 20:20
jasone1993 sends brownie points to @infectiouscode :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for infectiouscode
Jason Emerson
@jasone1993
Sep 12 2015 20:20
I see.
Jack Demynn
@infectiouscode
Sep 12 2015 20:20
And for when your placing code in the future
type ```
then shift enter
copy the code into the space between both of the ```
then hit ctrl enter
Jason Emerson
@jasone1993
Sep 12 2015 20:21
Let me try it real fast just make sure I got it.
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
max77p
@max77p
Sep 12 2015 20:21
@infectiouscode could you help me with something?
Jack Demynn
@infectiouscode
Sep 12 2015 20:21
There yah go :)
Jason Emerson
@jasone1993
Sep 12 2015 20:21
ok got it!
max77p
@max77p
Sep 12 2015 20:21

```js
function titleCase(str) {
var newstr=str.toLowerCase();
var resarray=newstr.split(" ");
var i=0;
var final="";

for(resarray[i];i<resarray.length;i++)
{
var first=resarray[i].charAt(0).toUpperCase();
var replace=resarray[i].replace(resarray[i].charAt(0), first);
resarray[i].push(replace);
}

return resarray;
}

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

Jack Demynn
@infectiouscode
Sep 12 2015 20:21
@max77p I can try but I'm only on Javascript myself :)
max77p
@max77p
Sep 12 2015 20:21
oops
Jack Demynn
@infectiouscode
Sep 12 2015 20:22
Yeah you're ahead of me @max77p haha,
max77p
@max77p
Sep 12 2015 20:22
function titleCase(str) {
  var newstr=str.toLowerCase();
  var resarray=newstr.split(" ");
  var i=0;
  var final="";

  for(resarray[i];i<resarray.length;i++)
  {
    var first=resarray[i].charAt(0).toUpperCase();
    var replace=resarray[i].replace(resarray[i].charAt(0), first);
    resarray[i].push(replace);
  }


  return resarray;
}

titleCase("I'm a little tea pot");
oh damn
ok thanks anyway...for anyone else who is ahead, i can't seem to figure out how to get all the words together again
CamperBot
@camperbot
Sep 12 2015 20:22
if you want to thank someone, put an @ before their name!
Jack Demynn
@infectiouscode
Sep 12 2015 20:23
Thats alright :)
DTing
@dting
Sep 12 2015 20:23
function titleCase(str) {
  var newstr=str.toLowerCase();
  var resarray=newstr.split(" ");
  var final=[];

  for(var i = 0;i<resarray.length;i++)
  {
    var first=resarray[i].charAt(0).toUpperCase();
    var replace=resarray[i].replace(resarray[i].charAt(0), first); 
    final.push(replace);
  }
  return final.join(' ');
}
max77p
@max77p
Sep 12 2015 20:25
@dting to declare an empty var its []?
DTing
@dting
Sep 12 2015 20:25

you could also change:

    var replace=resarray[i].replace(resarray[i].charAt(0), first);

to

  var replace = resarray[i][0].toUpperCase() + resarray[i].slice(1);
no i declared a variable final and assigned an empty array to it
max77p
@max77p
Sep 12 2015 20:26
ahhh empty array i see
DTing
@dting
Sep 12 2015 20:26
i have some notes on that bonfire if you want to take a look
max77p
@max77p
Sep 12 2015 20:28
@dting notes on bonfire? a) thanks! and b) are you part of code academy or can anyone do this?
CamperBot
@camperbot
Sep 12 2015 20:28
max77p sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: max77p already gave dting points
DTing
@dting
Sep 12 2015 20:29
no i just took some notes to help people learning
max77p
@max77p
Sep 12 2015 20:30
cool thanks
CamperBot
@camperbot
Sep 12 2015 20:30
if you want to thank someone, put an @ before their name!
Nathan Wind
@Nathan-Wind
Sep 12 2015 20:31
How about this one guys...

function factorialize(num) {
return num = 1 2 3 4 5
}

factorialize(5);

max77p
@max77p
Sep 12 2015 20:31
@dting as one of the users above asked, how come when we go back to completed bonfires the completed work doesnt showup
does it save somewhere else?
DTing
@dting
Sep 12 2015 20:31
they are saved in your profile page
@Nathan-Wind you either need a loop or you can use recursion
Nathan Wind
@Nathan-Wind
Sep 12 2015 20:36
I logged in at they were saved strangely I'll look again
thanks I'll look into loop
CamperBot
@camperbot
Sep 12 2015 20:36
if you want to thank someone, put an @ before their name!
Jack Demynn
@infectiouscode
Sep 12 2015 20:38
Hey guys, dunno where to put the lastName.length, to check the length of the last name in this code?
var firstNameLength = 0;
var lastNameLength = 0;
var firstName = "Ada";

firstNameLength = firstName.length;

var lastName = "Lovelace"; 

// don't change code above here

lastNameLength = lastName;



// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
// You'll learn about functions soon.
if(typeof(lastNameLength) !== "undefined"){(function(){return lastNameLength;})();}
Nevermind I got it!
Scuse my language but these fucking variables are difficult.
max77p
@max77p
Sep 12 2015 20:43
@infectiouscode is this a bonfire?
Jack Demynn
@infectiouscode
Sep 12 2015 20:44
No it's one of the first few waypoints in javascript ive done the one im on now, but I failed maths at school so its mega hard
slertka
@slertka
Sep 12 2015 20:44
@infectiouscode they want you to change
lastNameLength = lastName;
look at the firstNameLength example
Jack Demynn
@infectiouscode
Sep 12 2015 20:45
Yeah I've got it now bud :)
slertka
@slertka
Sep 12 2015 20:45
Oh! I see that now :)
Jack Demynn
@infectiouscode
Sep 12 2015 20:45
:P
James
@jamesagwa
Sep 12 2015 20:49
Having issue with this Bonfire: Search and Destroy challenge. Can't figure out my code errors now. Anybody?..
function destroyer(arr) {
  // Remove all the values
  var newArray, args, c, i,max;

 arr = arguments[0];
 args = Array.prototype.slice.call(arguments,1);
 max = args.length;

  newArray = arr.filter(function(x){
    for(i = 0; i<max; i++){
     c = args[i];
    }

    return x !== c;

   });

  arr = newArray;
  return arr;
}
slertka
@slertka
Sep 12 2015 20:52
Try using indexOf to filter the arguments
AnbuKakashi
@AnbuKakashi
Sep 12 2015 20:57
guys i need a bit of help with arrays
Rex Schrader
@SaintPeter
Sep 12 2015 20:57
@AnbuKakashi I can help
AnbuKakashi
@AnbuKakashi
Sep 12 2015 20:57
anyone in the mood?
sure ill explain in a sec
DTing
@dting
Sep 12 2015 20:58

@jamesagwa

   for(i = 0; i<max; i++){
     c = args[i];
    }

this replaces c every iteration

AnbuKakashi
@AnbuKakashi
Sep 12 2015 20:58
@SaintPeter im not sure i understand this correctly
DTing
@dting
Sep 12 2015 20:58
so you just end up with the last value when the loop finishes
AnbuKakashi
@AnbuKakashi
Sep 12 2015 20:59
i need to remove a nested aray
so that only john and 23 remain
Rex Schrader
@SaintPeter
Sep 12 2015 20:59
@AnbuKakashi I don't know where you came up with numbers - You're supposed to be popping off the top of myArray
AnbuKakashi
@AnbuKakashi
Sep 12 2015 20:59
im really not sure what to pop thats the point
oh i think i got smthn
DTing
@dting
Sep 12 2015 21:00
you want to set a variable something like:
  newArray = arr.filter(function(x){
    var destroy = false;
    for(i = 0; i<max; i++){
      if ( x === args[i]) {
        destroy = true;
      }
    }
    return destroy;
   });
AnbuKakashi
@AnbuKakashi
Sep 12 2015 21:01
@SaintPeter thank you i did it :D
CamperBot
@camperbot
Sep 12 2015 21:01
anbukakashi sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 591 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Sep 12 2015 21:01
@AnbuKakashi :D
AnbuKakashi
@AnbuKakashi
Sep 12 2015 21:02
but i do have to admit for a newbie those explanations are sometimes lackluster
Rex Schrader
@SaintPeter
Sep 12 2015 21:02
@AnbuKakashi That one in particular is kinda confusing. Lots of people have problems with it.
AnbuKakashi
@AnbuKakashi
Sep 12 2015 21:03
yeah i should guess that the whole nested array is that 3rd elemnt to be removed
while they show a simple number example
James
@jamesagwa
Sep 12 2015 21:06
@dting Yeah, you're rigth about my for loop. but i tried your solution, and i noticed that i was getting the reverse of what i wanted.
DTing
@dting
Sep 12 2015 21:06
oops
James
@jamesagwa
Sep 12 2015 21:07
@dting Here's the full code with your solution added
function destroyer(arr) {
  // Remove all the values
  var newArray, args, c, i,max;

 arr = arguments[0];
 args = Array.prototype.slice.call(arguments,1);
 max = args.length;

  newArray = arr.filter(function(x){   
    var destroy = false;
    for(i = 0; i<max; i++){
      if ( x === args[i]) {
        destroy = true;
      }
    }
    return destroy;
   });

  arr = newArray;
  return arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
DTing
@dting
Sep 12 2015 21:07
just reverse the true and false
probably rename the variable
or
return !destroy instead of destroy
James
@jamesagwa
Sep 12 2015 21:09
@dting Yeah, right, !destroy should do. should have thought of that, am having a hot head here. Works now. Thanks a bunch
CamperBot
@camperbot
Sep 12 2015 21:09
jamesagwa sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1154 | @dting | http://www.freecodecamp.com/dting
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:30
<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" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
How do I do this:
Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.
Master Builder
@McGowanC
Sep 12 2015 21:32
ignis
do you have a form element yet?
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:33
I don't even know what that is.
Master Builder
@McGowanC
Sep 12 2015 21:33
so examples of other elements that you have in your code are <ol> and <li> and <h2>
James
@jamesagwa
Sep 12 2015 21:34
Thanks @Rafase282 and @rahul1992
CamperBot
@camperbot
Sep 12 2015 21:34
jamesagwa sends brownie points to @rafase282 and @rahul1992 :sparkles: :thumbsup: :sparkles:
:star: 178 | @rahul1992 | http://www.freecodecamp.com/rahul1992
:star: 428 | @rafase282 | http://www.freecodecamp.com/rafase282
Master Builder
@McGowanC
Sep 12 2015 21:34
@IgnisCerebrum here is the related article http://www.w3schools.com/html/html_elements.asp
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:35

@wcrm This is all it says:
You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.

For example: <form action="/url-where-you-want-to-submit-form-data"></form>.

Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.

Master Builder
@McGowanC
Sep 12 2015 21:35
so basically it's asking you to put a text field in between the opening and closing <form> tags
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:35
I understand what an element is.
Master Builder
@McGowanC
Sep 12 2015 21:35
which one are you on?
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:36
Waypoint Create a Form Element
If I add their example, only using submit-cat-photo, it doesn't say it is correct.
Master Builder
@McGowanC
Sep 12 2015 21:37
ok hang tight I'm going to do it quickly
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:37
Okay.
Here is what I tried:
<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" src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<input type="text" placeholder="cat photo URL">
<form action="/submit-cat-photo"></form>
Master Builder
@McGowanC
Sep 12 2015 21:37
ok so you're almost there!
the key part your missing is where they ask you to "nest" your input into your form element
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:38
This is the part it says I haven't done: Nest your text input element within a form element.
Master Builder
@McGowanC
Sep 12 2015 21:38
do you know what nesting is?
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:38
Right. I don't understand where to nest it. Nesting is putting it within another element?
Master Builder
@McGowanC
Sep 12 2015 21:38
yes!
so if they ask you to nest your <input> within your <form></form> where would you put it?
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:40
Oh brother. The word "text" was throwing me off. There is a lot of text. :P
Thanks @wcrm
CamperBot
@camperbot
Sep 12 2015 21:40
igniscerebrum sends brownie points to @wcrm :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for wcrm
Jesse
@jctm30
Sep 12 2015 21:41
hello all, can someone help explain what this new boolean does?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
Master Builder
@McGowanC
Sep 12 2015 21:41
no problem, did you get it?
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:41
Yes, thank you so much. :)
CamperBot
@camperbot
Sep 12 2015 21:41
if you want to thank someone, put an @ before their name!
Master Builder
@McGowanC
Sep 12 2015 21:41
totally, glad to be of help
yeah sometimes it's just worded a bit weird for your brain lol
I've had that happen a million times
IgnisCerebrum
@IgnisCerebrum
Sep 12 2015 21:43
I swear, when I'm done with the course, I want to get them to hire me to edit the site so the directions are clearer. I'm very literal; I can't be the only one! ;)
Master Builder
@McGowanC
Sep 12 2015 21:43
hahaha totally agree
I wish there was a little refresh button that said "ask me to do this a different way"
@jctm30 unfortunately I have no idea :(
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#target1").parent().css("background-color", "red");
    $("#right-well").children().css("color", "green");
    $(".well:nth-child(2)").addClass("animated bounce");
  });
</script>
anyone know why my nth-child() isn't working to bounce the second child of my well class?
Master Builder
@McGowanC
Sep 12 2015 21:50
figured it out, the example doesn't include a space before :nth-child where there should be one
hopefully that bug gets updated sometime soon
Robert Waddington
@RobbWaddington
Sep 12 2015 22:12
I'm on Bonfire: Factorialize a Number and I don't get how you get 0 to return 1
welp, one stupid test later and I figured that out
Master Builder
@McGowanC
Sep 12 2015 22:13
how did you test it?
Robert Waddington
@RobbWaddington
Sep 12 2015 22:14
I threw 0 in place of 1 in my if( num == 1) loop
that worked
Master Builder
@McGowanC
Sep 12 2015 22:15
can I see your code? I just did that bonfire and did it differently
Robert Waddington
@RobbWaddington
Sep 12 2015 22:15
```
woops
function factorialize(num) {
  if(num == 0) {
    return 1;
  }
  else{
    return num*factorialize(num-1);
  }

  return num;
}

factorialize(5);
recursion
Master Builder
@McGowanC
Sep 12 2015 22:17
oh ok that's basically mine too
function factorialize(x) {
   if(x==0) {
      return 1;
   }
   return x * factorialize(x-1);
}

factorialize(5);
Robert Waddington
@RobbWaddington
Sep 12 2015 22:18
yea, I did some googling because I had no idea how to phrase that math, found a thing that was almost what I had
made a few changes and got what you see now
Tzahi
@Tzahile
Sep 12 2015 22:20
Hi everybody, I don't know if it's the late hour, but I don't know what I did wrong with the array.filter
Robert Waddington
@RobbWaddington
Sep 12 2015 22:20
I can't say that I am looking forward to doing this palindrome thing
Tzahi
@Tzahile
Sep 12 2015 22:21
var val = arr.shift();
  for (var i=0; i<arr.length; i++){
    val = val.filter(function(ere){
      return (arr[i]!==ere);
    });
  }
  return arr;
this keeps on telling me val.filter is not a function
what did I miss?
Master Builder
@McGowanC
Sep 12 2015 22:22
haha me either
@Tzahile ask in hte main freecodecamp chat
you'll get a faster response ther
e
Robert Waddington
@RobbWaddington
Sep 12 2015 22:23
it looks like it doesn't like something about your parantheses
Eric Gu (@ericguuu)
@ericcgu
Sep 12 2015 22:23
@Tzahile you shouldn't put functions in a loop
Alex
@wishe
Sep 12 2015 22:24
bf where do i belong
CamperBot
@camperbot
Sep 12 2015 22:24

:fire:Bonfire: Where do I belong :link:

function where(arr, num) {
  // Find my place in this sorted array.
  return num;
}

where([40, 60], 50);

Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).

more info:  bf details | bf links | hint

Alex
@wishe
Sep 12 2015 22:24
hint
CamperBot
@camperbot
Sep 12 2015 22:24
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Ghost
@ghost~55ee52540fc9f982beaff6cd
Sep 12 2015 22:31
bf factorialize a number
CamperBot
@camperbot
Sep 12 2015 22:31

:fire:Bonfire: Factorialize a Number :link:

function factorialize(num) {
  return num;
}

factorialize(5);

Return the factorial of the provided integer.

more info:  bf details | bf links | hint

Ghost
@ghost~55ee52540fc9f982beaff6cd
Sep 12 2015 22:31
hint
CamperBot
@camperbot
Sep 12 2015 22:31
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Ghost
@ghost~55ee52540fc9f982beaff6cd
Sep 12 2015 22:31
bf links
CamperBot
@camperbot
Sep 12 2015 22:31
amir cohen
@amir0900
Sep 12 2015 22:39
hey guys
Ruey
@Ruey
Sep 12 2015 22:49
sup all
Mateja Trifunovski
@Matko95
Sep 12 2015 22:54
heya
amir cohen
@amir0900
Sep 12 2015 22:55

'''
var Car = function() {
this.wheels = 4;
};

// Only change code below this line.
var myCar = new Car();

//Add the property "engines" to myCar, and make it a number.

// Only change code above this line.
(function() {return JSON.stringify(myCar);})();
'''

CamperBot
@camperbot
Sep 12 2015 22:55
:bulb: to format code use backticks! ``` more info
amir cohen
@amir0900
Sep 12 2015 22:56
var Car = function() {
   this.wheels = 4;
};

// Only change code below this line.
var myCar = new Car();

//Add the property "engines" to myCar, and make it a number.


// Only change code above this line.
(function() {return JSON.stringify(myCar);})();
any 1 can help?
Rafael J. Rodriguez
@Rafase282
Sep 12 2015 23:05
which waypoint is that?
Abhisek Pattnaik
@abhisekp
Sep 12 2015 23:08

Git Issue

After rebasing some branches, I've got some hanging references. How to clean up?
Shaun Hutchins
@shaun10
Sep 12 2015 23:08
myCar.engines = 1;
@amir0900 myCar.engines = 1;
Bryan Sweeney
@neskowinstump
Sep 12 2015 23:10
@shaun10 could you explain why? I don't understand what I'm supposed to be learning in this example.
I guess I don't understand what the constructor function is and which object we are making an instance of
Abhisek Pattnaik
@abhisekp
Sep 12 2015 23:13
:point_up: September 13, 2015 4:38 AM
I guess that was a gitk GUI issue. :(
Mateja Trifunovski
@Matko95
Sep 12 2015 23:27
jesus Bonfire: Smallest Common Multiple gave me alot of trouble :D
Rory Smith
@alanbuchanan
Sep 12 2015 23:31
@Matko95 i too found it difficult
Shaun Hutchins
@shaun10
Sep 12 2015 23:31
@neskowinstump you are trying to add attributes to an object that has already been constructed
sometimes you don’t make everything at time of construction
Mateja Trifunovski
@Matko95
Sep 12 2015 23:31
@alanbuchanan euclidean algorithm helped alot though :D
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:33

function palindrome(str) {function palindrome(str) {
/ remove special characters, spaces and make lowercase/
var removeChar = str.replace(/[^A-Z0-9]/ig, "").toLowerCase();
/ reverse removeChar for comparison/
var checkPalindrome = removeChar.split('').reverse().join('');

if(removeChar === checkPalindrome){

document.write(str + "is a palindrome")}
else {document.write(str + "not a palindrome");
}}

{
palindrome('"eye"')
palindrome('"not a palindrome"')
palindrome('"Nope"')
palindrome('"almostomla"')
palindrome('"1 eye for 1 eye"')}

// Good luck!
return true;
}

^ anyone?
(this is for the palendrome algo)
wontoan
@wontoan
Sep 12 2015 23:34
This message was deleted
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:35
don;t think I was suppose to write it though because when i try to get back into the exercise my screen just prints out the code and I can;t see the exercise! yikes
I broke FCC
Mateja Trifunovski
@Matko95
Sep 12 2015 23:36
you could go into another browser
wontoan
@wontoan
Sep 12 2015 23:36
o.o?
Rory Smith
@alanbuchanan
Sep 12 2015 23:37
@Matko95 i couldn't get my head around the euclidean algorithm
Batman
@complexsion
Sep 12 2015 23:37

var myArray = ["John", 23, ["cat", 2]];
// Only change code below this line.
myArray.pop();
var removed = myArray; // This should be ["cat", 2] and myArray should now be ["John", 23]

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
// You'll learn about functions soon.
(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z);})(myArray, removed);

not showing the removed and instructions dont instruct
Mateja Trifunovski
@Matko95
Sep 12 2015 23:38
@alanbuchanan Wikipedia has several ways of implementing it, explained with pseudocode
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:39
@Matko95 yeah I'll try... how would I avoid this? just ahve it "return" not write?
Rory Smith
@alanbuchanan
Sep 12 2015 23:39
@Matko95 wish i'd seen that
SojournerOctocat
@SojournerOctocat
Sep 12 2015 23:39
@complexsion var removed = myArray.pop()
Batman
@complexsion
Sep 12 2015 23:40
@SojournerOctocat thank you
CamperBot
@camperbot
Sep 12 2015 23:40
complexsion sends brownie points to @sojourneroctocat :sparkles: :thumbsup: :sparkles:
:star: 282 | @sojourneroctocat | http://www.freecodecamp.com/sojourneroctocat
Jesse
@jctm30
Sep 12 2015 23:41
hi guys,
Rory Smith
@alanbuchanan
Sep 12 2015 23:46
arguments refers to whatever is passed into the function
it might be useful if referring to more items than expected
@jctm30 run this - if you want to refer to a or b you can do so by their name. but what if more arguments are passed in, for whatever reason? well, you can refer to them with arguments
wontoan
@wontoan
Sep 12 2015 23:53
@jctm30 I'm a bit of a weirdo but I like to imagine arguments as a person responsible for keeping track of my parameters. I can pass him/her as many parameters I want and when I ask for the arguments he/she will tell me how many there are arguments.length, what order they are in console.log(arguments) and i can request the one I want using array-like syntax arguments[0], arguments[1], and so on
#newblife
Mateja Trifunovski
@Matko95
Sep 12 2015 23:55
@Nathan-Wind it could be that
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:55
ok I did this but still not working

function palindrome(str) {
/ remove special characters, spaces and make lowercase/
var removeChar = str.replace(/[^A-Z0-9]/ig, "").toLowerCase();
/ reverse removeChar for comparison/
var checkPalindrome = removeChar.split('').reverse().join('');}

if (removeChar === checkPalindrome){

return true;}

else {
return false;
}

{
palindrome('"eye"')
palindrome('"not a palindrome"')
palindrome('"Nope"')
palindrome('"almostomla"')
palindrome('"1 eye for 1 eye"')}

}

@Matko95 see anything?
Mateja Trifunovski
@Matko95
Sep 12 2015 23:57
@Nathan-Wind Are you sure your RegEx works?
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:57
lol no
I'll take a better look
Rory Smith
@alanbuchanan
Sep 12 2015 23:59
@Nathan-Wind your regex is fine, but you need to fix your brackets
Nathan Wind
@Nathan-Wind
Sep 12 2015 23:59
@Matko95 but after i changed it from writing to just return it changed the error to Program Execution FailureNo user tests were run.