These are chat archives for FreeCodeCamp/Help

24th
Aug 2015
Jacob Jordan
@jjordan88
Aug 24 2015 00:04
Also, once you've defined var lower like that, you can then do "reverse = lower.split...." (all the properties of lower will carry over into reverse).
If you haven't already done it that way, that is.
Patrick
@CallejaGit
Aug 24 2015 00:10
Hey everyone
I'm struggling with the Longest Word
Rachel
@noeladd
Aug 24 2015 00:11
@TheSubject Just started that one, I’m struggling a bit too. I know how to split the words into an array but I’m not sure of the best way to compare length.
ShortWaveLengthSubset
@ShortWaveLengthSubset
Aug 24 2015 00:11
Anyone know of a good way to reset the content of a Waypoint without going to the page?
Jacob Jordan
@jjordan88
Aug 24 2015 00:11
Yep, that one's a killer @TheSubject !
What's your code look like?
DTing
@dting
Aug 24 2015 00:12
@drscogin clear your browser cache
Patrick
@CallejaGit
Aug 24 2015 00:12
@noeladd Yeah, for comparing the length I tried to d oa for loop
Yihan Wang
@yihanwang91
Aug 24 2015 00:12
@drscogin Click the green Reset button
Jacob Jordan
@jjordan88
Aug 24 2015 00:12
Is that your problem too, @noeladd ?
Here's a hint: When counting through the array, you need something to test against for comparison.
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:13
function largestOfFour(arr) {
var largestArr = [];
console.log("Length of array: " + arr.length);
// This for loop only runs once!
for (i=0; i<arr.length; i++) {
console.log("Current array: " + arr[i]);
console.log("Current index: " + i);
largestArr.push(largestOfArray(arr[i]));
}
return largestArr;
}
For some reason the for loop only runs once, any help guys?
Length of array: 4
Rachel
@noeladd
Aug 24 2015 00:13
@jjordan88 Yeah that’s my problem as well. Thanks for the hint.
CamperBot
@camperbot
Aug 24 2015 00:13
noeladd sends brownie points to @jjordan88 :sparkles: :thumbsup: :sparkles:
:warning: noeladd already gave jjordan88 points
DTing
@dting
Aug 24 2015 00:14
This message was deleted
Jacob Jordan
@jjordan88
Aug 24 2015 00:14
So if you come across a word that's 4 in length, let's say, you need to be able to say "OK, that's the biggest word in the array so far... let's keep that and compare that to all the other words and see if it's the biggest or not".
DTing
@dting
Aug 24 2015 00:14
@samash @samash is largestOfArray a function declared somewhere else?
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:15
function largestOfFour(arr) {
  var largestArr = [];
  console.log("Length of array: " + arr.length);
  // This for loop only runs once!
  for (i=0; i<arr.length; i++) { 
      console.log("Current array: " + arr[i]);
      console.log("Current index: " + i);
    largestArr.push(largestOfArray(arr[i]));
  }
  return largestArr;
}
Jacob Jordan
@jjordan88
Aug 24 2015 00:15
No worries. I really had trouble with this one, so if I can help you guys out with it at all, I will.
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:15
@dting Yes!
DTing
@dting
Aug 24 2015 00:15
@samash what's that code look like?
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:15
function largestOfArray(arr) {
// //   //Returns the largest number in an array
     var largest=0;
    for (i=0; i<arr.length; i++) {
        if (arr[i] > largest) largest = arr[i];
    }
    return largest;
}
Here's the whole code:
function largestOfFour(arr) {
  var largestArr = [];
  console.log("Length of array: " + arr.length);
  // This for loop only runs once!
  for (i=0; i<arr.length; i++) { 
      console.log("Current array: " + arr[i]);
      console.log("Current index: " + i);
    largestArr.push(largestOfArray(arr[i]));
  }
  return largestArr;
}


function largestOfArray(arr) {
//Returns the largest number in an array
     var largest=0;
    for (i=0; i<arr.length; i++) {
        if (arr[i] > largest) largest = arr[i];
    }
    return largest;
}
console.log(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]));
Patrick
@CallejaGit
Aug 24 2015 00:17
@jjordan88 Im putting a If statement nested within the for loop. It's basically comparing the current word, with the next word. Tho it's not running
Rachel
@noeladd
Aug 24 2015 00:17
@jjordan88 @TheSubject This is what I have started so far. Working on figuring out what to put to compare.
function findLongestWord(str) {
  array = str.split(" "); 

  var longest ="";

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

  }
  return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:17
hi folks, i'm stuck on the last beginner front end zipline--cross-site HTTP request problem, maybe there is a better way to access the twitch.tv API
DTing
@dting
Aug 24 2015 00:18
@samash it's because you are using a global i
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:18
error is...XMLHttpRequest cannot load https://api.twitch.tv/kraken/streams/freecodecamp. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
DTing
@dting
Aug 24 2015 00:18
put var before i's in your for loop
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:18
thanks!!! I forgot to use var!!
CamperBot
@camperbot
Aug 24 2015 00:18
if you want to thank someone, put an @ before their name!
Samrat Shiwakoti
@samratrocks
Aug 24 2015 00:18
@dting Thanks!
DTing
@dting
Aug 24 2015 00:18
@ZebGirouard you need to use jsonp
@samash nps
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:20
thanks @dting , digging through the doc online now
CamperBot
@camperbot
Aug 24 2015 00:20
zebgirouard sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 609 | @dting | http://www.freecodecamp.com/dting
Charles Milam
@CharlesMilam
Aug 24 2015 00:20
@dting nice catch!
Yihan Wang
@yihanwang91
Aug 24 2015 00:20
@noeladd It might be helpful to have a variable that stores length
Jacob Jordan
@jjordan88
Aug 24 2015 00:20
OK. First, @TheSubject , that's what you need to do. Post your code though, otherwise we can't see why it's not running!
Adam
@shadmanwicked
Aug 24 2015 00:21
I could use some help on the Local Weather Zipline, but it's more CSS -> div help I need I think
Yihan Wang
@yihanwang91
Aug 24 2015 00:21
@noeladd Then update that variable if you find a longer String
Rachel
@noeladd
Aug 24 2015 00:21
Ok I figured it out and I passed. Thanks again @jjordan88 it was actually easier than I thought!
CamperBot
@camperbot
Aug 24 2015 00:21
noeladd sends brownie points to @jjordan88 :sparkles: :thumbsup: :sparkles:
DTing
@dting
Aug 24 2015 00:21
bf longest
CamperBot
@camperbot
Aug 24 2015 00:21
:warning: noeladd already gave jjordan88 points

:fire:Bonfire: Find the Longest Word in a String :link:

function findLongestWord(str) {
  return str.length;
}

findLongestWord('The quick brown fox jumped over the lazy dog');

Return the length of the longest word in the provided sentence.

more info:  bf details | bf links | hint

DTing
@dting
Aug 24 2015 00:21
bf links
CamperBot
@camperbot
Aug 24 2015 00:21
Jacob Jordan
@jjordan88
Aug 24 2015 00:22
Second, @noeladd, another hint: Longest should be a number rather than a string. Oh, and stick a var before array up at the top. You need your if statement inside your loop, but you're really close - don't give up!
Adam
@shadmanwicked
Aug 24 2015 00:22
I can't for the life of me figure out how to get rid of the white box at the top of the page http://codepen.io/shadman/full/VLJqMR/
Jacob Jordan
@jjordan88
Aug 24 2015 00:22
Oh!
Patrick
@CallejaGit
Aug 24 2015 00:22

'''function findLongestWord(str) {
//Converts string into Array of words.
str=str.split(/\s/);

//New variable to hold the longest word
var word="";

//loop that goest throught each element in the array
for (var i=0; i<str.length; i++) { if (str[i].length>str[i+1].length)
{
word=str[i];
}
}
return str.length;

CamperBot
@camperbot
Aug 24 2015 00:22
:bulb: to format code use backticks! ``` more info
Jacob Jordan
@jjordan88
Aug 24 2015 00:22
haha
Well congrats! :+1:
DJ
@qualitymanifest
Aug 24 2015 00:22

I'm able to complete this waypoint, but this math logic doesn't make sense to me:

Math.floor(Math.random() * (1 - 0 + 1)) + 0;

why bother with (1-0+1)? isn't that just 2? also why +0? appreciate any help

Jacob Jordan
@jjordan88
Aug 24 2015 00:23
Three backticks, then shift + enter to make the code show up @TheSubject
DTing
@dting
Aug 24 2015 00:23
@shadmanwicked use background image on body http://codepen.io/dting/pen/pJMgVP
Patrick
@CallejaGit
Aug 24 2015 00:23

'''
function findLongestWord(str) {
//Converts string into Array of words.
str=str.split(/\s/);

//New variable to hold the longest word
var word="";

//loop that goest throught each element in the array
for (var i=0; i<str.length; i++) { if (str[i].length>str[i+1].length)
{
word=str[i];
}
}
return str.length;
'''

CamperBot
@camperbot
Aug 24 2015 00:23
:bulb: to format code use backticks! ``` more info
Yihan Wang
@yihanwang91
Aug 24 2015 00:24
@qualitymanifest The 0s really aren't necessary
@qualitymanifest It's just trying to illustrate how you can specify min/max
Adam
@shadmanwicked
Aug 24 2015 00:24
Thanks @dting
CamperBot
@camperbot
Aug 24 2015 00:24
shadmanwicked sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 610 | @dting | http://www.freecodecamp.com/dting
DJ
@qualitymanifest
Aug 24 2015 00:24
@yihanwang91 Thanks, glad i'm not losing it here
CamperBot
@camperbot
Aug 24 2015 00:24
qualitymanifest sends brownie points to @yihanwang91 :sparkles: :thumbsup: :sparkles:
:star: 217 | @yihanwang91 | http://www.freecodecamp.com/yihanwang91
Jacob Jordan
@jjordan88
Aug 24 2015 00:25
OK, some hints @TheSubject :smile:
Yihan Wang
@yihanwang91
Aug 24 2015 00:25
@qualitymanifest In this case generate random number between 0 and 2
Jacob Jordan
@jjordan88
Aug 24 2015 00:26
First, fix your formatting, dude! It'll run if you pass the test, but the way it is now is super hard to read / fix for bugs in the meantime.
DTing
@dting
Aug 24 2015 00:26
function findLongestWord(str) {
  //Converts string into Array of words.
  str=str.split(/\s/);
  //New variable to hold the longest word
  var word="";
  //loop that goest throught each element in the array
  for (var i=0; i<str.length; i++) { 
    if (str[i].length>str[i+1].length) { // you aren't comparing this to current longest word you are just comparing str[i] and str[i+1]
      word=str[i];
    }
  }
  return str.length; // probably want to return something else
}
Patrick
@CallejaGit
Aug 24 2015 00:27
@dting lol thank you
CamperBot
@camperbot
Aug 24 2015 00:27
thesubject sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 611 | @dting | http://www.freecodecamp.com/dting
Jacob Jordan
@jjordan88
Aug 24 2015 00:27
Second, var word should = 0 instead of an empty string.
Third.... well, @dting just beat me to it. :D
DTing
@dting
Aug 24 2015 00:28
@jjordan88 it's not technically incorrect to track the word. you do extra length lookups but tracking the actual word works
Patrick
@CallejaGit
Aug 24 2015 00:28
@jjordan88 lol yeah still new to this :P
Jacob Jordan
@jjordan88
Aug 24 2015 00:28
Oh! Shoot, shows what I know. lol
No worries, man. I'm new, too.... you'll see me asking for help a lot, so don't feel like I'm lecturing!
@dting did a really good job of explaining steps to take to fix your stuff - read his comments! I'm gonna get back on my own bonfire... conquest waits for no one!
Mark Williams
@mw8020
Aug 24 2015 00:31
how to clear bonfire answer
Patrick
@CallejaGit
Aug 24 2015 00:31
@jjordan88 alright thanks!
CamperBot
@camperbot
Aug 24 2015 00:31
thesubject sends brownie points to @jjordan88 :sparkles: :thumbsup: :sparkles:
:star: 214 | @jjordan88 | http://www.freecodecamp.com/jjordan88
Rex Schrader
@SaintPeter
Aug 24 2015 00:32
@mw8020 There is a 'reset' button under the 'run' button
Mark Williams
@mw8020
Aug 24 2015 00:32
Thanks @SaintPeter
CamperBot
@camperbot
Aug 24 2015 00:32
mw8020 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 295 | @saintpeter | http://www.freecodecamp.com/saintpeter
Jacob Jordan
@jjordan88
Aug 24 2015 00:33
@SaintPeter Is there a way to clear duplicate solutions on your portfolio page? Every time I proceed to the next challenge, it adds another instance of the passed one... I have like 2 or 3 of each. Lots of clutter.
Rex Schrader
@SaintPeter
Aug 24 2015 00:33
@jjordan88 Nope - they're there forever.
Jacob Jordan
@jjordan88
Aug 24 2015 00:34
Ah, I was afraid of that. It looks really bad. Maybe they'll fix it in an update. Anyway, I'm really going this time. Night everybody!
Mark Williams
@mw8020
Aug 24 2015 00:34
@SaintPeter I saw somewhere where you mentioned to go thru them again after doing the section on functional programming
@jjordan88 same here - mine look very cluttered now :smile:
Yihan Wang
@yihanwang91
Aug 24 2015 00:34
About to start Ziplines. Any general advice, words of wisdom, best practices, etc? Much appreciated
CamperBot
@camperbot
Aug 24 2015 00:34
you need to ask about @someone!
Rex Schrader
@SaintPeter
Aug 24 2015 00:35
@mw8020 I absolutely did - and continue to do so, as the mood strikes. That's a great way to cement your FP learnings.
@jjordan88 Right now only you can see them :D
Mark Williams
@mw8020
Aug 24 2015 00:36
@SaintPeter I love that functional programming stuff - it's so much cleaner and has less cognitive overload (not at first :smile: )
@jjordan88 ah ok... well that's something I guess :smile:
Rex Schrader
@SaintPeter
Aug 24 2015 00:36
@mw8020 Once you get your head wrapped around it. That took me a while, but now I feel like I've really got it down.
Mark Williams
@mw8020
Aug 24 2015 00:38
@SaintPeter yeah I've been watching a lot of vids on YT from Mattias Petter Johansson - he explains the concepts very well
Isaac Calvo
@Icalvo1
Aug 24 2015 00:49

ok officially stuck code works in mdn's console but fails on bonfire challenge: `//Return an array consisting of the largest number from each provided sub-array.
newArr = [];

function post_sort(arr) {
for(var i =0; i <arr.length; i++){
newArr.push(arr[i][0]);
}
return newArr;
}
function desc_sort(arr) {
for(var i = 0; i < arr.length; i++) {
arr[i].sort(function(a,b) {
return b-a;
});
}
return arr;
}

function largestOfFour(arr){
//input_arr = arr;
desc_sort(input_arr);
post_sort(input_arr);
return newArr;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);`

DTing
@dting
Aug 24 2015 00:50
@Icalvo1 your functions return arrays that you aren't assigning to anything
@Icalvo1 it works in the console because newArr is global however in the tests it wont have newArray in the context
Omar Negron
@onegronm
Aug 24 2015 00:53
I cannot complete waypoint "Manipulate Arrays with Pop". Can someone tell me what's wrong please? The error is "myArray should only have the first two values left(["cat"], 2)"
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);
DTing
@dting
Aug 24 2015 00:53
@onegronm it wants you to set removed to the popped value;
@onegronm right now you are popping the value. then setting removed to myArray
Omar Negron
@onegronm
Aug 24 2015 00:54
ah, thanks!
CamperBot
@camperbot
Aug 24 2015 00:54
if you want to thank someone, put an @ before their name!
Omar Negron
@onegronm
Aug 24 2015 00:54
thanks @dting!
CamperBot
@camperbot
Aug 24 2015 00:54
onegronm sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 614 | @dting | http://www.freecodecamp.com/dting
Isaac Calvo
@Icalvo1
Aug 24 2015 00:55
thanks @dting moved newArr into function and it worked
CamperBot
@camperbot
Aug 24 2015 00:55
icalvo1 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 615 | @dting | http://www.freecodecamp.com/dting
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:55
i'm trying JSONP with the twitch.tv zipline now, but having trouble with ajax...
This message was deleted
CamperBot
@camperbot
Aug 24 2015 00:56
:bulb: to format code use backticks! ``` more info
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:56
var allStreams = ["medrybw","freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff"];
var allLogos = [];
for (var i in allStreams) {
  var userName = allStreams[i];
  var streamAPI = "https://api.twitch.tv/kraken/channels/"+userName
  console.log(streamAPI);
  $.ajax({
    url:streamAPI,
    type:'GET',
    dataType:'JSONP',
    success: function(data){
        //console.log(data.logo);
        allLogos.push(data.logo);
    }
  });
  console.log(allLogos);
  $('#streamsList').append("<li class='list-group-item'><a href='http://twitch.tv/"+userName+"'><img src='"+allLogos[i]+"'></img>"+userName+"</a></li>");

}
DTing
@dting
Aug 24 2015 00:57
@ZebGirouard link your codepen
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:58
i have a scoping issue--any changes to allLogos don't exist in the for-loop context...but at the same time, if i try to move that append up into the success function, i make all the values equal to the last in the array (i.e. 9 identical <li> elements)
DTing
@dting
Aug 24 2015 00:58

@ZebGirouard also you need to move:


  console.log(allLogos);
  $('#streamsList').append("<li class='list-group-item'><a href='http://twitch.tv/"+userName+"'><img src='"+allLogos[i]+"'></img>"+userName+"</a></li>");

into the success function to happen after you get your response

Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 00:59
yeah, that last one is the problem @dting -- they all resolve to the last stream when the loop is finished
Mukul Patel
@Mukul215
Aug 24 2015 01:01
Hey can someone please explain why I am unable to pass this waypoint?
DTing
@dting
Aug 24 2015 01:01
ajax is a asynchronous call. it doesn't block so you will try to append before you get your response
Mukul Patel
@Mukul215
Aug 24 2015 01:01

1var min = 0;
var max = 9;
function myFunction() {
// Make myFunction return a random number between zero and nine instead of a decimal
// Only change code below this line.

return(Math.floor(Math.random()*(9-0+1)+0));
}

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return(myFunction());})();1

`var min = 0;
var max = 9;
function myFunction() {
// Make myFunction return a random number between zero and nine instead of a decimal
// Only change code below this line.

return(Math.floor(Math.random()*(9-0+1)+0));
}

// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return(myFunction());})();`

DTing
@dting
Aug 24 2015 01:01
@Mukul215 keep the values as max and min instead of numbers
Mukul Patel
@Mukul215
Aug 24 2015 01:01
Sorry, dont know how to send code in format
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 01:01
oh! i get it!!
Mukul Patel
@Mukul215
Aug 24 2015 01:02
thanks!
CamperBot
@camperbot
Aug 24 2015 01:02
if you want to thank someone, put an @ before their name!
Mukul Patel
@Mukul215
Aug 24 2015 01:02
@dting thanks!
CamperBot
@camperbot
Aug 24 2015 01:02
mukul215 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 616 | @dting | http://www.freecodecamp.com/dting
Zeb Tim Girouard
@ZebGirouard
Aug 24 2015 01:03
cannot access the userName from for-loop scope, it'll just keep replacing it...irritating, but easy enough to work around as long as all the data i need is either in "data" or static
thanks @dting
CamperBot
@camperbot
Aug 24 2015 01:03
zebgirouard sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: zebgirouard already gave dting points
Clint
@jenkira
Aug 24 2015 01:06
Hi All, just wondering if i could get some pointers? im calling Forasmatic for Zipline: Build A Random Quote Machine, but im getting : XMLHttpRequest cannot load http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=xml&lang=en. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
DTing
@dting
Aug 24 2015 01:07
@jenkira i made a demo cus a lot of people have problems http://codepen.io/dting/pen/PqrZgb
Clint
@jenkira
Aug 24 2015 01:07
awesome thank you :)
CamperBot
@camperbot
Aug 24 2015 01:07
if you want to thank someone, put an @ before their name!
DTing
@dting
Aug 24 2015 01:09
np
Rachel
@noeladd
Aug 24 2015 01:12

I’m on the Largest Number in Array Bonfire and having a bit of trouble. My code just returns the largest number in the last array.

function largestOfFour(arr) {
  // You can do this!
  var longest = 0;
  for (var i = 0; i< arr.length; i++){
    var current = arr[i];
    for (var x = 0; x < current.length; x ++){
      if (current[x] > longest) {
        longest = current[x];
        array= [];
        array.push(longest);

      }
    }
  }
  return array;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

I’m not sure how to fix it. I also think there is probably a simpler way of doing it so would appreciate tips on that as well.

DTing
@dting
Aug 24 2015 01:14
@noeladd you are assigning a global, array to a new Array, in the inner for loop
@noeladd you probably want to declare that array somewhere else and only push to that array after you have looked at each element in the nested array
@noeladd you probably want to also rethink where you declare that longest variable.
Clint
@jenkira
Aug 24 2015 01:16
@dting thanks very much! all sorted now
CamperBot
@camperbot
Aug 24 2015 01:16
jenkira sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 617 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 24 2015 01:17
@jenkira np
Tim
@timmcallister
Aug 24 2015 01:27
is there anything special to do, formatting wise, to post code here?
nvm just found the markdown help
So I just did the Title case bonfire and, while my solution works, there has to be an easier way.
function titleCase(str) {
  str = str.split(" ");
  for(var i = 0; i < str.length; i++){
   var word = str[i].split("");
   for(var j = 0; j < str[i].length; j++){
     if(j === 0){
       word[j] = word[j].toUpperCase();
     }
     else {
       word[j] = word[j].toLowerCase();
     }
    }
    str[i] = word.join("");
  }
  str = str.join(" ");
  return str;
}

titleCase("I'm a little tea pot");
DTing
@dting
Aug 24 2015 01:32
@timmcallister there are a lot of ways. heres mine
function titleCase(str) {
  return str
    .toLowerCase()
    .split(' ')
    .map(function(w) {return w[0].toUpperCase() + w.slice(1);})
    .join(' ');
}
titleCase("I'm a little tea pot");
Matthew Iles
@miles613
Aug 24 2015 01:34

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

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

my text is still green, please help
need text to be pink with the pink text class
Tim
@timmcallister
Aug 24 2015 01:35
. before pink-text
Matthew Iles
@miles613
Aug 24 2015 01:36
thanks
CamperBot
@camperbot
Aug 24 2015 01:36
if you want to thank someone, put an @ before their name!
Matthew Iles
@miles613
Aug 24 2015 01:36
thanks @timmcallister
CamperBot
@camperbot
Aug 24 2015 01:36
miles613 sends brownie points to @timmcallister :sparkles: :thumbsup: :sparkles:
:star: 165 | @timmcallister | http://www.freecodecamp.com/timmcallister
Tim
@timmcallister
Aug 24 2015 01:36
np
Jordan-Holt
@Jordan-Holt
Aug 24 2015 01:51
Has anyone done the Random Quote Machine zipline? I have it all set (using forismatic api) however, pressing the quote button keeps returning the same quote (for that session...if I reload the page I get a new quote).
Tim P
@xTimpi
Aug 24 2015 01:52
can anyone reccomend a good API for the local weather zipline?
@Jordan-Holt yes I finished like 10 minutes ago
DTing
@dting
Aug 24 2015 01:52
@xTimpi lots of people recommend simpleweather.js
Tim P
@xTimpi
Aug 24 2015 01:52
@Jordan-Holt I used a different api, though
Jordan-Holt
@Jordan-Holt
Aug 24 2015 01:53
Did you use jsonp for the GET?
DTing
@dting
Aug 24 2015 01:53
i personally used openweathermap
Jordan-Holt
@Jordan-Holt
Aug 24 2015 01:53
@xTimpi
DTing
@dting
Aug 24 2015 01:53
@Jordan-Holt http://codepen.io/dting/pen/PqrZgb i made a demo for that api using jsonp since so many people have problems getting it to work
Tim P
@xTimpi
Aug 24 2015 01:54
@Jordan-Holt no I used regular JSON
thanks! @dting
CamperBot
@camperbot
Aug 24 2015 01:55
xtimpi sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 618 | @dting | http://www.freecodecamp.com/dting
Jordan-Holt
@Jordan-Holt
Aug 24 2015 01:56
@dting How do you embed that codepen in chat? Your way looks much simpler than mine. Thanks.
Tim P
@xTimpi
Aug 24 2015 01:56
@dting my problem right now is not getting the weather but to get the current location from the users ip
@Jordan-Holt you just post the link in the chat
Hmm....that didn't seem to work
DTing
@dting
Aug 24 2015 01:57
@Jordan-Holt it does if you reload
Tim P
@xTimpi
Aug 24 2015 01:57
@Jordan-Holt It did for me I can see it just fine, nice animation by the way
Jordan-Holt
@Jordan-Holt
Aug 24 2015 01:59
@xTimpi Thanks...the animation is just jquery show & hide. The hello and Franklin are just placeholder text though....it actually generates a quote when I run it normally
CamperBot
@camperbot
Aug 24 2015 01:59
jordan-holt sends brownie points to @xtimpi :sparkles: :thumbsup: :sparkles:
:star: 237 | @xtimpi | http://www.freecodecamp.com/xtimpi
kangyao
@kay78
Aug 24 2015 02:01

if(typeof(myFirstName) !== "undefined" && typeof(myLastName) !== "undefined"){(function(){return(myFirstName + ', ' + myLastName);})();}

anyone know whats the
ending (); after the
(function(){return(myFirstName + ', ' + myLastName);}) is for?

DTing
@dting
Aug 24 2015 02:02
@kay78 it calls that function
kangyao
@kay78
Aug 24 2015 02:04
@dting thanks
CamperBot
@camperbot
Aug 24 2015 02:04
kay78 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 619 | @dting | http://www.freecodecamp.com/dting
Pankaj Sharma
@Psaug29
Aug 24 2015 02:05
hey guys need some help

function titleCase(str) {
var myArray=str.split(" ");
for(var i=0;i<myArray.length;i++)
{
myArray[i].charAt(0).toUpperCase();
}
str=myArray.join(" ");
return str;
}

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

cant figure out whats wrong here...
Rex Schrader
@SaintPeter
Aug 24 2015 02:11

@Psaug29 In Javascript, strings are immutable - they cannot be changed. Therefore your code:

myArray[i].charAt(0).toUpperCase();

Does not change myArray[i] at all. It just returns a single letter which is not assigned to anything.

wiki immutable
CamperBot
@camperbot
Aug 24 2015 02:11

:point_right: js immutable [wiki]

Immutable means unchangeable i.e. you can't change.

Javascript has lots of immutable types e.g. string primitive type. Try this in your console.

s = "red";
console.log(s[1]); //→ "e"
s[1] = "x";
console.log(s) //→ "red"

the s didn't change! WAT!

:pencil: read more about js immutable on the FCC Wiki

Jared Huffstutler
@jaredhuff
Aug 24 2015 02:12
zipline
help ziplines
CamperBot
@camperbot
Aug 24 2015 02:13
no wiki entry for: ziplines
:pencil: click here to create one now!after creating your page type update to reload it here
Rex Schrader
@SaintPeter
Aug 24 2015 02:13
@jaredhuff There is no specific wiki/camperbot help for the ziplines at this time. There is a /HelpZipline channel, though.
Jared Huffstutler
@jaredhuff
Aug 24 2015 02:13
ok
@SaintPeter is there a help room?
Rex Schrader
@SaintPeter
Aug 24 2015 02:13
Yup
wiki rooms
CamperBot
@camperbot
Aug 24 2015 02:13

:point_right: casual chat rooms [wiki]

The following are our casual chat rooms.

Please note that all chat rooms listed here are publicly accessible and indexed by search engines, so only share email addresses or other sensitive information in private messages.

Chat Room Description
Hardware chat about computer hardware and Internet of Things
GameDev chat about designing and developing video games
Gaming chat about gaming of all kinds, such as video games and table top games
TVandMovies chat about TV shows and movies
Sports chat about sports
Music chat about music
Art and Photography chat about art, photography and videography
Business chat about business and entrepreneurship
Saving chat about saving, investing, and home economics
SelfImprovement chat about productivity, self improvement and quantified self

By joining these chat rooms, you accept our Code of Conduct. If you think we should add a chat room, please message @quincylarson in Gitter.

Official Free Code Camp chat rooms
:pencil: read more about casual chat rooms on the FCC Wiki

Rex Schrader
@SaintPeter
Aug 24 2015 02:14
wiki official
CamperBot
@camperbot
Aug 24 2015 02:14

:point_right: official free code camp chat rooms [wiki]

The following are our official chat rooms.

Please note that all chat rooms listed here are publicly accessible and indexed by search engines, so only share email addresses or other sensitive information in private messages.

Chat Room Description
FreeCodeCamp our main chat room - hang out and chat about life and learning to code
Help get help with our Waypoint challenges from your fellow campers
HelpZiplines get help with our Zipline challenges from your fellow campers
HelpBonfires get help with our Bonfire challenges from your fellow campers
HelpBasejumps get help with our Basejump challenges from your fellow campers
NonprofitProjects get help with your Nonprofit Projects from your fellow campers
CodingJobs chat about the process of getting a coding job, such as portfolios, networking, and interviewing
YouCanDoThis learning to code is hard - share your feelings and get moral support here
News chat about stories trending on Camper News
LetsPair find fellow campers to pair program with using Screen Hero
TeamViewer find fellow campers who use Linux and pair program using Team Viewer
PairProgrammingWomen this women-only chat room helps women pair program with other women if they so desire
40PlusDevs campers who are over 40+ years old can chat here if they so desire
LiveCoding chat about streaming webdev and gamedev on Twitch.tv and LiveCoding.tv

:pencil: read more about official free code camp chat rooms on the FCC Wiki

Rex Schrader
@SaintPeter
Aug 24 2015 02:14
@jaredhuff There is also a Bonfire specific and Basejump specific help room, as you can see.
Jared Huffstutler
@jaredhuff
Aug 24 2015 02:15
@SaintPeter on my left panel i have the bonfire and ziplines
Pankaj Sharma
@Psaug29
Aug 24 2015 02:16
@SaintPeter thanks for the help
CamperBot
@camperbot
Aug 24 2015 02:16
psaug29 sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 296 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Aug 24 2015 02:16
@jaredhuff You only get a room on your left panel when you visit it once. The list above (And more) is availible on the FCC Wiki as well.
@Psaug29 I didn't even know I was helping you, but you're welcome ;)
Jared Huffstutler
@jaredhuff
Aug 24 2015 02:16
yeah i got that lol thanks @SaintPeter
CamperBot
@camperbot
Aug 24 2015 02:16
jaredhuff sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
Rex Schrader
@SaintPeter
Aug 24 2015 02:16
@Psaug29 oh, right, the title case thing . . .how soon I forget
CamperBot
@camperbot
Aug 24 2015 02:16
:star: 297 | @saintpeter | http://www.freecodecamp.com/saintpeter
toseefahmed
@toseefahmed
Aug 24 2015 02:16
function welcomeToBooleans() {
return false;
}
welcomeToBooleans();
ans?
Rex Schrader
@SaintPeter
Aug 24 2015 02:17
bf booleans
CamperBot
@camperbot
Aug 24 2015 02:17
Sorry, can't find a bonfire called booleans. [ Check the map? ]
Rex Schrader
@SaintPeter
Aug 24 2015 02:17
bf welcome
CamperBot
@camperbot
Aug 24 2015 02:17
Sorry, can't find a bonfire called welcome. [ Check the map? ]
Rex Schrader
@SaintPeter
Aug 24 2015 02:17
Is that even a bonfire?
@toseefahmed From the instructions:
Let's modify our welcomeToBooleansfunction so that it will return trueinstead of falsewhen the run button is clicked.
@toseefahmed What's the question?
toseefahmed
@toseefahmed
Aug 24 2015 02:18
this is the question
Jared Huffstutler
@jaredhuff
Aug 24 2015 02:19
is there a way to stop the green notifications when someone posts in a room?
Rex Schrader
@SaintPeter
Aug 24 2015 02:19
@jaredhuff In the upper right hand corner of the chat window is a little wrench and screwdriver icon. Click it, select notification, and set it to your preference. This must be done per-chatroom.
@toseefahmed Do you see on line 5 where there is a return statement?
toseefahmed
@toseefahmed
Aug 24 2015 02:20
yes
Rex Schrader
@SaintPeter
Aug 24 2015 02:20
@toseefahmed Do you see what it is returning?
toseefahmed
@toseefahmed
Aug 24 2015 02:20
ok
gottcha
thanks
CamperBot
@camperbot
Aug 24 2015 02:20
if you want to thank someone, put an @ before their name!
toseefahmed
@toseefahmed
Aug 24 2015 02:21
@SaintPeter thanks
CamperBot
@camperbot
Aug 24 2015 02:21
toseefahmed sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 298 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Aug 24 2015 02:21
@toseefahmed :D glad to help.
Charles Milam
@CharlesMilam
Aug 24 2015 02:25
Anyone done the expressJS waypoint JSON Me?
kelukelugames
@kelukelugames
Aug 24 2015 02:27
Hi Folks, anyone know of a good tutorial for creating the scroll effect for the personal site zipline?
THe parallax scrolling website. :)
kelukelugames
@kelukelugames
Aug 24 2015 02:30
sweeet thank you
CamperBot
@camperbot
Aug 24 2015 02:30
if you want to thank someone, put an @ before their name!
kelukelugames
@kelukelugames
Aug 24 2015 02:30
thanks @camperbot !
CamperBot
@camperbot
Aug 24 2015 02:30
kelukelugames sends brownie points to @camperbot :sparkles: :thumbsup: :sparkles:
:star: 86 | @camperbot | http://www.freecodecamp.com/camperbot
kelukelugames
@kelukelugames
Aug 24 2015 02:30
thanks @luishendrix92 .
CamperBot
@camperbot
Aug 24 2015 02:30
kelukelugames sends brownie points to @luishendrix92 :sparkles: :thumbsup: :sparkles:
:star: 143 | @luishendrix92 | http://www.freecodecamp.com/luishendrix92
Aaron Freidus
@shadowfool
Aug 24 2015 02:46
getting a weird DOM error for accessing the twitch api: XMLHttpRequest cannot load https://api.twitch.tv/kraken/streams/noobs2ninjas. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
DTing
@dting
Aug 24 2015 02:47
@shadowfool you need to use jsonp
Aaron Freidus
@shadowfool
Aug 24 2015 02:49
can't get my current call to post here
 users.forEach(function(stream){
      $.getJSON(url + stream, function (data){
        if (data.steam === null){
          offline.push(data);
        }
        else{
          online.push(data);
        }
        all.push(data);
      });
    });
console.log(all);
Charles Milam
@CharlesMilam
Aug 24 2015 02:49
@dting have you done the expressJS waypoints?
Aaron Freidus
@shadowfool
Aug 24 2015 02:49
@dting thanks, calling via getjson which I used before too
CamperBot
@camperbot
Aug 24 2015 02:49
shadowfool sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 621 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 24 2015 02:50
@CharlesMilam ya
Aaron Freidus
@shadowfool
Aug 24 2015 02:51
so what's different from getJSON and JSONP
Charles Milam
@CharlesMilam
Aug 24 2015 02:51
@dting I can't get the last one JSON Me to pass, any suggestions?
Rex Schrader
@SaintPeter
Aug 24 2015 02:51
@shadowfool Short answer: It's complicated. Medium Answer: It's about security and it's weird.
@shadowfool Slightly longer answer: in JSONP, the contents of the JSON are wrapped in a "callback function" which contains the data. This prevents a malicious site from injecting code into your website.
DTing
@dting
Aug 24 2015 02:52
@CharlesMilam hmm i completed that a long time ago i dont remember what it's asks to do
Aaron Freidus
@shadowfool
Aug 24 2015 02:53
@SaintPeter thanks, that actually makes sense to me
CamperBot
@camperbot
Aug 24 2015 02:53
shadowfool sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 300 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Aug 24 2015 02:53
@shadowfool Thank goodness! I only barely understand it myself ;)
Aaron Freidus
@shadowfool
Aug 24 2015 02:54
@SaintPeter time to read me some twitch api documentation >_<
Rex Schrader
@SaintPeter
Aug 24 2015 02:54
@shadowfool Luckily it's pretty easy to read. And you can test all of the API calls right in your browser by putting the URL in your address bar.
Charles Milam
@CharlesMilam
Aug 24 2015 02:54
@dting pretty straight forward Write a server that reads a file, parses it to JSON and outputs the content
to the user. I didn't have any problems with the others, but can't get this one to return what they are wanting.
DTing
@dting
Aug 24 2015 02:55
what's your code look like?
HayleeNeal
@HayleeNeal
Aug 24 2015 02:55

http://freecodecamp.com/challenges/waypoint-iterate-with-javascript-for-loops

Can someone walk me through this? I've been stuck on this one for about 5 hours today

Charles Milam
@CharlesMilam
Aug 24 2015 02:55
Here's my code:
Rex Schrader
@SaintPeter
Aug 24 2015 02:55
@HayleeNeal Lemme take a look
@HayleeNeal ok, do you have some code to share?
wiki format
CamperBot
@camperbot
Aug 24 2015 02:55

: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

``` ⇦ Type 3 backticks, 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

DTing
@dting
Aug 24 2015 02:55
@HayleeNeal did you take a look of the instructions above the green run button?
Charles Milam
@CharlesMilam
Aug 24 2015 02:56
var fs = require("fs");
var express = require("express");
var app = express();

app.get("/books", function(req, res) {
  fs.readFile(process.argv[3], "utf8", function(err, data) {
    if (err) return "ERROR: " + err;

    res.send(JSON.parse(data));
  });
});

app.listen(process.argv[2]);
HayleeNeal
@HayleeNeal
Aug 24 2015 02:56
I did, I actually just got the bright idea to copy and paste the code in the instructions, but I don't understand how it works at all
Rex Schrader
@SaintPeter
Aug 24 2015 02:56
@HayleeNeal ok, let me walk you though it with the sample code.
Aaron Freidus
@shadowfool
Aug 24 2015 02:57
ok so here's what I can't figure out about the twitch api. I see you need a client ID, which i assume serves the same function as a key. But where do I get a client ID code to put into my request?
DTing
@dting
Aug 24 2015 02:57
@CharlesMilam i think you wanna res.json(JSON.parse(data));
Charles Milam
@CharlesMilam
Aug 24 2015 02:57
@dting and actually I'm using res.json to send the response, was trying send just to see if there was some difference.
HayleeNeal
@HayleeNeal
Aug 24 2015 02:58
@SaintPeter I would appreciate it greatly :)
DTing
@dting
Aug 24 2015 02:58
hmm
Rex Schrader
@SaintPeter
Aug 24 2015 02:59

@HayleeNeal

var ourArray = [];
for(var i = 0; i < 5; i++) {  // There are 3 parts here
  ourArray.push(i);
}

Let's break out the for line itself. IT has 3 parts:
1) The initilization. var i = 0; - This code runs only once at the start of the loop. It's usually used to initialzie the counter (in this case i)
2) The condition: i < 5; - The loop will run as long as this is true. That means that as soon as i is equal to 5, the loop will stop looping.
3) The increment: i++ - This code is run at the end of each loop. It's usually a simple increment (++), but can really be any mathematical transformation. It is used to move the counter (i) forward (or backwards, or whatever.

@HayleeNeal So, you can see, the loop starts i at 0, and increments it one per loop, and stops as soon as i = 5 (IE: the inside of the loop will never see 5, because it'll stop before then)
Charles Milam
@CharlesMilam
Aug 24 2015 03:00
@dting I wish the failed test printed out better, but it is a mess, but basically their's is all compact, while mine stretches down the page. I tried stripping out all the whitespace, but it didn't help either. The content looks to match other than that.
HayleeNeal
@HayleeNeal
Aug 24 2015 03:01
That makes sense :) thanks so much. It didn't explain what the i and ++ signs were for and it was just really confusing, I try to make sure I have a true understanding of something before moving on.
CamperBot
@camperbot
Aug 24 2015 03:01
if you want to thank someone, put an @ before their name!
Rex Schrader
@SaintPeter
Aug 24 2015 03:01

@HayleeNeal The last bit is the middle bit:

ourArray.push(i);

All that "push" does is takes the value you pass it and "push" it on to the end of the array, like putting a plate on top of a stack of plates.

@HayleeNeal Glad to be of service. :D
Aaron Freidus
@shadowfool
Aug 24 2015 03:02
bah this is getting frustrating :( I'm pretty sure my $.getJSON request should work as is...
HayleeNeal
@HayleeNeal
Aug 24 2015 03:02
i understood what the push meant. I'm going to get a JavaScript book for reference when I'm stuck.
Rex Schrader
@SaintPeter
Aug 24 2015 03:02
@HayleeNeal ok - I never know what people don't know.
DTing
@dting
Aug 24 2015 03:02
@CharlesMilam instead of returning error do res.sendStatus(500)
Rex Schrader
@SaintPeter
Aug 24 2015 03:03
wiki for
CamperBot
@camperbot
Aug 24 2015 03:03

:point_right: how to best use the global control shortcuts for mac [wiki]

These Global Control Shortcuts for Mac will save you hours by speeding up your typing.

https://player.vimeo.com/video/107073108

These global shortcuts work everywhere on a Mac:

Rex Schrader
@SaintPeter
Aug 24 2015 03:03
wiki for loop
CamperBot
@camperbot
Aug 24 2015 03:03

:point_right: waypoint iterate with javascript for loops [wiki]

Iterate with JavaScript For Loops

The most common type of JavaScript loop is called a for loop because it runs for a specific number of times.

var ourArray = [];
for(var i = 0; i < 5; i++) {
  ourArray.push(i);
}

ourArray will now contain [0,1,2,3,4]

:pencil: read more about waypoint iterate with javascript for loops on the FCC Wiki

Charles Milam
@CharlesMilam
Aug 24 2015 03:03
@dting will do
DTing
@dting
Aug 24 2015 03:04
@shadowfool link your codepen
Aaron Freidus
@shadowfool
Aug 24 2015 03:04
@dting one second, I thin the issue is still with the client ID
Will Cenk
@WillCenk
Aug 24 2015 03:09
I'm doing the Confirm the Ending bonfire. Help please!
Aaron Freidus
@shadowfool
Aug 24 2015 03:09
Doesn anyone know wher I can find my client ID for twitch so I can get authentication
Will Cenk
@WillCenk
Aug 24 2015 03:09
function end(str, target) {
  return target === str.substr(-1);
}

end('Bastian', 'n');
//end("He has to give me a new name", "name");
DTing
@dting
Aug 24 2015 03:10
@WillCenk that will only check if the second argument is equal to the last letter for the str
bf end
CamperBot
@camperbot
Aug 24 2015 03:10

: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

Aaron Freidus
@shadowfool
Aug 24 2015 03:10
Ah it looks like I have to make a developer account. >_<
DTing
@dting
Aug 24 2015 03:10
bf links
CamperBot
@camperbot
Aug 24 2015 03:10
Bianca Welds
@bwelds
Aug 24 2015 03:11
After a lot of tinkering and fiddling, I'm done with Zipline 1 (portfolio page). Would love some feedback on any issues you guys spot. http://codepen.io/bwelds/full/EjqaJd
Will Cenk
@WillCenk
Aug 24 2015 03:12
I googled it and found the answer, I understand it, thanks @dting
CamperBot
@camperbot
Aug 24 2015 03:12
willcenk sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 622 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 24 2015 03:13
@bwelds looks good. at certain points the white text is a bit hard to read. but real clean looking
@shadowfool you dont need a dev account for the zipline you can use their api without an dev account for the most part
Rex Schrader
@SaintPeter
Aug 24 2015 03:14
@bwelds Oh, very nice looking. The colors are great and the background image is interesting. Although it can be a tad hard to read the text against it in the "About" and "Contact" sections. A border around your image may be nice - it would help to offset it a bit. Maybe a css shadow?
Bianca Welds
@bwelds
Aug 24 2015 03:15
Thanks @dting Yeah, I was too tired to go searching for other images at this point, lol. Originally, I had kept the white background for everything, which is more my personal style, lol
CamperBot
@camperbot
Aug 24 2015 03:15
bwelds sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 623 | @dting | http://www.freecodecamp.com/dting
Rex Schrader
@SaintPeter
Aug 24 2015 03:15
@bwelds The only other thing is that the intial/top view of the page is a bit spartan. An image background there might be appropriate, or something to break up all the whitespace. It's just very . . . empty/white.
Bianca Welds
@bwelds
Aug 24 2015 03:17
Thanks @SaintPeter I will probably continue to tweak. Having started with the navbar in that colour, I was having trouble liking an image background in that first section which is why it got left so very... empty/white, lol. Another day, I will revisit and change it up a bit.
CamperBot
@camperbot
Aug 24 2015 03:17
bwelds sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 302 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Aug 24 2015 03:18
@bwelds Certainly - you'll learn more as you go on. Hopefully you'll have projects to fill in the placeholders and probably more ideas on what to put in there.
Bianca Welds
@bwelds
Aug 24 2015 03:20
Yep, looking forward to that. Was pretty cool building this from scratch (with Bootstrap's help). Learnt a lot fixing the bugs. Excited to try the other ziplines.
Aaron J. Weese
@aaronjweese
Aug 24 2015 03:20
I'm on the Waypoint: Target the Children of an Element Using jQuery....my code isn't working. I have it written like this: $("#target6").children().css("color", "green"); What am I missing here?
Aaron Freidus
@shadowfool
Aug 24 2015 03:21
@dting but you do need a client_ID which is obtained by registering an app.
DTing
@dting
Aug 24 2015 03:21
nah
Rex Schrader
@SaintPeter
Aug 24 2015 03:21
@aaronjweese Is the target #target6? If so, what is it the child of?
Aaron J. Weese
@aaronjweese
Aug 24 2015 03:22
Yeah it calls for the text of "target 6" to be green.
Charles Milam
@CharlesMilam
Aug 24 2015 03:22
@bwelds Looks nice, good work. Look for some div margins that might be extending beyond their container, I get a horizontal scrollbar.
Rex Schrader
@SaintPeter
Aug 24 2015 03:22
@aaronjweese In that case, $("#target6") is not the correct selector, right? Because it's child is . . nonexistant. What element is target6 a child of?
Aaron J. Weese
@aaronjweese
Aug 24 2015 03:24
@SaintPeter Got it thanks....senior moment.
CamperBot
@camperbot
Aug 24 2015 03:24
aaronjweese sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 303 | @saintpeter | http://www.freecodecamp.com/saintpeter
Aaron Freidus
@shadowfool
Aug 24 2015 03:25
var url = "https://api.twitch.tv/kraken/" ;
 var users = ["freecodecamp", "storbeck", "terakilobyte", "habathcx","RobotCaleb","thomasballinger","noobs2ninjas","beohoff","medrybw"];
  var cid = "?client_id=tsrpa9p0csdk7kxo52xeg59skarh6mz"
  var online = [];
  var offline = [];
  var all = [];

    users.forEach(function(stream){
      $.getJSON(url + "streams/" + stream + cid, function (data){
        if (data.stream === null){
          offline.push(data);
        }
        else{
          online.push(data);
        }
        all.push(data);
      });
    });
console.log(all);
});
ok so this is still passing the error :(
Rex Schrader
@SaintPeter
Aug 24 2015 03:25
@shadowfool append this to your cid: callback=?
Aaron Freidus
@shadowfool
Aug 24 2015 03:27
Now I only get: GET https://api.twitch.tv/kraken/oauth2/token 404 (Not Found)
HayleeNeal
@HayleeNeal
Aug 24 2015 03:28
if ( heads === 0) {

  return(true);
}
  else {

    return(tails);
  }
}
http://freecodecamp.com/challenges/waypoint-use-conditional-logic-with-ifelse-statements what am I doing wrong here? I'm having such a hard time with JavaScript, I feel like the explanations are sorely lacking.
Aaron Freidus
@shadowfool
Aug 24 2015 03:28
oh wait this worked
@SaintPeter thank you!
CamperBot
@camperbot
Aug 24 2015 03:28
shadowfool sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:warning: shadowfool already gave saintpeter points
Rex Schrader
@SaintPeter
Aug 24 2015 03:29
@HayleeNeal You don't need to put your return parameters in paretheses. just say return true; or return false
Bianca Welds
@bwelds
Aug 24 2015 03:29
Thanks @CharlesMilam do you still get the scroll bar? Seems bootstrap had some defaults negative margins on rows that were causing issue.
CamperBot
@camperbot
Aug 24 2015 03:29
bwelds sends brownie points to @charlesmilam :sparkles: :thumbsup: :sparkles:
:star: 282 | @charlesmilam | http://www.freecodecamp.com/charlesmilam
HayleeNeal
@HayleeNeal
Aug 24 2015 03:29
Okay. It was in parentheses in the example.
Rex Schrader
@SaintPeter
Aug 24 2015 03:29
@HayleeNeal oh, wow, the instructions say otherwise. Sorry.
@HayleeNeal ok, what is it that you are supposed to be testing with your if statement? What is the thing with the random contents?
@HayleeNeal Also: The instructions say to return heads or tails - as strings - IE: return 'heads'; or return 'tails';
HayleeNeal
@HayleeNeal
Aug 24 2015 03:31

Create an if-else statement to return heads if the flip var is zero, or else return tails if it's not.

this is what I'm supposed to be doing.

Rex Schrader
@SaintPeter
Aug 24 2015 03:31
@HayleeNeal In your code above, are you testing flip?
@HayleeNeal You wrote:
if ( heads === 0) {
HayleeNeal
@HayleeNeal
Aug 24 2015 03:32
I just switched it to flip and it's giving me an error still
Rex Schrader
@SaintPeter
Aug 24 2015 03:32
@HayleeNeal What is heads in this code:
if ( heads === 0) {
DTing
@dting
Aug 24 2015 03:33
@HayleeNeal tails is undefined. you need to return "heads" or "tails"
HayleeNeal
@HayleeNeal
Aug 24 2015 03:33
@SaintPeter I'm not sure
Rex Schrader
@SaintPeter
Aug 24 2015 03:33
@HayleeNeal Is heads a variable? Is it something you can test? What is it that we need to see if it's 0 or 1?
HayleeNeal
@HayleeNeal
Aug 24 2015 03:33
no, heads is the answer to the if
I just changed the variable to flip
if ( flip === 0) {

  return(heads);
}
  else {

    return(tails);
  }
}
Rex Schrader
@SaintPeter
Aug 24 2015 03:35
@HayleeNeal good. Now you need to enclose the literals 'heads' and 'tails' in quotes, because they are strings. Only certain pre-defined words, like true and false can be placed in your code without quotes.
HayleeNeal
@HayleeNeal
Aug 24 2015 03:36
@SaintPeter Thanks! that worked. So many little things and if you miss just one the entire code doesn't work.
CamperBot
@camperbot
Aug 24 2015 03:36
hayleeneal sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 304 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Aug 24 2015 03:37
@HayleeNeal Welcome to programming :D. Unfortunately (or maybe fortunately) the computer doesn't know "what you mean".
HayleeNeal
@HayleeNeal
Aug 24 2015 03:38
lol. JavaScript has been 10x harder for me than anything else. I'm assuming that by the end of this FCC course I'll be pretty decent at it if I have to practice it a lot. I took to HTML and CSS like a fish to water. :)
Rex Schrader
@SaintPeter
Aug 24 2015 03:39
@HayleeNeal Keep at it, I'm sure you'll get it. I am realizing that some of these early JS problems could have a bit more explanation. They really didn't explain that you would need to make "heads" and "tails" into strings.
Angela Goodwin
@aggoodwin
Aug 24 2015 03:40
@SaintPeter I’m having that problem with the beginning bonfires. I feel like the wording on the problems is confusing. Glad I’m not alone.
HayleeNeal
@HayleeNeal
Aug 24 2015 03:40
@SaintPeter I really appreciate your help. It's nice to have a community to turn to when I have issues.
Michael Swartz
@mlswartz
Aug 24 2015 03:41
If anyone has finished the jQuery track and tried to get the lessons to work in your browser, you HAVE to link to a file called 'animated.css', it's a download from another website. Apparently FreeCodeCamp didn't think it was important enough to disclose. A major FAIL for FreeCodeCamp.
Lux3
@Lux3
Aug 24 2015 03:44
bf falsey bouncer
This message was deleted
CamperBot
@camperbot
Aug 24 2015 03:45
we're talking about bonfire :fire: Bonfire: Confirm the Ending
Elliescode
@EllieAdam
Aug 24 2015 03:45
Hello!
Lux3
@Lux3
Aug 24 2015 03:45
@EllieAdam Hiya!
Elliescode
@EllieAdam
Aug 24 2015 03:46
Your left-well element should have a red background.
$("#left-well").parent().css("background-color", "red")
Charles Milam
@CharlesMilam
Aug 24 2015 03:46
@bwelds Nice, scrollbar gone.
Elliescode
@EllieAdam
Aug 24 2015 03:46
I have error that left-well is not red!
Bianca Welds
@bwelds
Aug 24 2015 03:47
Excellent @CharlesMilam Think I'm done for the night. Brain is starting to slow down.
Lux3
@Lux3
Aug 24 2015 03:47
bf Falsey Bouncer
CamperBot
@camperbot
Aug 24 2015 03:47

:fire:Bonfire: Falsey Bouncer :link:

function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  return arr;
}

bouncer([7, 'ate', '', false, 9]);

Remove all falsey values from an array.

more info:  bf details | bf links | hint

Lux3
@Lux3
Aug 24 2015 03:47
hint
CamperBot
@camperbot
Aug 24 2015 03:47
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Elliescode
@EllieAdam
Aug 24 2015 03:48
This message was deleted
$(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");

  });

  $("#left-well").parent().css("background-color", "red")
@camperbot
DTing
@dting
Aug 24 2015 03:50
@EllieAdam you want to choose one of #left-well's children since you are using the parent()
also you probably want to put that code inside the ready function
Elliescode
@EllieAdam
Aug 24 2015 03:52
This message was deleted
 $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
     $("#left-well").parent().css("background-color", "red")

  });
DTing
@dting
Aug 24 2015 04:00
@EllieAdam try using one of #left-well's children for your selector
HayleeNeal
@HayleeNeal
Aug 24 2015 04:02
Just finished the basic JavaScript section. I'm definitely going to read up more on JavaScript, though. Does anyone know any good books on the subject?
Elliescode
@EllieAdam
Aug 24 2015 04:03
How to use #left-well's children? You mean Target1?
DTing
@dting
Aug 24 2015 04:04
@EllieAdam any of the child elements to #left-well
HayleeNeal
@HayleeNeal
Aug 24 2015 04:04
@EllieAdam thanks !
CamperBot
@camperbot
Aug 24 2015 04:04
hayleeneal sends brownie points to @ellieadam :sparkles: :thumbsup: :sparkles:
:star: 1050 | @ellieadam | http://www.freecodecamp.com/ellieadam
Adam Teece
@adamteece
Aug 24 2015 04:05

Hey guys, I am on http://freecodecamp.com/challenges/waypoint-target-a-specific-child-of-an-element-using-jquery
I entered

$(".well:nth-child(2)").addClass("animated bounce”);

But the entire well class is bouncing

Am I missing anything?
Doug Riblet
@DougRiblet
Aug 24 2015 04:06
@HayleeNeal I like "Eloquent JavaScript" by Haverbeke.
Elliescode
@EllieAdam
Aug 24 2015 04:07
@dting I tried (#target1) it is not working. Can you give me hint?
DTing
@dting
Aug 24 2015 04:07
@adamteece you need a space between .well and nth-child
@EllieAdam $('#target1') ?
Malik Dixon
@mdixon47
Aug 24 2015 04:10
Can anyone assist me in Waypoint: Manipulate Arrays With pop. Here is my issue
var myArray = ["John", 23, ["cat", 2]];
var removed = myArray; 
myArray.pop();
Adam Teece
@adamteece
Aug 24 2015 04:10
Thanks @dting I am going to report a bug because the example they show is
(".target:nth-child(3)").addClass("animated bounce”);
CamperBot
@camperbot
Aug 24 2015 04:10
adamteece sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 626 | @dting | http://www.freecodecamp.com/dting
Doug Riblet
@DougRiblet
Aug 24 2015 04:10
@mdixon47 where do you need help?
DTing
@dting
Aug 24 2015 04:10
@adamteece that also works
no space using .target
i linked a stack overflow to explain the difference
Adam Teece
@adamteece
Aug 24 2015 04:11
oh so literally use .target
yeah i was reading that
DTing
@dting
Aug 24 2015 04:11
yea
@mdixon47 tehy want you to assign the popped element to removed
Malik Dixon
@mdixon47
Aug 24 2015 04:12
@smashzen I know that .pop() removes the element from the array. Why isnt it working? Am i missing something.
Elliescode
@EllieAdam
Aug 24 2015 04:12
@dting can you tell me who are the children(what are their names)??
Adam Teece
@adamteece
Aug 24 2015 04:12
ok but .target would target every instance of a second child in this case if there was more?
they are also checking the removed is equal to the popped element
Malik Dixon
@mdixon47
Aug 24 2015 04:13
got it @dting Thanks
CamperBot
@camperbot
Aug 24 2015 04:13
mdixon47 sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 627 | @dting | http://www.freecodecamp.com/dting
Doug Riblet
@DougRiblet
Aug 24 2015 04:13
@mdixon47 try combining your lines 2 & 3
you want "removed" to contain the "popped" items from myArray when you're done
Elliescode
@EllieAdam
Aug 24 2015 04:15
hello!
Malik Dixon
@mdixon47
Aug 24 2015 04:17
@smashzen: It worked thank you for that and @dting for the assist on the link.
CamperBot
@camperbot
Aug 24 2015 04:17
mdixon47 sends brownie points to @smashzen and @dting :sparkles: :thumbsup: :sparkles:
:warning: mdixon47 already gave dting points
:star: 309 | @smashzen | http://www.freecodecamp.com/smashzen
co0lguy42
@co0lguy42
Aug 24 2015 04:18
How do I degrade a font
Tod
@thermobee
Aug 24 2015 04:18
can anyone help me with the tweet button on the random quote machine challenge?
chriscrosscutler
@chriscrosscutler
Aug 24 2015 04:19
can somebody help me understand how to use classes with in the image element? I tried <img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat"> but it isn't working
Harvey
@harvey56
Aug 24 2015 04:20
hey! where do you host the images you link to on your front end dev projects ?
Rich Churcher
@richchurcher
Aug 24 2015 04:21
@harvey56 imgur is a good easy option
Harvey
@harvey56
Aug 24 2015 04:22
@richchurcher ok thanks! i thought imgur was only to create albums to share on reddit lol
CamperBot
@camperbot
Aug 24 2015 04:22
harvey56 sends brownie points to @richchurcher :sparkles: :thumbsup: :sparkles:
:star: 283 | @richchurcher | http://www.freecodecamp.com/richchurcher
Rich Churcher
@richchurcher
Aug 24 2015 04:22
heh it's good for all sorts of things
@chriscrosscutler looks fine, you might have to show a bit more code than that
@co0lguy42 what do you mean by 'degrade'? Make smaller?
co0lguy42
@co0lguy42
Aug 24 2015 04:25
no it says if make the lobster font unavailable so you have to degrade to monospace
Rich Churcher
@richchurcher
Aug 24 2015 04:25
Oh. Specify a 'back-up font'
like this: font-family: "font one", sans-serif;
Doug Riblet
@DougRiblet
Aug 24 2015 04:25
@chriscrosscutler There could be many reasons. Try posting all your code from that exercise.
Luis Felipe López G.
@luishendrix92
Aug 24 2015 04:25
font-family: 'My super font', other font, backup font;
co0lguy42
@co0lguy42
Aug 24 2015 04:26
Oh ok
I'll try it
Rex Schrader
@SaintPeter
Aug 24 2015 04:26
@richchurcher Not all fonts are on every computer - for example, Widows, OSX, iOS, and Linux all have a different set of default fonts. So you put your fonts, from specific to generic, so the page will "degrade" gracefully.
Lux3
@Lux3
Aug 24 2015 04:27
bf where
CamperBot
@camperbot
Aug 24 2015 04:27

:fire:Bonfire: Where art thou :link:

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

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

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

more info:  bf details | bf links | hint

Lux3
@Lux3
Aug 24 2015 04:27
hint
CamperBot
@camperbot
Aug 24 2015 04:27
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
chriscrosscutler
@chriscrosscutler
Aug 24 2015 04:27
@richchurcher @smashzen looks like I found the error, I included one too many { in the class. Thanks though!
CamperBot
@camperbot
Aug 24 2015 04:27
chriscrosscutler sends brownie points to @richchurcher and @smashzen :sparkles: :thumbsup: :sparkles:
:star: 284 | @richchurcher | http://www.freecodecamp.com/richchurcher
:star: 310 | @smashzen | http://www.freecodecamp.com/smashzen
Rich Churcher
@richchurcher
Aug 24 2015 04:27
@SaintPeter mmmhmm. I know, it's just not the most common term for it ;)
chriscrosscutler
@chriscrosscutler
Aug 24 2015 04:27

<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;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
}
</style>

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

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

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

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
how do I use multiple classes in an element? the image element seems to not be working like I have it now.

co0lguy42
@co0lguy42
Aug 24 2015 04:27
Thanks @richchurcher go it
CamperBot
@camperbot
Aug 24 2015 04:27
co0lguy42 sends brownie points to @richchurcher :sparkles: :thumbsup: :sparkles:
:star: 285 | @richchurcher | http://www.freecodecamp.com/richchurcher
co0lguy42
@co0lguy42
Aug 24 2015 04:27
*got
jb299
@jb299
Aug 24 2015 04:41
@chriscrosscutler don't need the second class
Lux3
@Lux3
Aug 24 2015 04:41
bf seek and destroy
CamperBot
@camperbot
Aug 24 2015 04:41
Sorry, can't find a bonfire called seek hint. [ Check the map? ]
Lux3
@Lux3
Aug 24 2015 04:42
bf seek and destroy
CamperBot
@camperbot
Aug 24 2015 04:42

:fire:Bonfire: Seek and Destroy :link:

function destroyer(arr) {
  // Remove all the values
  return arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.

more info:  bf details | bf links | hint

Lux3
@Lux3
Aug 24 2015 04:42
hint
CamperBot
@camperbot
Aug 24 2015 04:42
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Prashanth
@dgprashanth
Aug 24 2015 05:23
Guys, I need some clarity regarding classes and IDs in CSS. Can classes do everything IDs do? And if so, why should we even use IDs?
Rex Schrader
@SaintPeter
Aug 24 2015 05:24
@dgprashanth Yes and no.
Prashanth
@dgprashanth
Aug 24 2015 05:24
@pillphil Thanks!
CamperBot
@camperbot
Aug 24 2015 05:24
dgprashanth sends brownie points to @pillphil :sparkles: :thumbsup: :sparkles:
:star: 214 | @pillphil | http://www.freecodecamp.com/pillphil
Prashanth
@dgprashanth
Aug 24 2015 05:24
@SaintPeter So we shouldn't use IDs?
Rex Schrader
@SaintPeter
Aug 24 2015 05:24
@dgprashanth IDs are supposed to be unique. You're only ever supposed to have a single instance of an ID on any give HTML page. When you use jQuery to select and ID you only ever get a single item back.
@dgprashanth You absolutely should use them.
@dgprashanth They just serve a different function.
Prashanth
@dgprashanth
Aug 24 2015 05:25
@SaintPeter Oh I see.. So we use Jquery to access IDs and hence that particular element when needed?
Rex Schrader
@SaintPeter
Aug 24 2015 05:25
@dgprashanth Use IDs to uniquely identify an HTML element - they are VERY fast when used as selectors.
Prashanth
@dgprashanth
Aug 24 2015 05:26
Oh I see... okay, thanks :+1: Confusion cleared!
CamperBot
@camperbot
Aug 24 2015 05:26
if you want to thank someone, put an @ before their name!
Prashanth
@dgprashanth
Aug 24 2015 05:26
@SaintPeter Thanks
Rex Schrader
@SaintPeter
Aug 24 2015 05:26
@dgprashanth Classes CAN be used as selectors, but their real value is in assigning styles to more than one object
@dgprashanth NP
Prashanth
@dgprashanth
Aug 24 2015 05:26
Oh I see..
And when looking at html and css for other sites, how can I improve my speed of understanding what's happening?
Rex Schrader
@SaintPeter
Aug 24 2015 05:27
@dgprashanth You can technically use IDs to assign styles to multiple elements, but you can only have one ID per HTML element, whereas you can have an unlimited number of CSS classes.
Prashanth
@dgprashanth
Aug 24 2015 05:27
Is it only based on reading more and more?
Rex Schrader
@SaintPeter
Aug 24 2015 05:27
Build something
Use them
try to acheive a specific effect
Find a site that "looks cool" and reverse engineer it
CamperBot
@camperbot
Aug 24 2015 05:28
find a site that looks cool and reverse engineer it
nothing found
Rex Schrader
@SaintPeter
Aug 24 2015 05:28
haha @camperbot
The Ziplines are a great opportunity to stretch your CSS legs.
Prashanth
@dgprashanth
Aug 24 2015 05:28
Ah cool.. Yeah that's what I'm trying to do, just so many lines of code seem to be confusing me to no end
Rex Schrader
@SaintPeter
Aug 24 2015 05:28
They are the first truely creative projects.
Well . . . there is not much to do but use them, I find.
Prashanth
@dgprashanth
Aug 24 2015 05:29
But yeah, I get it. I have to break it down piece by piece and then try to comprehend what they're all doing
Rex Schrader
@SaintPeter
Aug 24 2015 05:29
I mean . . nothing teaches you faster than trying to do something and failing miserably
Obviously there are sites like w3schools
or this one I really like: http://css-tricks.com
CSS Tricks does a great job of explaining how each "Trick" works.
And they've got a zillion snippets
NOTE: You don't always have to "understand" it to use it. It helps, especialyl if it breaks, but some of this is "fake it until you make it"
I cut and paste CSS all the time
because, really, who has time int he day to learn every last thing about every last CSS directive?
Prashanth
@dgprashanth
Aug 24 2015 05:32
Oh.. Great.. Sometimes I start wondering how I will remember individual word so that I can use
Rex Schrader
@SaintPeter
Aug 24 2015 05:32
@dgprashanth Anyway, that's what I've got - TTYL
@dgprashanth haha - that's what google is for.
Prashanth
@dgprashanth
Aug 24 2015 05:32
@SaintPeter Spot on!
Rex Schrader
@SaintPeter
Aug 24 2015 05:32
The ones you use most you'll remember. The ones you don't . . .google to the rescue!
My rate is about 3-4 googles before I remember it
Jen
@calaminejen
Aug 24 2015 05:56
hi everyone, I am confused about why my code isn't working correctly. in particular, the nth-child line:
<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>

<!-- 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>
I suspect it's something simple that I am missing due to inexperience.
Dennis Andersson
@deandersson
Aug 24 2015 06:04
You need target the buttons like this, "button:nth-child(2)".
This is because you select the nth child of the parent of the selector.. :)
I did the same thing, the wording is confusing :)
https://api.jquery.com/nth-child-selector/ This explains it well in the example
Jen
@calaminejen
Aug 24 2015 06:06
ahhhhhh! thank you!
CamperBot
@camperbot
Aug 24 2015 06:06
if you want to thank someone, put an @ before their name!
Dennis Andersson
@deandersson
Aug 24 2015 06:06
No problem!
Luxan Suthaharan
@luxan14
Aug 24 2015 06:09
Hey guys! I'm struck on Bonfire: Check for Palindromes, Need help? i want to know how to check a palindrome? any suggestions?
DTing
@dting
Aug 24 2015 06:13
@calaminejen you can select well's children's nth child by putting a space btween .well and :nth-child http://stackoverflow.com/questions/32029383/why-does-nth-child-needs-a-space-between-the-element
Luis Felipe López G.
@luishendrix92
Aug 24 2015 06:14
@luxan14 There are two ways:
1) Check if the string is the same as the string but reversed
2) Constantly check if the opposite letters are the same until you reach the center of the string (more efficient)
And a warning, try to get rid of spaces and foreign characters that may interfere.
Luxan Suthaharan
@luxan14
Aug 24 2015 06:15
@luishendrix92 Thank u! I'll try tht :smile:
CamperBot
@camperbot
Aug 24 2015 06:15
luxan14 sends brownie points to @luishendrix92 :sparkles: :thumbsup: :sparkles:
:star: 148 | @luishendrix92 | http://www.freecodecamp.com/luishendrix92
Jesse Rafael Dizon
@jesserafael
Aug 24 2015 06:15

Hello guys, I run this code and it returns "5"

var jagged = [[3,2],[2,4,5],[1]];
jagged[1][2]

Can someone explain to me the meaning of jagged1 and why it returns 5 ? Thanks

Can someone explain to me the meaning of jagged[1][2] and why it returns 5 ? Thanks.
Luxan Suthaharan
@luxan14
Aug 24 2015 06:18
@jesserafael first index 1 represents the array inside ur array that is [2,4,5] and then ur pointing out the next index which is 2 and it is inside ur [2,4,5] array which is 5!
pardon my english
Luis Felipe López G.
@luishendrix92
Aug 24 2015 06:18
@jesserafael Imagine you have a box, inside that box you have 3 boxes (since there are 3 arrays inside the jagged array) and inside each of those boxes there are:
0- The numbers 3 and 2
1- The numbers 2, 4 and 5
2- The number 1
Now, by using jagged[1] you're telling it, I want the 2nd box (indices are 0-based)
and by using jagged[1][2] you're saying Inside the 2nd box, I want the 3rd item (again, indices are 0-based)
and the 3rd item of box #2 is 5
Luxan Suthaharan
@luxan14
Aug 24 2015 06:20
@jesserafael @luishendrix92's explanation is more elegant! :smile:
Jesse Rafael Dizon
@jesserafael
Aug 24 2015 06:22
Thanks a lot @luishendrix92 and @luxan14 :)
CamperBot
@camperbot
Aug 24 2015 06:22
jesserafael sends brownie points to @luishendrix92 and @luxan14 :sparkles: :thumbsup: :sparkles:
:star: 162 | @luxan14 | http://www.freecodecamp.com/luxan14
:star: 149 | @luishendrix92 | http://www.freecodecamp.com/luishendrix92
Moe
@smosab
Aug 24 2015 06:31
blob
Can any one tell me where I'm going wrong with my code in line 36?
DTing
@dting
Aug 24 2015 06:32
@smosab try removing the class
Moe
@smosab
Aug 24 2015 06:32
thanks @dting tried that but still same error
CamperBot
@camperbot
Aug 24 2015 06:32
smosab sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 629 | @dting | http://www.freecodecamp.com/dting
DTing
@dting
Aug 24 2015 06:33
@smosab oh. higher up in your code theres an a element. wrap that with the p
@smosab line 30
John Irle
@JohnIrle
Aug 24 2015 06:34
I'm glad the ziplines were moved higher on the map because it made me realize that I can't recall how to do things with html and css because the tutorials held my hand so much
Justin Crawford
@JCrawford1122
Aug 24 2015 06:34
@dting I think your right
Moe
@smosab
Aug 24 2015 06:35
That did the trick @dting! Thanks!
CamperBot
@camperbot
Aug 24 2015 06:35
smosab sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:warning: smosab already gave dting points
Michael Bomholt
@bomholtm
Aug 24 2015 06:40
hey fellow campers. i am currently starting with basic front end development projects. first task is a portfolio and i am kinda stuck. i had a very aspiring vision in my head and also looked up some well done portfolios. then i did a sketch on paper and looked into sass and foundation as i think i might prefer it over bootstrap but dunno. now its time to transfer the sketch into codepen but i really dont know how to start. any advice???
Mbos95
@Mbos95
Aug 24 2015 06:45
Hey guys. I am trying to build a website. I want to link to a certain image I have stored on google drive, but for some reason this doesn't work! I also have another picture on my website which is linked from Mediafire and that one works. any idea how that can be ?
body{
  background-image: url("https://drive.google.com/file/d/0B3LsOih5fgtnMllJX3g4QlZYSTg/view?usp=sharing");

}
your link is no image.. its some sort of preview
DTing
@dting
Aug 24 2015 06:53
@bomholt i'd suggest starting simple. look at the foundation documentation. getting started. google some tutorials. and build up
Michael Bomholt
@bomholtm
Aug 24 2015 06:56
@dting so start with a simple html site and then integrate foundation and so on? maybe i am just afraid to start because im worried i cant translate my vision into a real page =)
Mbos95
@Mbos95
Aug 24 2015 06:57
thanks @bomholt
CamperBot
@camperbot
Aug 24 2015 06:57
mbos95 sends brownie points to @bomholt :sparkles: :thumbsup: :sparkles:
:star: 285 | @bomholt | http://www.freecodecamp.com/bomholt
Mbos95
@Mbos95
Aug 24 2015 06:58
It worked, but now I broke it :D
Jaimee Williams
@Jaimeec
Aug 24 2015 06:59
I just started today and I'm completely confused on the degrade of the lobster font, like how do I comment out the lobster for monospace when it's not available, no matter what I do, one of the green checks turns red.
DTing
@dting
Aug 24 2015 07:00
@Mbos95 i would suggest just throwing it up on imgur or something for non production stuff. while it's possible, google drive isnt really meant for hosting photos for webpages.
@Jaimeec paste your code
Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 24 2015 07:00
The below code is to check if a string is a palindrome and i am trying it using Recursion. Can some one
help me on where did i go wrong
function palindrome(str, i) {
    // Good luck!
    str = str.toLowerCase();
    var n = str.length;

    if (str[n - 1 - i] == str[i]) {
        if (i < ((n - 1) / 2)) {
            i++;
            console.log(i);

            palindrome(str, i);
            //i++;
            //return true   
        }
        return true;
    }
    else {
        return false;
    }


}
palindrome("yesy", 0);
Mbos95
@Mbos95
Aug 24 2015 07:00
Yea, I noticed :D I normally use Mediafire but I couldn't connect to their sire before
I want to prevent using Imgur on my work spot :D
Michael Bomholt
@bomholtm
Aug 24 2015 07:01
@Mbos95 i am no expert but i would tend to use a link with actual .jpg or other image format file
Mbos95
@Mbos95
Aug 24 2015 07:01
Why jpg ? jpg you think is better?
Michael Bomholt
@bomholtm
Aug 24 2015 07:02
but a i also need a way to host my images is there something like a free ftp?
Dennis Andersson
@deandersson
Aug 24 2015 07:02
@bomholt I upload images to facebook and make them private then copy the image link.. :)
Michael Bomholt
@bomholtm
Aug 24 2015 07:03
@Mbos95 no i just meant that the link should be in the dot something format.. like .jpeg .gif .png
Mbos95
@Mbos95
Aug 24 2015 07:03
Well, Mediafire is up agian. :)
Michael Bomholt
@bomholtm
Aug 24 2015 07:03
@deandersson i got no facebook :D :P
Mbos95
@Mbos95
Aug 24 2015 07:03
Ah yes yes. That is what happens when I host with mediafire and it is up again. but now I learned that google isn't the best medium to use for your pictures. so hey! everything thing which doesn't work is an possiblity to learn!
Dennis Andersson
@deandersson
Aug 24 2015 07:04
@bomholt well you sir respect your integrity! :)
@bomholt you could go pro on codepen, that makes you able to store images on codepen i think
Aleksandar B.
@aleksandar-b
Aug 24 2015 07:05
Hi, in the Zipline: show the local weather, what technology should i use to fetch data?
I use openweathermap :)
Aleksandar B.
@aleksandar-b
Aug 24 2015 07:07
@deandersson yes , but how to fetch? Using what line of code?
Michael Bomholt
@bomholtm
Aug 24 2015 07:08
@deandersson hahahaha. yea wanted also to buy some professional hosting soon but i am a poor student and just starting my first project a free ftp would be nice
but they dont allow to just host images on them do they?
Dennis Andersson
@deandersson
Aug 24 2015 07:09
@samosale they have a good explanation of the api at http://openweathermap.org/current. I used the jquery ".ajax()" to get the data.
@bomholt on codepen? Not at free no.. :(
Aleksandar B.
@aleksandar-b
Aug 24 2015 07:09
@deandersson so, just simple ajax call, right?
Dennis Andersson
@deandersson
Aug 24 2015 07:10
@samosale yep thats how I did it.
Aleksandar B.
@aleksandar-b
Aug 24 2015 07:11
@deandersson and, if i want to automaticaly on load to use his geoaddress to retreave data, how to do that?
Dennis Andersson
@deandersson
Aug 24 2015 07:13
@samosale in your ready()function you can fetch the geolocation data and then from there call the next api that gets the weather.
@samosale this has some info on using geolocation http://www.w3schools.com/html/html5_geolocation.asp
Aleksandar B.
@aleksandar-b
Aug 24 2015 07:15
@deandersson thanks, so in this project I am using pure javascript for geolocation and jquery for ajax?
CamperBot
@camperbot
Aug 24 2015 07:15
samosale sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 221 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 24 2015 07:16
@samosale yes thats the way I did it :)
Omar
@oab00
Aug 24 2015 07:20
@yashaswiyogeshwara you can solve that with 2 lines
no need to loop through the string like doing it recursively
all you need to is to remove punctuation then compare the string to its reverse
but if u still want to do it recursively then you would have to alter the string first
and initiate the index to zero then recurse
Jane Liu
@jane19900101
Aug 24 2015 07:58
Hi, can anyone help me with the API issue? I know it is a big topic... The question is I don't know how to incorporate the data into my code. I have read the documentations like this https://www.mashape.com/andruxnet/random-famous-quotes and this http://openweathermap.org/current but I am still very confused
I have even completed codeacademy lessons on API, but the theory seems no help on my real issue on what to type in my code to make it work... I have studied code on codepen to see how others use API, and they confuses me even more...
Mbos95
@Mbos95
Aug 24 2015 08:01
Hey guys .there is an basic Javascript assigment which completely bumfuzzled me
Jane Liu
@jane19900101
Aug 24 2015 08:01
Just don't know how to get started... like sending requests, they console log a lot, but in codepen, I don't know how to console log the response out. It is like a black box to me.
Mbos95
@Mbos95
Aug 24 2015 08:01
It is:
Waypoint: Use Bracket Notation to Find the Nth Character in a String
What do they want me to do ?
on the one before this one where I needed to do the same, I practicly cheated xD
Omar
@oab00
Aug 24 2015 08:03
@jane19900101 what API are you trying to figure out :o
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:07
function palindrome(str) {
  // Good luck!
  str = str.replace(/\s/gi, '');
  str=str.toLowerCase(str);
  if (str==str.reverse){
      return true;
  }
}
palindrome("eye");
undefined :(
Omar
@oab00
Aug 24 2015 08:08

@jyapujuju

var url = 'http://api.openweathermap.org/data/2.5/weather?q=London'
$.getJSON(url).success(function(data) {
  console.log(data.main.temp - 273);
});

if you try this code on codepen you will get the temperature right now in London :)

@jyapujuju .reverse is a function use .reverse()
also u need to use .split('') before it to turn the string into an array
Ramesh Tamang
@rameshtmg
Aug 24 2015 08:21
I am stuck in Basic JavaScript map.. how to start?
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:22
function palindrome(str) {
  // Good luck!
  var palendrom=str.split(',');
  palendrom = palendrom.replace(/\s/gi,'');
  palendrom=palendrom.toLowerCase(str);
  if (str==palendrom.reverse){
      return true;
  }
}
palindrome("eye");
Will Moody
@willmoody
Aug 24 2015 08:22

Hey guys, I'm a little confused, how do I access the 2, 3 at the end of arr here?

function destroyer(arr) {
  // Remove all the values
return arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

I 'm sure the method has something to do with arguments (because that is one of the helpful links on the challenge), but arr only returns [1, 2, 3, 1, 2, 3], and trying to access it via something like return arr[1] or return arr[7] will only return values for [1, 2, 3, 1, 2, 3]. I'm sure there's some basic concept I'm misunderstanding or something

Yashaswi Yogeshwara
@yashaswiyogeshwara
Aug 24 2015 08:23
thnaks @oab00 actually i wanted it by recursion. Thanks for the cue.
CamperBot
@camperbot
Aug 24 2015 08:23
yashaswiyogeshwara sends brownie points to @oab00 :sparkles: :thumbsup: :sparkles:
:star: 207 | @oab00 | http://www.freecodecamp.com/oab00
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:23
function palindrome(str) {
  // Good luck!
  var palendrom=str.split(',');
  palendrom = palendrom.replace(/\s/gi,'');
  palendrom=palendrom.toLowerCase();
  if (str==palendrom.reverse()){
      return true;
  }
}
palindrome("eye");
not a function
palendrom.replace is not a function :angry:
Fernando Ania
@Feroli
Aug 24 2015 08:24
Screen Shot 2015-08-24 at 09.23.45.png
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:25
@Feroli use 3 ` sign ``` then paste code inside it
Omar
@oab00
Aug 24 2015 08:25
@jyapujuju should use it after toLowerCase()
you want to change the string to an array after you remove punctuation and what not
like this one.
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:27
@oab00 toLowerCase is not a function
toseefahmed
@toseefahmed
Aug 24 2015 08:30
stuck in bonefire
bonfire*
Fernando Ania
@Feroli
Aug 24 2015 08:30
'''
CamperBot
@camperbot
Aug 24 2015 08:30
:bulb: to format code use backticks! ``` more info
Fernando Ania
@Feroli
Aug 24 2015 08:30

'''function palindrome(str) {
// Good luck!
var pali = str.toLowerCase();

var pali2 = str.toLowerCase();
var paliRev = pali.split('').reverse().join('');

if (paliRev !== pali2){
return false;
}

else return true;
}

palindrome("eye");
'''

CamperBot
@camperbot
Aug 24 2015 08:30
:bulb: to format code use backticks! ``` more info
Omar
@oab00
Aug 24 2015 08:32
@jyapujuju yeah thats why u need to change it after toLowerCase :sweat_smile:
Fernando Ania
@Feroli
Aug 24 2015 08:32
function palindrome(str) {
  // Good luck!
  var pali = str.toLowerCase();

  var pali2 = str.toLowerCase();
  var paliRev = pali.split('').reverse().join('');

  if (paliRev !== pali2){
  return false;
  }

  else return true;
}



palindrome("eye");
is there a bug with the palindrome exercise, I can get this to work outside of freecodecamp
Paweł
@ridlez
Aug 24 2015 08:34
hi guys, I have a question I have my first zipline (building portfolio) how do I start this? :) I mean is there any 'most efficient' way to do that? Like in real life work environment? What are the steps to build this? And how much time should it take me? (my first programming project ever)
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:37
why we need to split ...??
@Feroli
Soumya Rauth
@soumyaRauth
Aug 24 2015 08:42
Hello everyone. I am on my zipline random quote. I can't tweet the random quote. How do I do that? http://codepen.io/soumya_rauth/full/doxydZ
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:42
function palindrome(str) {
  var pal=str.toLowerCase();
  var pal1=str.toLowerCase().split('').reverse().join('');
  if (pal===pal1){
    return true;
  }
}
palindrome("eye");
deduce one line hehe <3 @Feroli
Omar
@oab00
Aug 24 2015 08:49
@ridlez use what you learned in the HTML and CSS waypoints from before
Bootstrap helps make it look nice and clean :)
you wouldn't really need to use Javascript for it
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:51
expected false to deeply equal true
??
Omar
@oab00
Aug 24 2015 08:55

@soumyaRauth

$('a').attr('href', 'https://twitter.com/intent/tweet?text=' + encodeURI('hello world!'));

try this ^

Fernando Ania
@Feroli
Aug 24 2015 08:55
@jyapujuju
to reverse it
Rabin Shrestha
@jyapujuju
Aug 24 2015 08:59
function palindrome(str) {
  var pal=str.toLowerCase();
  var pal1=str.toLowerCase().split('').reverse().join('');
  if (pal===pal1){
    return true;
  }
  else {
    return false;
  }
}
palindrome("eye");
error again :(
Omar
@oab00
Aug 24 2015 09:03
@jyapujuju read the bonfire description :p
wiki rtfm
CamperBot
@camperbot
Aug 24 2015 09:03

:point_right: rtfm [wiki]

RTFM is an initialism for the expression "Read The F**king Manual"

RTFM Comic

:pencil: read more about rtfm on the FCC Wiki

Soumya Rauth
@soumyaRauth
Aug 24 2015 09:03
@oab00 Can I use a function which returns a text, instead of 'hello world'.
Omar
@oab00
Aug 24 2015 09:03
or as they say read the manual ^
@jyapujuju You'll need to remove punctuation and turn everything lower case in order to check for palindromes.
@soumyaRauth yeah I'd use it with the generate new quote button so whenever the quote changes u change the url
Soumya Rauth
@soumyaRauth
Aug 24 2015 09:07
@oab00 I used the function. But I don't know why it's not working. I have been trying for hours... When I pass a variable It works fine. But when I set the function on a variable and pass the variable it does not work.
Rabin Shrestha
@jyapujuju
Aug 24 2015 09:08
@oab00 i haven't check the punctation
Omar
@oab00
Aug 24 2015 09:12
@soumyaRauth looks like it works but only once .. why not put it inside the generator?
I mean currently it generates different quote than the one in the page
Soumya Rauth
@soumyaRauth
Aug 24 2015 09:14
@oab00 Even that does not work here....
Rabin Shrestha
@jyapujuju
Aug 24 2015 09:15
@oab00 :D rtfm
Remus Cicu
@RemusAndrei
Aug 24 2015 09:19
@jyapujuju did you manage to make it ?
im stuck also here
Omar
@oab00
Aug 24 2015 09:21
works if u remove var x = generator() because it calls the function again
@soumyaRauth
Soumya Rauth
@soumyaRauth
Aug 24 2015 09:23
@oab00 Thanks I get it.
CamperBot
@camperbot
Aug 24 2015 09:23
soumyarauth sends brownie points to @oab00 :sparkles: :thumbsup: :sparkles:
:star: 210 | @oab00 | http://www.freecodecamp.com/oab00
Rabin Shrestha
@jyapujuju
Aug 24 2015 09:24
function palindrome(str) {
  var pal=str.replace(/\s/gi," ").toLowerCase();
  var pal1=str.replace(/\s/gi," ").toLowerCase().split('').reverse().join('');
  if (pal===pal1){
    return true;
  }
  else {
    return false;
  }
}
palindrome("eye");
@oab00 what's now :(??
Remus Cicu
@RemusAndrei
Aug 24 2015 09:25
does punctuation counts as white space ?
.replace(/.,;:/g,""); this is my replace
and dosen't work
Omar
@oab00
Aug 24 2015 09:26
@jyapujuju look at test case palindrome("A man, a plan, a canal. Panama")
any punctuation u didn't escape here?
yes space counts
arjunkw92
@arjunkw92
Aug 24 2015 09:31
please help me with Create Bootstrap Wells
Remus Cicu
@RemusAndrei
Aug 24 2015 09:31
paste your code first
arjunkw92
@arjunkw92
Aug 24 2015 09:31
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="well">
<div class="row">
<div class ="col-xs-6"></div>
<div class ="col-xs-6"></div>
</div>
</div>
</div>
</div>
Nnxoxo
@Nnxoxo
Aug 24 2015 09:32
@jyapujuju
var pal = str.replace(/[^a-z]/g, '').toLowerCase();
arjunkw92
@arjunkw92
Aug 24 2015 09:32
Nest one div element with the class well within each of your col-xs-6 div elements.
Remus Cicu
@RemusAndrei
Aug 24 2015 09:34
@jyapujuju
 function palindrome(str) {

 str=str.toLowerCase().replace(/\s|\,|\./g,"");
 var repal=str.toLowerCase().replace(/\s|\,|\./g,"").split('').reverse().join('');

 if (str===repal){
    return true;
  }
  else{
    return false;
  }
}



palindrome("A man, a plan, a canal. Panama");
CamperBot
@camperbot
Aug 24 2015 09:35
:bulb: to format code use backticks! ``` more info
Remus Cicu
@RemusAndrei
Aug 24 2015 09:38
@arjunkw92
<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <div class="well">
      </div>
    </div>
    <div class="col-xs-6">
        <div class="well">
      </div>
    </div>
  </div>
</div>
`
Aaron Judell
@aaronjudell
Aug 24 2015 09:38
I seem to be confused with Waypoint: Target a Specific Child of an Element Using jQuery
i thought it would be $(".well:nth-child(2)").addClass("animated bounce");
but the program is accepting $(".target:nth-child(2)").addClass("animated bounce");
target isn't a class though, so i'm not sure what it has to do with the "well" id
i mean the "well" class
Remus Cicu
@RemusAndrei
Aug 24 2015 09:39
depends what name you have for your class
or id
Aaron Judell
@aaronjudell
Aug 24 2015 09:40
i have no class or id named "target"
yet that'
that's what FCC accepts for correct
i'm pretty sure i should be using .well
but .well isn't accepted
Remus Cicu
@RemusAndrei
Aug 24 2015 09:40
try to paste your code
Aaron Judell
@aaronjudell
Aug 24 2015 09:41
the code i used is above
that's all it is. just that one line
the rest was pre-made
Remus Cicu
@RemusAndrei
Aug 24 2015 09:42
that one also , cuz i don't remember exactly what has ther e
Rabin Shrestha
@jyapujuju
Aug 24 2015 09:45
@RemusAndrei <3
Remus Cicu
@RemusAndrei
Aug 24 2015 09:45
@aaronjudell $(".target:nth-child(2)").addClass("animated bounce"); this is the right code
Aaron Judell
@aaronjudell
Aug 24 2015 09:46
i guess i'm confused why we are using ".target" and not ".well"
i don't see anything with the "target" class or id
Remus Cicu
@RemusAndrei
Aug 24 2015 09:46
@aaronjudell each button is using the "target" class
@jyapujuju you're welcome :+1:
Aaron Judell
@aaronjudell
Aug 24 2015 09:49
@RemusAndrei ohhh sorry i totally missed that. thanks a lot
CamperBot
@camperbot
Aug 24 2015 09:49
aaronjudell sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for remusandrei
Remus Cicu
@RemusAndrei
Aug 24 2015 09:50
@aaronjudell you're welcome :wink:
PhilJayN
@PhilJayN
Aug 24 2015 10:01
This message was deleted
This message was deleted
Test
Hi! How do you paste those nicely colored codes to Gitter?
Cristi Rusu
@CristiInfo
Aug 24 2015 10:07
you just type `<your code goes here>
Coira Ellison
@Coira
Aug 24 2015 10:08
for multiline code you need three backticks `
explain backticks
CamperBot
@camperbot
Aug 24 2015 10:08
no wiki entry for: backticks
:pencil: click here to create one now!after creating your page type update to reload it here
Coira Ellison
@Coira
Aug 24 2015 10:08
explain format
CamperBot
@camperbot
Aug 24 2015 10:08

: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

``` ⇦ Type 3 backticks, 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

Omar
@oab00
Aug 24 2015 10:08
@PhilJayN Ctrl + Shift + M ;)
PhilJayN
@PhilJayN
Aug 24 2015 10:11
<style>
  .red-text {
    color: red;
    font-size: 16px;
  }
</style>
Awesome! you're all amazing, thanks!
CamperBot
@camperbot
Aug 24 2015 10:11
if you want to thank someone, put an @ before their name!
PhilJayN
@PhilJayN
Aug 24 2015 10:12
Thanks, @oab00
CamperBot
@camperbot
Aug 24 2015 10:12
philjayn sends brownie points to @oab00 :sparkles: :thumbsup: :sparkles:
:star: 211 | @oab00 | http://www.freecodecamp.com/oab00
PhilJayN
@PhilJayN
Aug 24 2015 10:12
Thanks, @Coira
CamperBot
@camperbot
Aug 24 2015 10:12
philjayn sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 179 | @coira | http://www.freecodecamp.com/coira
PhilJayN
@PhilJayN
Aug 24 2015 10:12
Thanks, @CristiInfo
CamperBot
@camperbot
Aug 24 2015 10:12
philjayn sends brownie points to @cristiinfo :sparkles: :thumbsup: :sparkles:
:star: 2 | @cristiinfo | http://www.freecodecamp.com/cristiinfo
Remus Cicu
@RemusAndrei
Aug 24 2015 10:13
@CristiInfo Very nice to see that you made a elearning website in Romanian :+1:
PhilJayN
@PhilJayN
Aug 24 2015 10:31
In Waypoint: Change the Font Size of an Element, my code is not getting accepted:
<style>
  .red-text {
    color: red;
    font-size: 16px;
  }
</style>

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

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

<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Remus Cicu
@RemusAndrei
Aug 24 2015 10:32
style=“ font-size:16px” in your <p >
Nnxoxo
@Nnxoxo
Aug 24 2015 10:38
is here somebody who used forismatic.com API in the Zipline: Random Quote Machine?
PhilJayN
@PhilJayN
Aug 24 2015 10:39
@RemusAndrei You mean like this:
<p style="font-size:16px">text here </p>
Remus Cicu
@RemusAndrei
Aug 24 2015 10:40
@PhilJayN Yes :wink:
PhilJayN
@PhilJayN
Aug 24 2015 10:41
@RemusAndrei It's still not letting me finish the lesson.
Remus Cicu
@RemusAndrei
Aug 24 2015 10:46
@PhilJayN try to do in both <p> and have the class=“red-text” in both
Dennis Andersson
@deandersson
Aug 24 2015 10:47
@PhilJayN and do the font-size in the class, not inline in the p element
PhilJayN
@PhilJayN
Aug 24 2015 10:51
@deandersson This is my complete code. Is something wrong?
<style>
  .red-text {
    color: red;
    font-size: 16px;
  }
</style>

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

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

<p class="red-text"> Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Remus Cicu
@RemusAndrei
Aug 24 2015 10:53
This message was deleted
@PhilJayN
<style>
  .red-text {
    color: red;
    font-size: 16px
  }
</style>

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

<p class="red-text" style="font-size: 16px">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>
and it works for me
Dennis Andersson
@deandersson
Aug 24 2015 10:54
Try deleting the space in the beginning of the Purr. Maybe that's messing something up, because my solution looked exactly like yours
@RemusAndrei the inline style should not be necessary because you are declaring the font-size to 16px twice in your code
Once in the class and once inline
PhilJayN
@PhilJayN
Aug 24 2015 10:56
@deandersson The code works in sublime Text 2. I tested. Perhaps the problem is the autograder is not recognizing something....
Remus Cicu
@RemusAndrei
Aug 24 2015 10:57
@deandersson yes i know that , but I had some problem with it when i was doing so that’s why i suggested like that
@deandersson because for me it works without it :wink2:
Dennis Andersson
@deandersson
Aug 24 2015 10:58
Ah I see. :)
@PhilJayN did you try and remove the space character before "Purr"?
PhilJayN
@PhilJayN
Aug 24 2015 10:59
@deandersson Yes, the space before purr is removed
Dennis Andersson
@deandersson
Aug 24 2015 11:00
Try and refresh the page and reenter everything.. Sometimes something bugs out
Rabin Shrestha
@jyapujuju
Aug 24 2015 11:00
function titleCase(str) {
  var words=str.split(' ');
  for (i=0;i<words.length;i++){
   words[i]=words[i].charAt(0).toUpperCase+words.substr(1).toLowerCae();
  }
  //words.charAt();
  return words;
}
titleCase("I'm a little tea pot");
substr is not a function
PhilJayN
@PhilJayN
Aug 24 2015 11:01
@deandersson Just switched to firefox from Chrome, and it works... I'm crying right now! Speechless, I have no words lol
Thank you, @RemusAndrei for your help!
CamperBot
@camperbot
Aug 24 2015 11:01
philjayn sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for remusandrei
PhilJayN
@PhilJayN
Aug 24 2015 11:02
Thanks, @RemusAndrei
CamperBot
@camperbot
Aug 24 2015 11:02
philjayn sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for remusandrei
Dennis Andersson
@deandersson
Aug 24 2015 11:02
@PhilJayN glad it works!
PhilJayN
@PhilJayN
Aug 24 2015 11:02
Thanks, @deandersson
CamperBot
@camperbot
Aug 24 2015 11:02
philjayn sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 222 | @deandersson | http://www.freecodecamp.com/deandersson
PhilJayN
@PhilJayN
Aug 24 2015 11:03
Thanks, @RemusAndrei
CamperBot
@camperbot
Aug 24 2015 11:03
philjayn sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for remusandrei
Remus Cicu
@RemusAndrei
Aug 24 2015 11:03
@PhilJayN welcome for nothing ;) we are all here to learn and help :)
PhilJayN
@PhilJayN
Aug 24 2015 11:04
Ok, well, I think my computer is acting up. I'm able to say thanks to @deandersson , but not able to say thanks to @RemusAndrei
CamperBot
@camperbot
Aug 24 2015 11:04
philjayn sends brownie points to @deandersson and @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for remusandrei
:warning: philjayn already gave deandersson points
Remus Cicu
@RemusAndrei
Aug 24 2015 11:04
i think is some problem that i have , cuz you’re not the first one
maybe somebody has a solve for this problem
Omar
@oab00
Aug 24 2015 11:09
@RemusAndrei it's because u haven't linked github with ur freecodecamp profile
Remus Cicu
@RemusAndrei
Aug 24 2015 11:09
hehe thx @oab00 , but i have just done that
CamperBot
@camperbot
Aug 24 2015 11:09
remusandrei sends brownie points to @oab00 :sparkles: :thumbsup: :sparkles:
:star: 214 | @oab00 | http://www.freecodecamp.com/oab00
Omar
@oab00
Aug 24 2015 11:10
u have?
thanks @RemusAndrei
CamperBot
@camperbot
Aug 24 2015 11:10
oab00 sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:star: 181 | @remusandrei | http://www.freecodecamp.com/remusandrei
Omar
@oab00
Aug 24 2015 11:10
works well :)
Remus Cicu
@RemusAndrei
Aug 24 2015 11:11
finnaly , had the impresion that i already linked my github
PhilJayN
@PhilJayN
Aug 24 2015 11:11
Thanks, @RemusAndrei
CamperBot
@camperbot
Aug 24 2015 11:11
philjayn sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:star: 182 | @remusandrei | http://www.freecodecamp.com/remusandrei
PhilJayN
@PhilJayN
Aug 24 2015 11:11
@RemusAndrei It works now! Sent you thanks!
CamperBot
@camperbot
Aug 24 2015 11:11
philjayn sends brownie points to @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: philjayn already gave remusandrei points
Betsey Biggs
@betsbillabong
Aug 24 2015 11:43
Hey, I'm trying to figure out whether there is a bug on Waypoint: Target the Parent of an Element using jQuery, or whether I'm doing the code wrong. It appears correct, and my left-well turns red, but it won't let me move on. Can anyone take a quick peek at my code?
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#left-well").parent().css("background-color", "red");
  });
Dennis Andersson
@deandersson
Aug 24 2015 11:45
@betsbillabong you are changing the parent of "left-well" you should target the parent of "target1"
"Give the parent of the #target1 element background-color of red"
Dinu Sisianu
@blindesti
Aug 24 2015 11:46
hello, i need a help with Bonfire: Return Largest Numbers in Arrays
function largestOfFour(arr) {
// You can do this!
var largest = 0;
var biggestArray = [];
for(i = 0; i<arr.length;i++){
for(h=0; h<arr[i].length;h++){
if(largest< arr[i][h]){
largest = arr[i][h];
}
biggestArray[i] = largest;
}
}
return biggestArray;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
i get the error expected [ 27, 27, 39, 1001 ] to deeply equal [ 27, 5, 39, 1001 ]
dont understand this
Dennis Andersson
@deandersson
Aug 24 2015 11:48
you are not resetting largest before moving on to the nex subarray
Betsey Biggs
@betsbillabong
Aug 24 2015 11:48
@deandersson thank you! i had just figured that out. duh.
CamperBot
@camperbot
Aug 24 2015 11:48
betsbillabong sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 223 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 24 2015 11:48
@betsbillabong awesome :)
Dinu Sisianu
@blindesti
Aug 24 2015 11:50
@deandersson thanks for answer i will look now on that
CamperBot
@camperbot
Aug 24 2015 11:50
blindesti sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 224 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 24 2015 11:50
@blindesti no problem
Betsey Biggs
@betsbillabong
Aug 24 2015 11:58

Running into another problem. I am stuck on targeting multiple selectors using nth child:

 $("#left-well:nth-child(2), #right-well:nth-child(2)").addClass("animated bounce");

I am trying to make the second child in each of the well elements bounce. ???

Betsey Biggs
@betsbillabong
Aug 24 2015 12:04
@deandersson are you still around?
Dennis Andersson
@deandersson
Aug 24 2015 12:08
yes, was on the phone.. :) yes that one is a bit misleading, you are actually targeting the nth-child of the selectors parent.. :)
Remus Cicu
@RemusAndrei
Aug 24 2015 12:08
@betsbillabong what seem to be the problem ?
Dennis Andersson
@deandersson
Aug 24 2015 12:08
what you should do is select #left-well :nth-child(2) notice the space between left-well and nth-child
I actually gave the wrong answer (that also works) to someone else, but another one offered this solution. What happens is that you are selecting #left-well *:nth-child(2)
Remus Cicu
@RemusAndrei
Aug 24 2015 12:10
@betsbillabong
 $("#left-well:nth-child(2).addClass("animated bounce”));
it’s just one side that you select @betsbillabong , or i might be mistaking
:P
Dennis Andersson
@deandersson
Aug 24 2015 12:10
@RemusAndrei that is not correct because he will select the nth-child of the parent of #left-well
https://api.jquery.com/nth-child-selector/ look at the example, hopefully it will make things clear
so if you only want to select the buttons of #left-well you would use $("#left-well button:nth-child(2))
Vanja Valent
@walent021
Aug 24 2015 12:12
Why do all the javascript challenges have bunch of code in the steps
Screenshot_5.jpg
Betsey Biggs
@betsbillabong
Aug 24 2015 12:13
aw, thx @deandersson and @RemusAndrei . So it's just the space? I'm trying to separate the issues of "using nth child at all" and "making it work with both the left and right wells". Here's what I've got now, and it's not working.
$("#left-well: nth-child(2)").addClass("animated shake");
CamperBot
@camperbot
Aug 24 2015 12:13
betsbillabong sends brownie points to @deandersson and @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: betsbillabong already gave deandersson points
:star: 184 | @remusandrei | http://www.freecodecamp.com/remusandrei
Betsey Biggs
@betsbillabong
Aug 24 2015 12:13
@deandersson should be bounce, but whatever!
Vanja Valent
@walent021
Aug 24 2015 12:14
@betsbillabong i recall it being target, not #left-well
Betsey Biggs
@betsbillabong
Aug 24 2015 12:15
Will look forward to what any of you have to say… gotta go, my toddler's been stuck in her room while I figure this out! Thank you @deandersson @RemusAndrei ! Note, I'm a gal, not a guy :-)
CamperBot
@camperbot
Aug 24 2015 12:15
betsbillabong sends brownie points to @deandersson and @remusandrei :sparkles: :thumbsup: :sparkles:
:warning: betsbillabong already gave deandersson points
:warning: betsbillabong already gave remusandrei points
Remus Cicu
@RemusAndrei
Aug 24 2015 12:15
yes but left-well and right-well don’t have child @betsbillabong
Dennis Andersson
@deandersson
Aug 24 2015 12:15
you have #left-well: nth-child(2)it should be #left-well :nth-child(2)
Javed Khan
@JavedKhan1588
Aug 24 2015 12:15
Your img element should have the class smaller-image
Remus Cicu
@RemusAndrei
Aug 24 2015 12:15
This message was deleted
@deandersson nevermind :P
Dennis Andersson
@deandersson
Aug 24 2015 12:16
@RemusAndrei hehe
@walent021 yes you could use #target1aswell it would be the same result in this case.. I wanted to show how nth-child works
Remus Cicu
@RemusAndrei
Aug 24 2015 12:18
@deandersson now i got also how it works better :P
Dennis Andersson
@deandersson
Aug 24 2015 12:19
@RemusAndrei great :)
Betsey Biggs
@betsbillabong
Aug 24 2015 12:21
@deandersson thank you! and @RemusAndrei . Yes, we were supposed to use nth-child in this exercise. I understand better now. Got it! All in one line:
    $("#left-well :nth-child(2), #right-well :nth-child(2)").addClass("animated bounce");
Dennis Andersson
@deandersson
Aug 24 2015 12:21
@betsbillabong awesome! :)
kalpesh05
@kalpesh05
Aug 24 2015 12:24
Comment your JavaScript Code what is this exercise
Dennis Andersson
@deandersson
Aug 24 2015 12:25
@kalpesh05 create two comments, one of each type :)
If its not working, try to refresh the page.
Betsey Biggs
@betsbillabong
Aug 24 2015 12:34
I'm curious about targeting odd and even numbered elements in jquery. I was able to easily pass the waypoint; however, it seems to me that 'even' chooses the odd-numbered slots and vice versa (not targets, the exercises had us move them around and apparently it's going for location, not ID number). Can anyone tell me why?
http://www.freecodecamp.com/challenges/waypoint-target-even-numbered-elements-using-jquery
kalpesh05
@kalpesh05
Aug 24 2015 12:36
his is why not done....
it's done
Dennis Andersson
@deandersson
Aug 24 2015 12:38
@betsbillabong It might have to do with it beeing zero indexed behind the scenes, so 0/2 is 0 which is "even"
Im not completely sure, just guessing
which would make the third element in the well numbered 2 which is "even"
anyhoo, im off to the coffee room.. :)
Betsey Biggs
@betsbillabong
Aug 24 2015 12:58
@deandersson that makes perfect sense. thank you. happy coffee, we're out for a walk to coffee ourselves. yay caffeine!
CamperBot
@camperbot
Aug 24 2015 12:58
betsbillabong sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 226 | @deandersson | http://www.freecodecamp.com/deandersson
Dan Stockham
@DanStockham
Aug 24 2015 13:09
Is there reason why I'm not getting the collapsed button to properly display?
Dennis Andersson
@deandersson
Aug 24 2015 13:11
@DanStockham you have some typos, you have collaspe and collasped it should be collapse and collapsed :)
@DanStockham also be sure to include the bootstrap javascript aswell
Important that is included after jquery
Dan Stockham
@DanStockham
Aug 24 2015 13:13
@deandersson It's been included.
Martins Bormanis
@martinsb6
Aug 24 2015 13:13
Hi, can someone help me with Bonfire: Return Largest Numbers in Arrays task?
Dan Stockham
@DanStockham
Aug 24 2015 13:13
@deandersson I already included the link in the settings of Codepen.io
Dennis Andersson
@deandersson
Aug 24 2015 13:16
also you have data-toggle="#bs-example-navbar-collapse-1" should be data-target="#bs-example-navbar-collapse-1"
and data-toggle="collapse"
Jonny Morley
@morley92
Aug 24 2015 13:17
Hi guys, if anybody has a moment, could you just go to this link and test to see if it displays your correct location?
http://codepen.io/Morleee/full/NqQRPW
Zaynaib (Ola) Giwa
@zaynaib
Aug 24 2015 13:18
@morley92 I'm getting nothing
@morley92 I stand corrected. it works
Dennis Andersson
@deandersson
Aug 24 2015 13:18
@DanStockham you also have <button type="button" class="navbar toggle-collapsed"
should be <button type="button" class="navbar-toggle collapsed"
Jonny Morley
@morley92
Aug 24 2015 13:19
@zaynaib thanks zayn, seems like there is quite a delay though...
CamperBot
@camperbot
Aug 24 2015 13:19
morley92 sends brownie points to @zaynaib :sparkles: :thumbsup: :sparkles:
:star: 292 | @zaynaib | http://www.freecodecamp.com/zaynaib
Dan Stockham
@DanStockham
Aug 24 2015 13:20
This is my updated page: http://codepen.io/DanStockham/pen/VLJQba
Dennis Andersson
@deandersson
Aug 24 2015 13:21
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
       <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#"><h2>Daniel Stockham</h2></a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
Here is the code working, notice the class of the button, it is navbar-toggle collapsednot navbar toggle-collapsed
Zaynaib (Ola) Giwa
@zaynaib
Aug 24 2015 13:21
@morley92 this is what I used when I was working on the weather app api for geolocation http://www.w3schools.com/html/html5_geolocation.asp
Jonny Morley
@morley92
Aug 24 2015 13:22
@zaynaib i was thinking about using that but opted for something which doesnt prompt the user
Dan Stockham
@DanStockham
Aug 24 2015 13:23
@deandersson Now it's working.
Dennis Andersson
@deandersson
Aug 24 2015 13:23
@DanStockham great :)
Zaynaib (Ola) Giwa
@zaynaib
Aug 24 2015 13:24
@morley92 I see you want you mean.
Dan Stockham
@DanStockham
Aug 24 2015 13:26
@deandersson I think the best thing I can do next time is just copy and paste, then make my adjustments.
Dennis Andersson
@deandersson
Aug 24 2015 13:27
@DanStockham I think what you did is the optimal way, because the best way to learn something is to struggle with it and make mistakes. Otherwise you will not learn how to troubleshoot problems which is a big part of this :)
Its the same way I did when I did my project, and I believe that is the reason I could help you this time, because I struggled aswell
Dan Stockham
@DanStockham
Aug 24 2015 13:31
@deandersson Hey if you ain't struggling, you ain't growing.
Dennis Andersson
@deandersson
Aug 24 2015 13:32
@DanStockham exactly!
Ashley Drake
@aldraco
Aug 24 2015 13:38
morning - can anyone help me with a heroku problem??? thanks :)
CamperBot
@camperbot
Aug 24 2015 13:38
if you want to thank someone, put an @ before their name!
Greg Noble
@gregnoble
Aug 24 2015 13:49

Im working on the symmetric difference algorithm and it says The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.

if you had [1, 2, 5], [2, 3, 5], [3, 4, 5] - should the Symmetric Difference be [1,4] ? - the test for the algorithm is telling me it expects [1,4,5] but based on the instructions, 5 is in all 3 arrays so shouldn't it be removed from the returned result?

Blauelf
@Blauelf
Aug 24 2015 13:50
It is in an odd number of sets.
Logan Tegman
@ltegman
Aug 24 2015 13:50
@gregnoble The way I found it easier to think about it is that you first do the difference of two of them, which means there is no five in the set, then when you do the difference between that set and the third you keep the five because it’s only in one of those two sets.
Greg Noble
@gregnoble
Aug 24 2015 13:51
interesting... i was doing all arguments and reducing them to one single array of unique values
Logan Tegman
@ltegman
Aug 24 2015 13:52
@gregnoble Here’s a video on it that is pretty popular among FCC learners: https://www.youtube.com/watch?v=PxffSUQRkG4
Greg Noble
@gregnoble
Aug 24 2015 13:52
unfortunately YouTube is blocked here :-1:
@ltegman @Blauelf Thank you
CamperBot
@camperbot
Aug 24 2015 13:53
gregnoble sends brownie points to @ltegman and @blauelf :sparkles: :thumbsup: :sparkles:
:star: 191 | @ltegman | http://www.freecodecamp.com/ltegman
:star: 198 | @blauelf | http://www.freecodecamp.com/blauelf
Dan Stockham
@DanStockham
Aug 24 2015 14:01
thank @deandersson
CamperBot
@camperbot
Aug 24 2015 14:01
danstockham sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 227 | @deandersson | http://www.freecodecamp.com/deandersson
Alex Lebedev
@alexey-broadcast
Aug 24 2015 14:07
Hi all! Got a trouble in 'Waypoint: Iterate over Arrays with map'
Has someone completed it?
Vectorjay
@Vectorjay
Aug 24 2015 14:08
Hi Everyone
Nnxoxo
@Nnxoxo
Aug 24 2015 14:12
@alexey-broadcast link the code
EphemeralArchitect
@EphemeralArchitect
Aug 24 2015 14:13
did FreeCodeCamp's map change within the last month?
did they add and take away waypoints?
Jonny Morley
@morley92
Aug 24 2015 14:13

sorry for asking again, but could any of you guys test this please? results might take a few seconds to return, will give brownie points in return!

http://codepen.io/Morleee/pen/NqQRPW

Dennis Andersson
@deandersson
Aug 24 2015 14:20
@morley92 It doesnt find my location. I had the same problem when I did the weather app and I solved it by either using the parameter "type=like" in the call to openweathermap or by using google reverse geocoding to get the city and use the cityname in the call to openweathermap
Jonny Morley
@morley92
Aug 24 2015 14:20
so i should use the city instead of coordinates?
i've seen the like thing, i'll add that on
Doug Riblet
@DougRiblet
Aug 24 2015 14:21
@morley92 Looks good so far. The geolocation shows a small town a few miles from where I actually live.
Dennis Andersson
@deandersson
Aug 24 2015 14:21
I think it is enough to use the type=like parameter
the reason for using something like google to find the city name would be that it seems more accurate
Jonny Morley
@morley92
Aug 24 2015 14:22
@deandersson thankyou
Dennis Andersson
@deandersson
Aug 24 2015 14:23
@morley92 no problem
Aaron Freidus
@shadowfool
Aug 24 2015 14:26
Well that's funny
I got a strange error coming from my twitch api calls which I fixed last night, only to realize it's because the network I'm on blocks twitch so the calls fail from the get go
James Funk
@jfunk46360
Aug 24 2015 14:27

Trouble with Bonfire "Reversing a String". Supposed to turn a string into an array and reverse it. Output must be a string.

function reverseString(str) {
return str;
}
var array = str.split();

array.reverse();
var str=array.join();

reverseString('hello');
reverseString('Howdy');
reverseString('Greetings from Earth');

Aaron Freidus
@shadowfool
Aug 24 2015 14:27
Str is not defined in the scope outside of the bracket
Nnxoxo
@Nnxoxo
Aug 24 2015 14:28
@jfunk46360 put all of ur code inside of function reverseString
Aaron Freidus
@shadowfool
Aug 24 2015 14:29
So var array = str.reverse(); is reversing nothing
Grace
@dogbot101
Aug 24 2015 14:36
@morley92 It worked for me.
James Funk
@jfunk46360
Aug 24 2015 14:41

Make some changes but still don't know how to proceed...

function reverseString(str) {
return str;

var array = str.split();

array.reverse();
array.join();

reverseString('hello');
reverseString('Howdy');
reverseString('Greetings from Earth');
}

Aaron Freidus
@shadowfool
Aug 24 2015 14:42
Your function calls can't be inside of the function
Secondly .split() needs an input otherwise it's not going to do anything
Blauelf
@Blauelf
Aug 24 2015 14:45
It is going to do something. Stuff that string into an array.
Javed
@JayBee007
Aug 24 2015 14:46
anyone here with a good grasp of CSS?
Blauelf
@Blauelf
Aug 24 2015 14:46
And you might want to use .join(''), too.
Aaron Freidus
@shadowfool
Aug 24 2015 14:46
Thirdly the same goes for .join
André Duarte
@clint74
Aug 24 2015 14:47
@jfunk46360 split('') and join('')
MaddyGun
@MaddyGun
Aug 24 2015 14:47
I'm working on Waypoint:Specify How Fonts Should Degrade . I've commented font import statement but code is not getting validated. Can anyone point me if I made mistake? Pasting my code below -

I'm working on Waypoint:Specify How Fonts Should Degrade . I've commented font import statement but code is not getting validated. Can anyone point me if I made mistake? Pasting my code below - <!-- <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"> -->

<style>

.red-text {
color: red;
}

h2 {
font-family: Lobster;
}

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

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

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

Dennis Andersson
@deandersson
Aug 24 2015 14:48
You forgot to also specify what font h2should degrade to
check the hints in the challenge :)
MaddyGun
@MaddyGun
Aug 24 2015 14:52
That worked, Thnx a lot !!!!
CamperBot
@camperbot
Aug 24 2015 14:52
if you want to thank someone, put an @ before their name!
Dennis Andersson
@deandersson
Aug 24 2015 14:52
@MaddyGun great :)
MaddyGun
@MaddyGun
Aug 24 2015 14:53
@deandersson , Thnx a lot!!!
CamperBot
@camperbot
Aug 24 2015 14:53
maddygun sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 228 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 24 2015 14:53
hehe thanks for the brownies
CamperBot
@camperbot
Aug 24 2015 14:53
if you want to thank someone, put an @ before their name!
Dennis Andersson
@deandersson
Aug 24 2015 14:53
@MaddyGun thx :)
no brownies, baaah @MaddyGun Thanks
CamperBot
@camperbot
Aug 24 2015 14:54
deandersson sends brownie points to @maddygun :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for maddygun
Dennis Andersson
@deandersson
Aug 24 2015 14:54
hehe
Sean Groff
@SeanGroff
Aug 24 2015 15:05
General question here, is there a popular website you guys use to find images and background images for your website projects? Images that you are free to use.
Lucas Vorsteveld
@Lucashv
Aug 24 2015 15:06
@sgroff04 I use google or yahoo image and both have an option to only show photos that are available for reuse
Sean Groff
@SeanGroff
Aug 24 2015 15:08
@Lucashv Wow thanks! I never knew Google Images had such a filter. Do you choose "Labeled for noncommercial use" when using Google Images?
CamperBot
@camperbot
Aug 24 2015 15:08
sgroff04 sends brownie points to @lucashv :sparkles: :thumbsup: :sparkles:
:star: 225 | @lucashv | http://www.freecodecamp.com/lucashv
Lucas Vorsteveld
@Lucashv
Aug 24 2015 15:09
I choose 'labeled for reuse' it seems the most broad to me, like the most likely to not cause any issues
Sean Groff
@SeanGroff
Aug 24 2015 15:10
ok cool, really glad to learn this :)
Will Moody
@willmoody
Aug 24 2015 15:11

Hey guys, I'm a little confused, how do I access the 2, 3 at the end of arr here?

function destroyer(arr) {
  // Remove all the values
return arr;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);

I 'm sure the method has something to do with arguments (because that is one of the helpful links on the challenge), but arr only returns [1, 2, 3, 1, 2, 3], and trying to access it via something like return arr[1] or return arr[7] will only return values for [1, 2, 3, 1, 2, 3]. I'm sure there's some basic concept I'm misunderstanding or something

Lucas Vorsteveld
@Lucashv
Aug 24 2015 15:12
yeah, I also then host them on imur.com instead of wherever they come from
Blauelf
@Blauelf
Aug 24 2015 15:12
There is a special object "arguments" which can be used like an array and holds all the arguments passed to your function.
Lucas Vorsteveld
@Lucashv
Aug 24 2015 15:12
I figure its better to use the imgur bandwidth since its made for that but idk if its really necessary
Sean Groff
@SeanGroff
Aug 24 2015 15:13
Yea I agree, I do that as well
Will Moody
@willmoody
Aug 24 2015 15:17
@Blauelf oooooh, I gotcha. Thanks a lot!
CamperBot
@camperbot
Aug 24 2015 15:17
fractal-mind sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star: 208 | @blauelf | http://www.freecodecamp.com/blauelf
Malik Dixon
@mdixon47
Aug 24 2015 15:18

OK I am confused. It looks like I have everything right, however it is not passing. Here is the code for using conditions using if /else statements

function myFunction(){
  var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;
  // Create an if-else statement here to return "heads" if flip is 0. Otherwise return "tails".
  // Only change code below this line.
  if (1 === 2) {
  return(true);
  }
else {
  return(false);
  }
}
// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
(function(){return(myFunction());})();

Can someone slap me in the back of the head

LKian
@LKian
Aug 24 2015 15:20
hey is anyone doing the waypoints?
Is the ugly code showing up on the left?
/is it a bug
Blauelf
@Blauelf
Aug 24 2015 15:20
@mdixon47 Why should 1 ever equal 2?
Nnxoxo
@Nnxoxo
Aug 24 2015 15:20
@kahwasaurus show the code whast's wrong/
André Duarte
@clint74
Aug 24 2015 15:20
@mdixon47 if (flip===0) { return "heads" } else ....
LKian
@LKian
Aug 24 2015 15:21
its on the instructions side on the left
ssert((function(d){if(d[0] == 'John' && d1 == 23 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left(["John", 23])');
assert((function(d){if(d[0] == 'cat' && d1 == 2 && d[2] == undefined){return(true);}else{return(false);}})(removed), 'myArray should only have the first two values left(["cat"], 2)');
it used to have nice pretty instructions
Dennis Andersson
@deandersson
Aug 24 2015 15:22
@kahwasaurus I find those pretty good since it shows exactly what the challenge is expecting
André Duarte
@clint74
Aug 24 2015 15:23
@kahwasaurus focus on this 'myArray should only have the first two values left(["John", 23])'
LKian
@LKian
Aug 24 2015 15:23
but just curious if it's a bug
Malik Dixon
@mdixon47
Aug 24 2015 15:23
@Blauelf good observation however I have changed the condition to (1 === 1) and it don't work.
LKian
@LKian
Aug 24 2015 15:23
anyway i'm stuck on "Warpoint: Manipulate Arrays with Pop"
I popped off the last item from the array but it isn't letting me pass.
André Duarte
@clint74
Aug 24 2015 15:24
@mdixon47 You must do this // Create an if-else statement here to return "heads" if flip is 0. Otherwise return "tails".
Dennis Andersson
@deandersson
Aug 24 2015 15:25
@kahwasaurus can you post your code?
LKian
@LKian
Aug 24 2015 15:26
var myArray = ["John", 23, ["cat", 2]];
// Only change code below this line.
myArray.pop();
var removed = myArray;
Malik Dixon
@mdixon47
Aug 24 2015 15:26
@clint74 Thank you for the slap in the head.
CamperBot
@camperbot
Aug 24 2015 15:26
mdixon47 sends brownie points to @clint74 :sparkles: :thumbsup: :sparkles:
:star: 219 | @clint74 | http://www.freecodecamp.com/clint74
Dennis Andersson
@deandersson
Aug 24 2015 15:27
@kahwasaurus removedshould contain the last item, so you have to myArray.pop()to removed
var removed = myArray.pop()
the pop()function returns the item popped
LKian
@LKian
Aug 24 2015 15:27
@deandersson Oh i feel like an idiot. Thank you!
CamperBot
@camperbot
Aug 24 2015 15:27
kahwasaurus sends brownie points to @deandersson :sparkles: :thumbsup: :sparkles:
:star: 229 | @deandersson | http://www.freecodecamp.com/deandersson
Dennis Andersson
@deandersson
Aug 24 2015 15:28
@kahwasaurus no problem :)
Aaron Freidus
@shadowfool
Aug 24 2015 15:29
.. A restart just whipped out my code pen
James Funk
@jfunk46360
Aug 24 2015 15:31

Code must accept a string, load into an array, reverse the input, and output the string. Something is not correct here.

function reverseString(str) {

var array = str.split("");

array.reverse("");
array.join("");
return str;
}

reverseString('hello');
reverseString('Howdy');
reverseString('Greetings from Earth');

André Duarte
@clint74
Aug 24 2015 15:33
@jfunk46360 You must store the value on each operation, ex: array = array.reverse(); and reverse doesnot have ""
@jfunk46360 in the end you are returning str :worried: and str is an unmodified string, thus returning tha same
James Funk
@jfunk46360
Aug 24 2015 15:43

Thanks @clint74. Updated code seems to work, but only for the last function call.

function reverseString(str) {

var array = str.split("");

array=array.reverse();
str=array.join("");
return str;
}

reverseString('hello');
reverseString('Howdy');
reverseString('Greetings from Earth');

CamperBot
@camperbot
Aug 24 2015 15:43
jfunk46360 sends brownie points to @clint74 :sparkles: :thumbsup: :sparkles:
:star: 221 | @clint74 | http://www.freecodecamp.com/clint74
zcrnivec
@zcrnivec
Aug 24 2015 15:45
This message was deleted
Dennis Andersson
@deandersson
Aug 24 2015 15:48
@jfunk46360 that sounds like you have a space split, like str.split(" ")
But if it is like you pasted it should work
André Duarte
@clint74
Aug 24 2015 15:49
@jfunk46360 I've just copied your code to my challenges/bonfire-reverse-a-string and it's passed
Dennis Andersson
@deandersson
Aug 24 2015 15:50
Ignore my last comment, because it would not work with the last function call either
Try refreshing the page and enter the code again
André Duarte
@clint74
Aug 24 2015 15:53
@jfunk46360 It seems to be an caching problem, do it as @deandersson said
James Funk
@jfunk46360
Aug 24 2015 16:00
I refreshed and repasted, and the code passes the Bonfire, but I only see the last string reversed. Not sure why I don't see all three strings reversed, but I guess it is time to move on to the next bonfire. Thank you peeps!
CamperBot
@camperbot
Aug 24 2015 16:00
if you want to thank someone, put an @ before their name!
James Funk
@jfunk46360
Aug 24 2015 16:00
Oops, thank you @clint74 and @deandersson