These are chat archives for FreeCodeCamp/Help

21st
Sep 2015
Karolis
@Luomint
Sep 21 2015 00:15
bf seek
CamperBot
@camperbot
Sep 21 2015 00:15

: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

Karolis
@Luomint
Sep 21 2015 00:15
hint
CamperBot
@camperbot
Sep 21 2015 00:15
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
kgoode517
@kgoode517
Sep 21 2015 00:29
Bonfire: Repeat a string repeat a string
CamperBot
@camperbot
Sep 21 2015 00:29

:fire:Bonfire: Repeat a string repeat a string :link:

function repeat(str, num) {
  // repeat after me
  return str;
}

repeat('abc', 3);

Repeat a given string (first argument) n times (second argument). Return an empty string if n is a negative number.

more info:  bf details | bf links | hint

kgoode517
@kgoode517
Sep 21 2015 00:29
hint
CamperBot
@camperbot
Sep 21 2015 00:29
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
MrDrBird
@MrDrBird
Sep 21 2015 00:32
are there zipline chat rooms?
like the way there are for bonfires
which one are you on?
MrDrBird
@MrDrBird
Sep 21 2015 00:34
@qualitymanifest thank you. im redoing the twitchtv app in angular
CamperBot
@camperbot
Sep 21 2015 00:34
mrdrbird sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 219 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
DJ
@qualitymanifest
Sep 21 2015 00:34
ah. a ways past me. no problem
MrDrBird
@MrDrBird
Sep 21 2015 00:44
is it possible to create an array of information gathered from the $.getJson() command?
Mateja Trifunovski
@Matko95
Sep 21 2015 00:46
sure
you just push them
MrDrBird
@MrDrBird
Sep 21 2015 00:50
hmmmm, ive been trying for a while, but nothing is working for me
Hamid Edouiki
@hamidos
Sep 21 2015 00:57
hello every one , i don't know but the counter of waypointes stops
thefacilitator
@thefacilitator
Sep 21 2015 00:58
Hey guys, up to Create a JavaScript Slot Machine and am getting a syntax error when applying my code
slotOne = Math.floor(Math.random()( * (3 - 1 + 1)) + 1; slotTwo = Math.floor(Math.random()( * (3 - 1 + 1)) + 1; slotThree = Math.floor(Math.random()( * (3 - 1 + 1)) + 1;
Not sure if it's my outdated browser playing up though, rather than the code itself
MrDrBird
@MrDrBird
Sep 21 2015 01:08
This message was deleted
Kris Gesling
@krisgesling
Sep 21 2015 01:08
@thefacilitator should there be something else after Math.random()
MrDrBird
@MrDrBird
Sep 21 2015 01:08
@Matko95
var list= [];

var getInfo = function(input){

  $.getJson('https://api.twitch.tv/kraken/users/' + input + '?callback=?',function(response){
    list.push(response.name);
  });
};

getInfo('freecodecamp');
this breaks the rest of my code.... and doesnt push anything into list[]
happen to know why?
Kris Gesling
@krisgesling
Sep 21 2015 01:09
@thefacilitator between that and the next set of ()
MrDrBird
@MrDrBird
Sep 21 2015 01:10
^looks like its just on the wrong side of the ()
Arpan Shrestha
@pseudo57
Sep 21 2015 01:35
This message was deleted
CamperBot
@camperbot
Sep 21 2015 01:35
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Arpan Shrestha
@pseudo57
Sep 21 2015 01:35
This message was deleted
John Oksasoglu
@oksas
Sep 21 2015 01:45
anyone know what causes/how to fix these seemingly impossible to fix margins between button elements that are lined up side by side? http://codepen.io/oksas/pen/JYKogg
thefacilitator
@thefacilitator
Sep 21 2015 01:46
@krisgesling Is it a ; by chance?
John Oksasoglu
@oksas
Sep 21 2015 01:46
not sure if I'm missing something really obvious, but I can't seem to get the margins to disappear in between the buttons. especially weird that there's clearly no margin on the edges (since the far left one is flush up against the edge of the page), only in between each button
Matt Everson
@matteverson
Sep 21 2015 02:00
@oksas It's because of the return and indentation between them in your html
Kris Gesling
@krisgesling
Sep 21 2015 02:02
@thefacilitator soz, went for breaky - I think you want an asterix as Math.random() gives you a number between 0 and 1 and you then want to multiply it by some other factors to make it more useful. Without an * javascript isn't smart enough to know that you want to multiply it with the numbers straight after like you can in algebra.
Johnathan Brown
@Legend28469
Sep 21 2015 02:03
For the zipline “Build a peronal portfolio page”. I’m having a hardtime getting started. Any advice?
Kris Gesling
@krisgesling
Sep 21 2015 02:03
oh just looked at your code again, the * is there it's just surrounded by another set of () so just remove those.
@Legend28469 what are you stuck on? Have you had a look at bootstraps getting started guide?
Hans van Riet
@hansinla
Sep 21 2015 02:04
@oksas margin: -2px;
Onel Harrison
@oharrison
Sep 21 2015 02:04
Hello guys. I'm trying to do the fullstack projects but I'm having a hard time setting up the c9 dev environment
Johnathan Brown
@Legend28469
Sep 21 2015 02:05
@krisgesling No, I haven’t. I’ll check that out now actually
Hans van Riet
@hansinla
Sep 21 2015 02:06
@oharrison I just did that shroud be pretty painless, what’s your issue?
Johnathan Brown
@Legend28469
Sep 21 2015 02:07
Is it “cheating" if I start with this
Julius
@Rennix1
Sep 21 2015 02:09
is there something i'm missing for adding padding to buttons? it works when i add the padding to the <li>, but i need to add padding to <a> so the whole CSS button is clickable. here is my codepen http://codepen.io/Rennix/pen/xwVNZK
Aaron Freidus
@shadowfool
Sep 21 2015 02:11
@Legend28469 I'd recomend starting from scratch.
Julius
@Rennix1
Sep 21 2015 02:12
@Legend28469 here's a good starting point for the menu if you don't wanna use bootstrap rows and cols. http://www.htmlgoodies.com/beyond/css/how-to-create-horizontal-navigation-with-css3.html
Aaron Freidus
@shadowfool
Sep 21 2015 02:12
This message was deleted
CamperBot
@camperbot
Sep 21 2015 02:12
Sorry, can't find a bonfire called symetreic difference. [ Check the map? ]
Aaron Freidus
@shadowfool
Sep 21 2015 02:12
This message was deleted
CamperBot
@camperbot
Sep 21 2015 02:12
Sorry, can't find a bonfire called symmeteric difference. [ Check the map? ]
Aaron Freidus
@shadowfool
Sep 21 2015 02:12
This message was deleted
CamperBot
@camperbot
Sep 21 2015 02:12

:fire:Bonfire: Symmetric Difference :link:

function sym(args) {
  return arguments;
}

sym([1, 2, 3], [5, 2, 1, 4]);

Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.

more info:  bf details | bf links | hint

Johnathan Brown
@Legend28469
Sep 21 2015 02:12
@shadowfool I think you’re right
Onel Harrison
@oharrison
Sep 21 2015 02:13
@hansinla The setup fails with this error: events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Object [object Object] has no method 'isAbsolute'
at Generator.processDirectory (/home/ubuntu/.nvm/v0.10.35/lib/node_modules/generator-angular-fullstack/util.js:110:19)
at Generator.generateProject (/home/ubuntu/.nvm/v0.10.35/lib/node_modules/generator-angular-fullstack/app/generator.js:399:14)
at /home/ubuntu/.nvm/v0.10.35/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:429:16
at processImmediate [as _immediateCallback] (timers.js:354:15)
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:13
Hi everyone, I'm having some trouble on the last basic algo bonfire. My code works for all cases except when the value exceeds all others in the array. Any tips for this last case?
Aaron Freidus
@shadowfool
Sep 21 2015 02:13
It's tempting to start off with that template to make a nice looking site, but really the point of the exercise is to think about how the example website is coded and reverse-engineer it on your own
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:13
should I just make an exception for when num > last element in array or is there a better way
Aaron Freidus
@shadowfool
Sep 21 2015 02:14
@pkennedy89 Could you link your code?
Hans van Riet
@hansinla
Sep 21 2015 02:14
@oharrison This is when you’re trying to setup? Just create a new Node.js workspace and delete the old one.
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:14
oops! will do @shadowfool
Johnathan Brown
@Legend28469
Sep 21 2015 02:14
@shadowfool You’re right I mostly would like to learn so that’s what I’ll do
Aaron Freidus
@shadowfool
Sep 21 2015 02:15
hint
CamperBot
@camperbot
Sep 21 2015 02:15
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Hans van Riet
@hansinla
Sep 21 2015 02:15
@pkennedy89 what is the bonfire?
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:15

@shadowfool function where(arr, num) {
// Find my place in this sorted array.
function sortNumber(a,b){
return a - b;
}
var sortedArr = arr.sort(sortNumber);

for(var i=0; i <= sortedArr.length;i++){
if (num <= sortedArr[i]){
return i;
}
}
}

console.log(where([2,5,10], 11));

@hansinla It's 'Where do I belong'
my code currently returns undefined
Julius
@Rennix1
Sep 21 2015 02:15
if you dont know where to start for the nav bar check this out http://www.htmlgoodies.com/beyond/css/how-to-create-horizontal-navigation-with-css3.html
Aaron Freidus
@shadowfool
Sep 21 2015 02:16
var sortedArr = arr.sort(sortNumer);
Prabhu
@itsprabhucbe
Sep 21 2015 02:17
best example to imagine this formula ..Math.floor(Math.random() * (3 - 1 + 1)) + 1;
Aaron Freidus
@shadowfool
Sep 21 2015 02:17
what are you trying to do there?
Onel Harrison
@oharrison
Sep 21 2015 02:17
@hansinla Yes that is when I'm trying to set up. I followed the FCC instructions which led me to that error
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:17
return a sorted array where sortNumer orders the numeric values. this part seems to work fine
Julius
@Rennix1
Sep 21 2015 02:17
if anyone is good with css would you mind taking a look at my code. is there something i'm missing for adding padding to buttons? it works when i add the padding to the <li>, but i need to add padding to <a> so the whole CSS button is clickable. here is my codepen http://codepen.io/Rennix/pen/xwVNZK
Aaron Freidus
@shadowfool
Sep 21 2015 02:18
function where(arr, num) {
// Find my place in this sorted array.
function sortNumber(a,b){
return a - b;
}
var sortedArr = arr.sort(sortNumber);
for(var i=0; i <= sortedArr.length;i++){
if (num <= sortedArr[i]){
return i;
}
}
}
console.log(where([2,5,10], 11));
Sorry just linking your code with formating
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:18
No thank you, I need to learn how to do that :)
CamperBot
@camperbot
Sep 21 2015 02:18
if you want to thank someone, put an @ before their name!
Rich Churcher
@richchurcher
Sep 21 2015 02:18
@pkennedy89 Array.sort()is an in-place sort, you don't need to assign it to anything :)
Aaron Freidus
@shadowfool
Sep 21 2015 02:18
@pkennedy89 My question is what do you want sortNumber to sort. Currently you're not passing any variables to sortNumber function
Hans van Riet
@hansinla
Sep 21 2015 02:18
@pkennedy89 First of all, I think the supplied array is already sorted, so you can omit that part of your code. Then <= array.length is asking for overrun errors. use <. Lastly, you need to return arr. length for edge cases.
Rich Churcher
@richchurcher
Sep 21 2015 02:19
@hansinla actually it's not, quite a few of the tests are unsorted arrays... we had this discussion earlier in the day
their current state means that most of them will pass, however :)
it's going to be fixed
Johnathan Brown
@Legend28469
Sep 21 2015 02:20
I have a question about the Build a portfolio page zipline. Am I supposed to mimic the design and the functionality?
Hans van Riet
@hansinla
Sep 21 2015 02:20
@richchurcher Sorry that was for @oharrison the challenge states that the array supplied is ordered
/*
Return the lowest index at which a value (second argument)
should be inserted into a sorted array (first argument).
*/
Julius
@Rennix1
Sep 21 2015 02:20
@Legend28469 the example is a guide, but you can make it however you want. they just want you to include the main features but feel free to customize.
Rich Churcher
@richchurcher
Sep 21 2015 02:21
@hansinla I know it seems that way, but look at the tests... several of them are unsorted arrays
Johnathan Brown
@Legend28469
Sep 21 2015 02:21
@Rennix1 Oh okay. That makes sense. Thank you
CamperBot
@camperbot
Sep 21 2015 02:21
legend28469 sends brownie points to @rennix1 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for rennix1
Rich Churcher
@richchurcher
Sep 21 2015 02:21
the wording is confusing, we have a couple of pull requests in to fix the tests and change the description
Julius
@Rennix1
Sep 21 2015 02:21
@Legend28469 no problem. i'm actually stuck on the same one lol. trying to figure out the buttons
Rich Churcher
@richchurcher
Sep 21 2015 02:21
@hansinla I had exactly the same confusion
Hans van Riet
@hansinla
Sep 21 2015 02:22
@richchurcher That must have changed since I submitted, since my code passed.
Rich Churcher
@richchurcher
Sep 21 2015 02:22
@hansinla mine did too! The test coverage isn't very good, so it looks like answers pass when they shouldn't :)
Prabhu
@itsprabhucbe
Sep 21 2015 02:23
This message was deleted
Hans van Riet
@hansinla
Sep 21 2015 02:23
@richchurcher lucky us. but very poor wording of the challenge
Aaron Freidus
@shadowfool
Sep 21 2015 02:23
strange! My solution doesn't work any more. Guess I have to redo this one
Prabhu
@itsprabhucbe
Sep 21 2015 02:23
This message was deleted
Rich Churcher
@richchurcher
Sep 21 2015 02:23
@pkennedy89 you don't need to return anything from arr.sort()
@hansinla yup I have a pull request in to make it clearer and add more examples
Prabhu
@itsprabhucbe
Sep 21 2015 02:24
This message was deleted
An Nguyen
@antnh6
Sep 21 2015 02:24
How can I nest an i element within my button element?
Matt Everson
@matteverson
Sep 21 2015 02:24
@antnh1 <button><i></i></button>
Rich Churcher
@richchurcher
Sep 21 2015 02:25
@pkennedy89 after calling .sort() on your array, your loop looks ok
Prabhu
@itsprabhucbe
Sep 21 2015 02:25
This message was deleted
This message was deleted
Rich Churcher
@richchurcher
Sep 21 2015 02:26
@pkennedy89 I don't think you need the sortNumber callback either, the default behaviour of sort() should do the trick
Hans van Riet
@hansinla
Sep 21 2015 02:27
@richchurcher thx
CamperBot
@camperbot
Sep 21 2015 02:27
hansinla sends brownie points to @richchurcher :sparkles: :thumbsup: :sparkles:
:star: 310 | @richchurcher | http://www.freecodecamp.com/richchurcher
An Nguyen
@antnh6
Sep 21 2015 02:28
@matteverson Thank you! This site is awesome, I can get help almost instantly
CamperBot
@camperbot
Sep 21 2015 02:28
antnh1 sends brownie points to @matteverson :sparkles: :thumbsup: :sparkles:
:star: 384 | @matteverson | http://www.freecodecamp.com/matteverson
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:30
@richchurcher Thanks for the tips - I've taken out all the stuff I didn't need but I'm still getting that final case failing. I'll tinker around with it some more.
CamperBot
@camperbot
Sep 21 2015 02:30
pkennedy89 sends brownie points to @richchurcher :sparkles: :thumbsup: :sparkles:
:star: 311 | @richchurcher | http://www.freecodecamp.com/richchurcher
Patrick Kennedy
@pkennedy89
Sep 21 2015 02:31
This message was deleted
Mateja Trifunovski
@Matko95
Sep 21 2015 02:33
@pkennedy89 can i take a look? :)
ambientsoul
@ambientsoul
Sep 21 2015 02:33
hey, i'm a beginner html coder, and i was wondering if one of you could take a look at what was wrong with my code and why?
Mateja Trifunovski
@Matko95
Sep 21 2015 02:33
@ambientsoul post it here
explain formatting
CamperBot
@camperbot
Sep 21 2015 02:33

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

ambientsoul
@ambientsoul
Sep 21 2015 02:34
matko, how do you? srry

<style> red-text {color: red;}</style><h2>CatPhotoApp </h2>
style="color:red-text"

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

Mateja Trifunovski
@Matko95
Sep 21 2015 02:35
find color
Mateja Trifunovski
@Matko95
Sep 21 2015 02:36
@ambientsoul you need to add the class to your h2 element
@ambientsoul and to do that you need to write this <h2 class="red-text">CatPhotoApp</h2>
ambientsoul
@ambientsoul
Sep 21 2015 02:38
thanks!
CamperBot
@camperbot
Sep 21 2015 02:38
if you want to thank someone, put an @ before their name!
ambientsoul
@ambientsoul
Sep 21 2015 02:39
CamperBot
@camperbot
Sep 21 2015 02:39
if you want to thank someone, put an @ before their name!
Rich Churcher
@richchurcher
Sep 21 2015 02:53
@pkennedy89 np, feel free to post your updated source if you're still not sure
Binish
@beenmachine
Sep 21 2015 02:54
I am stuck it this waypoint Waypoint: Generate Random Whole Numbers within a Range
I am doing what it asks and it keeps telling me i need to generate an integer ..can anyone help me with this

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.
Math.floor(Math.random() * (max - min + 1)) + min;

return Math.random();
}

what have i done incorrectly
Rich Churcher
@richchurcher
Sep 21 2015 02:56
@beenmachine try putting the keyword return in front of the line beginning Math.floor
and removing your other return statement. What effect does that have?
Binish
@beenmachine
Sep 21 2015 02:56
thanks a lot .. that solved it :)
CamperBot
@camperbot
Sep 21 2015 02:56
if you want to thank someone, put an @ before their name!
Rich Churcher
@richchurcher
Sep 21 2015 02:56
Math.floor() is a function, and because it returns something, we need to do something with that return value :)
either assign it using = or return it, or display it using console.log() etc
Binish
@beenmachine
Sep 21 2015 02:57
thanks @richchurcher
CamperBot
@camperbot
Sep 21 2015 02:57
beenmachine sends brownie points to @richchurcher :sparkles: :thumbsup: :sparkles:
Rich Churcher
@richchurcher
Sep 21 2015 02:57
yw
Mateja Trifunovski
@Matko95
Sep 21 2015 02:57
@beenmachine when you say return Math.random(); the function will return a number between 0 and 1, and when you say Math.floor(Math.random() * (max - min + 1)) + min; it will return a number in a range from min to max
Paul Simon Ongpin
@mochiii
Sep 21 2015 03:40
@AlinLucian welcome glad that my work help you thanks for appreciating it :)
CamperBot
@camperbot
Sep 21 2015 03:40
mochiii sends brownie points to @alinlucian :sparkles: :thumbsup: :sparkles:
Hans van Riet
@hansinla
Sep 21 2015 03:50
FCC is down
James Niroomand
@jniro
Sep 21 2015 04:02
This message was deleted
This message was deleted
CamperBot
@camperbot
Sep 21 2015 04:02
if you want to thank someone, put an @ before their name!
Abhisek Pattnaik
@abhisekp
Sep 21 2015 04:07
explain format
CamperBot
@camperbot
Sep 21 2015 04:07

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Abhisek Pattnaik
@abhisekp
Sep 21 2015 04:07
@jniro :point_up: September 21, 2015 9:37 AM
Hans van Riet
@hansinla
Sep 21 2015 04:07
@jniro you want to give myCar a new property
Michael Cheung
@m6cheung
Sep 21 2015 04:19
this works ar intended but why do I get an extra TypeError, setTimeout is not a function..
var nonsense = function(string) {
    var blab = setTimeout(function() {
      alert(string);
   }, 2000)()
}
nonsense("hello");
Paul Simon Ongpin
@mochiii
Sep 21 2015 04:22
i wonder whats wrong with my tweet button can somebody check my code? http://codepen.io/mochiii/pen/YyqmJP?editors=101
Hans van Riet
@hansinla
Sep 21 2015 04:24
@m6cheung no extra () after 2000) but close with ;
Abhisek Pattnaik
@abhisekp
Sep 21 2015 04:25
@m6cheung and don't cross post. Either post in this channel or in the main ch. Better to ask for help here.
justindobbs
@justindobbs
Sep 21 2015 04:25
@mochiii don't you have to add the tweet js
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
```
Paul Simon Ongpin
@mochiii
Sep 21 2015 04:27
so i'll just copy this function?
Don Price
@KingHippo
Sep 21 2015 04:29
is the site down?
Hans van Riet
@hansinla
Sep 21 2015 04:31
@mochiii is this a codepen issue? Where you need to add target=“_blank” to the button? BTW my link is http not https
Paul Simon Ongpin
@mochiii
Sep 21 2015 04:34
changed the https to https, added target="_blank" still no good :(
An Nguyen
@antnh6
Sep 21 2015 04:46
is the site down?
Hans van Riet
@hansinla
Sep 21 2015 04:50
@mochiii Yes, I’m looking at the fact that you’re adding the href attr when the button is clicked, should you not add it before? Anyway, I can’t even receive a log on the click.
Don Price
@KingHippo
Sep 21 2015 04:50
@antnh1 I think so
Johnathan Brown
@Legend28469
Sep 21 2015 04:52

Hey guys. How do I shrink the image here to something decent Codepen

I’ve tried img-responsive but it isn’t working out

http://codepen.io/Legend28469/pen/epzBxO

SojournerOctocat
@SojournerOctocat
Sep 21 2015 04:54
@Legend28469 Maybe some of the suggestions given here? http://stackoverflow.com/questions/787839/resize-image-proportionally-with-css
Paul Simon Ongpin
@mochiii
Sep 21 2015 05:01
@hansinla i manage to correct the code. i moved the whole tweet code section inside the callback function. worked fine for me http://codepen.io/mochiii/pen/XmKpVp
Johnathan Brown
@Legend28469
Sep 21 2015 05:02
@SojournerOctocat thank you. That worked perfectly.
CamperBot
@camperbot
Sep 21 2015 05:02
legend28469 sends brownie points to @sojourneroctocat :sparkles: :thumbsup: :sparkles:
Steven Place
@KillerDesigner
Sep 21 2015 05:02
Is FreeCodeCamp.com down for maintenance, or is it just me?
And, is there a status.freecodecamp.com or freecodecampstatus.com resource?
Paul Simon Ongpin
@mochiii
Sep 21 2015 05:03
it is down for maintenance i think
@hansinla thanks for looking at my code
CamperBot
@camperbot
Sep 21 2015 05:03
mochiii sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
Hans van Riet
@hansinla
Sep 21 2015 05:03
@mochiii great
Steven Place
@KillerDesigner
Sep 21 2015 05:08
@mochiii thanks!
CamperBot
@camperbot
Sep 21 2015 05:08
killerdesigner sends brownie points to @mochiii :sparkles: :thumbsup: :sparkles:
Alessandro Metta
@n0f3
Sep 21 2015 05:46
was the maintenance scheduled?
what's the down time?
SojournerOctocat
@SojournerOctocat
Sep 21 2015 06:07
about sojourneroctocat
CamperBot
@camperbot
Sep 21 2015 06:07
you need to ask about @someone!
SojournerOctocat
@SojournerOctocat
Sep 21 2015 06:07
about @sojourneroctocat
Aleksandr Sidorov
@AleksandrSidorov
Sep 21 2015 06:49
Ready for testing. Feedback is welcome. http://codepen.io/shtil80/full/xwVOEX
Roel Verbunt
@roelver
Sep 21 2015 06:51
@AleksandrSidorov tried on an iPad , but I don,
don't see à start button.
Sorry it's the clock itself
DTing
@dting
Sep 21 2015 06:53
@AleksandrSidorov looks really good. nice work!
Aleksandr Sidorov
@AleksandrSidorov
Sep 21 2015 06:54
@roelver @dting thanks! I think I should add a hint how to start the timer.
DTing
@dting
Sep 21 2015 06:55
hmm maybe a start text in the circle would work
toggle between start and pause
the other thing thats a little weird is if you change the time while the clock is running it resets to the time you set it to for the current time but you can change the time of the other timer while it is running
"length" <=> "time"
sorry i meant if you change the timer length for session while the session timer is running it will reset the timer but not if you change the break length while the session timer is running. and vice versa
Not a big deal tho but seems a bit inconsistent. For example i started the timer and changed the break time. the session time is running down but the break time changes without a hitch. then i changed the session length and the timer reset.
SojournerOctocat
@SojournerOctocat
Sep 21 2015 07:01
@AleksandrSidorov Nice clock
Aleksandr Sidorov
@AleksandrSidorov
Sep 21 2015 07:04
@dting Thanks for hints! I think about "play" and "pause" icons as well. I thought that changing the break time while session should not reset whole timer. But I should think about your suggestion.
@SojournerOctocat thank you!
DTing
@dting
Sep 21 2015 07:08
nps
Jimmy Peng
@lonelyseason
Sep 21 2015 07:54
is the FCC server down? I can't access to it
Chirag Patel
@CPatel217
Sep 21 2015 07:59
having same issue
Jimmy Peng
@lonelyseason
Sep 21 2015 07:59
yeah
can't wait to access it
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 08:09
Yes...FCC is down
DTing
@dting
Sep 21 2015 08:13
looks like it is back up
Katie Cawthorne
@KatCaw83
Sep 21 2015 08:13
Yay 😃
Tersha
@tersha
Sep 21 2015 08:17
yay!
Jimmy Peng
@lonelyseason
Sep 21 2015 08:35
FCC is back!!!!
Prashanth
@dgprashanth
Sep 21 2015 09:10
Guys, I'm having a very strange error and I'd like some help with it
When I click the start button, the classes are applied appropriately to other 2 buttons, and when I click Pause, it works well too. However, when I click on the reset button, the classes don't get applied properly! Please help :)
Jesús A. Ruppel
@Nipponshin
Sep 21 2015 09:13
hmm anyone having problems with the run tests button after the site went back up? Nothing happens when I click it, ctrl + enter does not work either. Already made a hard refresh just in case, even tried a different browser, nothing...
AnandSiyote
@AnandSiyote
Sep 21 2015 09:21
Keep getting this error "Program Execution FailureNo user tests were run.".. Help!!!
tommyosh
@tommyosh
Sep 21 2015 09:22
The site was down. There is going to be some problems. Give it some time.
DTing
@dting
Sep 21 2015 09:40
@AnandSiyote which problem and what does your code look like?
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 09:50
@AnandSiyote there could be a syntax error in your code. Has happened to me before. I forgot a semicolon!
AnandSiyote
@AnandSiyote
Sep 21 2015 10:41
@thedigitalmonk such a silly mistake!! Thanx
CamperBot
@camperbot
Sep 21 2015 10:42
anandsiyote sends brownie points to @thedigitalmonk :sparkles: :thumbsup: :sparkles:
:star: 204 | @thedigitalmonk | http://www.freecodecamp.com/thedigitalmonk
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:43
@AnandSiyote :) Keep on hustling, brother.
Jalita
@UsefulPixels
Sep 21 2015 10:44
Hello all, I'm stuck with this bootstrap thing and just can't figure out what </div> that's missing in the exercise...
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:44
What does the error say?
Jalita
@UsefulPixels
Sep 21 2015 10:44

It's this exercise "Waypoint: Create a Custom Heading" and this is the bit of code I've done: <div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>

<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>

The error says it's missing a closing div tag but I can't see it... Am I blind or missing something?
Looked on Github too and Google to try to find answers..
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:46
yep. You forgot the closing tag for <div class="row">
Just add one closing div tag @UsefulPixels
Jalita
@UsefulPixels
Sep 21 2015 10:46
Ps. And how do you do to copy and paste the code with the black thing around it?
Ahhh
Let, me try @thedigitalmonk
@thedigitalmonk I added it but now I have a new error message...
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:48
You need to put three ` characters before and after the code
It's markdown. There's a help button in the corner of the box you are typing in.
``` some code ````
some code
What's the new error? @UsefulPixels
var something = 1;
Jalita
@UsefulPixels
Sep 21 2015 10:49
@thedigitalmonk I got it now! I didn't understand that both the h2 and the img had to be nested within the <div class = "row">. Solved, thank you so much for the help! Will try the markdown thing too
CamperBot
@camperbot
Sep 21 2015 10:49
usefulpixels sends brownie points to @thedigitalmonk :sparkles: :thumbsup: :sparkles:
:star: 205 | @thedigitalmonk | http://www.freecodecamp.com/thedigitalmonk
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:49
you're welcome @UsefulPixels :)
Jalita
@UsefulPixels
Sep 21 2015 10:50
Let me just try that <div class="col-xs-4">
Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:51
put three of those ` then press shift+enter and then type in a line between them
Sean Campbell
@natac13
Sep 21 2015 10:51
Help formatting
CamperBot
@camperbot
Sep 21 2015 10:51

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Thomson Muriyadan
@thedigitalmonk
Sep 21 2015 10:51
@natac13 thanks for that. Will be handy.
CamperBot
@camperbot
Sep 21 2015 10:51
thedigitalmonk sends brownie points to @natac13 :sparkles: :thumbsup: :sparkles:
:star: 346 | @natac13 | http://www.freecodecamp.com/natac13
azaleas
@azaleas
Sep 21 2015 10:51
Hi every1..Any1 on Zipline 3? I'm trying to use openweathermap.org api to get the weather but my XMLHttpRequest returns with the status 0, below is the code:
var lat = 0;
var long = 0;

navigator.geolocation.getCurrentPosition(showPosition);

function showPosition(position) {
  lat = position.coords.latitude.toFixed(0);

  long = position.coords.longitude.toFixed(0);


  getWeather(lat, long);

}

function getWeather(lat, long){


    var api_id = "&APPIDfdec9417b04d76fb59e047baa7decca2";

    var url = "http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + long + api_id;

    var request = new XMLHttpRequest();

    request.open("GET", url, true);
    request.setRequestHeader('Content-Type', 'application/json');

   //var results = JSON.parse(request.responseText);

  if(request.status == 200){
  $("#demo").append("<h2>+ TEST + </h2>");
  }
}
Sean Campbell
@natac13
Sep 21 2015 10:52
@thedigitalmonk np camper bot is great for info
manasshukla
@manasshukla
Sep 21 2015 10:53
room
Bonnartom
@Bonnartom
Sep 21 2015 10:54
hi
heoop
Jalita
@UsefulPixels
Sep 21 2015 10:56
Ok, obviously I didn't do the right thing. Haha.
 <div class="col-xs-4">
Got it now, thanks!
CamperBot
@camperbot
Sep 21 2015 10:56
if you want to thank someone, put an @ before their name!
Sean Campbell
@natac13
Sep 21 2015 10:57
@usefulpixels nice job! And it is a learning curve for all of us
Jalita
@UsefulPixels
Sep 21 2015 10:57
Thanks! @thedigitalmonk @natac13 learnt 2 new things today
CamperBot
@camperbot
Sep 21 2015 10:57
usefulpixels sends brownie points to @thedigitalmonk and @natac13 :sparkles: :thumbsup: :sparkles:
:warning: usefulpixels already gave thedigitalmonk points
:star: 347 | @natac13 | http://www.freecodecamp.com/natac13
lpmoorejr
@lpmoorejr
Sep 21 2015 11:20
Experiencing strange behavior running learnyoumongo "insert" challenge (in Cloud9). No console.log messages. No error message if mongodb is not running. No issue with "find" challenges. My code:
Allan Armstrong
@allanarmstrong
Sep 21 2015 11:22
@azaleas If you open your console you should see an error like "Request header field Content-Type is not allowed by Access-Control-Allow-Headers.". I'm guessing openweather doesn't allow you to set headers and if it receives one in a request it will send an empty response. You will also need to add request.send(); after request.open(...)
lpmoorejr
@lpmoorejr
Sep 21 2015 12:02

My code: console.log("in insert.js");
var mongo = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/learnyoumongo";
var newDoc = {};
newDoc.firstName = process.argv2;
newDoc.lastName = process.argv3;
mongo.connect(url, function (err, db) {
if (err) return console.error(err);

var docs = db.collection('docs');

docs.insert(newDoc, function(err, data) {
    if (err) return console.error(err);
    console.log(JSON.stringify(newDoc));
    db.close();
});

});

Ankit Panwar
@coderNoob
Sep 21 2015 12:08
<div class="container">
  <h2 class="text-center">Random Quote</h2>
  <div id="#box">

  </div>
  <div id="#box1">

  </div>
</div>
$(document).ready(function() {
  var questions = [
      {q: 'This is question 1', a: 'Test' },
      {q: 'This is question 2', a:'Another'}
  ];

  var i = Math.floor((Math.random()*questions.length));

  $('div','div','#box').html(questions[i].q);
  $('div','div','#box1').html(questions[i].a);
});
It is printing the same thing in both the div tags ! Either 'Test' or 'Another'. Whats going wrong?
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 12:13

I'm working on Bonfire "Everything Be True" and I just want to make sure that I understand the instructions correctly.

If ALL the items in the collection have that property....I will return "true". Otherwise...I return "false". Is that correct?

For example:

If the second argument is {'sex': 'female'} ....then all the elements in the collection must have {'sex': 'female'} as well...otherwise I return false.

Correct?

I have it set up now...with just some console.logs:
function every(collection, pre) {

    var result;

    if (typeof pre === 'object'){
        var objectvalue = pre.sex;
        //console.log(objectvalue);
        //console.log(collection[0].sex);

       for (var i=0;i<=collection.length-1;i++){
          if(collection[i].sex !== objectvalue){

                console.log("This is not objectvalue");
          }
          else {
              console.log("This is is objectvalue");
          }
        }//end for
    }//end if

  //return result;
}
every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'});
Am I on the right track?
From what I understand....as soon as it finds an element that doesn't match...it returns false. Otherwise...it returns true.
Randy Goldsmith
@Dueldrawer8
Sep 21 2015 12:46
is anyone else having trouble logging into FCC?
Jason Wood
@catapixel
Sep 21 2015 12:50
@Dueldrawer8 I was able to login fine using my google account. What account are you using?
@TheHighPriestess That is not the way that I understand the instructions. The instructions say to For this, check to see if the property defined in the second argument is present on every element of the collection. There for it is focus on the 'property' not the value of the property. If one of the collections didn't have the property 'sex' in the example then that collection should be false
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 12:56
@catapixel Well...the property is present on all the tests though.
but the value changes
Jason Wood
@catapixel
Sep 21 2015 12:57
@TheHighPriestess That's true but it may not be for every test. Also, the "helpful links" point you toward "Object.hasOwnProperty()" and "Object.getOwnPropertyNames()" which would again indicate they want you to check for the presence of the property and not it's value.
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:00
@catapixel Every test that must be passed has that property though.
So, it has to be for the value.
Jason Wood
@catapixel
Sep 21 2015 13:03
@TheHighPriestess I wanted to double check so I just went through the hints and spoiler from camperbot and it's the property. You iterate over every collection and confirm that they all have the property. If they do then you return true but if even one collection is missing the property you return false. The value of the property does not matter. You can confirm yourself with camperbot if you wish...
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:04
That's it?
Jason Wood
@catapixel
Sep 21 2015 13:04
@TheHighPriestess Yep
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:04
You mean...I was trying to make it more difficult?
tommyosh
@tommyosh
Sep 21 2015 13:04
Story of my life!
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:04
haha
Jason Wood
@catapixel
Sep 21 2015 13:04
Yes, the point of the bonfire is to learn how to iterate over the properties only lol
good job for the extra work. It will come in handy later
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:04
Too bad I can't get extra points or something haha
Jason Wood
@catapixel
Sep 21 2015 13:05
@TheHighPriestess thanks. There's a brownie point for you :thumbsup:
CamperBot
@camperbot
Sep 21 2015 13:05
catapixel sends brownie points to @thehighpriestess :sparkles: :thumbsup: :sparkles:
:star: 262 | @thehighpriestess | http://www.freecodecamp.com/thehighpriestess
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 13:06
haha
Thank you for the information @catapixel
CamperBot
@camperbot
Sep 21 2015 13:06
thehighpriestess sends brownie points to @catapixel :sparkles: :thumbsup: :sparkles:
:star: 379 | @catapixel | http://www.freecodecamp.com/catapixel
Jason Wood
@catapixel
Sep 21 2015 13:06
no problem
Jose M Viloria
@josevill
Sep 21 2015 13:42

Can i have some help with the Random quote zipline? I have this:

// Get Quote function

$('#launch').click(function() {
     $.ajax({
        url: 'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json&json=parseQuote',
        data: {
           format: 'json'
        },
        error: function() {
           $('#info').html('<p>An error has occurred</p>');
        },
        dataType: 'json',
        success: function(data) {
          console.log(data);
           var $title = $('<h1>').text(data.quoteText);
           var $description = $('<p>').text(data.quoteAuthor);
           $('#info')
              .append($title)
              .append($description);
        },
        type: 'POST'
     });
  });

I might be doing something wrong in the url part.

Coira Ellison
@Coira
Sep 21 2015 13:47
@josevill you have to use jsonp format, it won't work with json
and add jsonp: 'jsonp' to the call
Jose M Viloria
@josevill
Sep 21 2015 13:50
@Coira I will have to read further into how to make api calls and how to use the outcome. I've been trying this for a couple days, no progress at all yet :(
@Coira Thanks for the help :)
CamperBot
@camperbot
Sep 21 2015 13:51
josevill sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 226 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Sep 21 2015 13:51
oh yeah, this took me forever
Jose M Viloria
@josevill
Sep 21 2015 13:52
@Coira Any links you did use to understand that? It's more complicated that i thought.
Like, A LOT. D:
Coira Ellison
@Coira
Sep 21 2015 13:53
just a lot of googling
when i said add it to your api call, i meant to your .ajax, like you did with dataType:.. etc
Jalita
@UsefulPixels
Sep 21 2015 13:54

Hi guys, I have an issue with #53,

```

<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane">Submit</i>
<form class="form-control">
```

Oups sorry,
```<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane">Submit</i>

<form class="form-control">
```

Damn can’t get it right
Coira Ellison
@Coira
Sep 21 2015 13:57
@josevill
        data: { method: "getQuote", format:"jsonp", lang:"en"},
        dataType: "jsonp",
        jsonp: 'jsonp',
        url: "http://api.forismatic.com/api/1.0/",
Coira Ellison
@Coira
Sep 21 2015 14:03
hey @UsefulPixels is this a freecodecamp waypoint? what's it called?
Jalita
@UsefulPixels
Sep 21 2015 14:06
@Coira Hello, I'm back again, still new to this. Yes it's this waypoint "Waypoint: Style Text Inputs as Form Controls" I have seen there were some issues with this before but I can't find the solution to the third error...
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane">Submit</i>
     <form class="form-control">
This is the error message "Give the text input in your form the class form-control.” but can’t really understand what it means and what I need to do.
I have tried some guess solutions but none have worked so far.
Coira Ellison
@Coira
Sep 21 2015 14:08
@UsefulPixels can you post all your code in here please
just makes it easier to see where you are with it
Jalita
@UsefulPixels
Sep 21 2015 14:10
Ok sure :) and thanks @Coira
CamperBot
@camperbot
Sep 21 2015 14:10
usefulpixels sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 227 | @coira | http://www.freecodecamp.com/coira
Leander Van Reeth
@reneald
Sep 21 2015 14:10
@UsefulPixels read the description carefully, you're giving the form element the required class, but that's not what they ask
Coira Ellison
@Coira
Sep 21 2015 14:11
^ ^ ^
no need to post code now :p
Rory Smith
@alanbuchanan
Sep 21 2015 14:12
anyone good with angular material that can help me make this more responsive, like with bootstrap's container?
http://codepen.io/alanbuchanan/pen/XmKNmG
Jalita
@UsefulPixels
Sep 21 2015 14:13
@Coira so I have this
<input class="form-control”>
but I don’t know where to put it. The form is so long.
Leander Van Reeth
@reneald
Sep 21 2015 14:15
@UsefulPixels there's an input element right above the button where you inserted the i
Coira Ellison
@Coira
Sep 21 2015 14:15
@UsefulPixels is there a text input there? add it to that
Jalita
@UsefulPixels
Sep 21 2015 14:15
Maybe now I understand, it’s where the text is in the box… hm
Yes that was it! @coira and @reneald thank you so much for your help!
CamperBot
@camperbot
Sep 21 2015 14:16
usefulpixels sends brownie points to @coira and @reneald :sparkles: :thumbsup: :sparkles:
:warning: usefulpixels already gave coira points
:star: 267 | @reneald | http://www.freecodecamp.com/reneald
Jalita
@UsefulPixels
Sep 21 2015 14:17
Phew!
Coira Ellison
@Coira
Sep 21 2015 14:17
:thumbsup:
Leander Van Reeth
@reneald
Sep 21 2015 14:17
You're welcome!
Jose M Viloria
@josevill
Sep 21 2015 14:17
@Coira I think i like you.
@Coira Thanks! Lol
CamperBot
@camperbot
Sep 21 2015 14:17
josevill sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:warning: josevill already gave coira points
Coira Ellison
@Coira
Sep 21 2015 14:18
@josevill :) np!
Pascal
@pfilippi24
Sep 21 2015 14:33

Hi guys, I'm working on my first basejump and I can't get twitter oauth to work. I used the angular-fullstack yeoman generator and created a twitter app and updated the local.env.js. The oauth flow completed successfully, but the backend responds with an 401 when trying to access a protected route:

UnauthorizedError: invalid token
   at /home/***/fcc-basejump/fcc-voting-app/node_modules/express-jwt/lib/index.js:109:53
   at /home/***/fcc-basejump/fcc-voting-app/node_modules/jsonwebtoken/index.js:101:18
   at process._tickCallback (node.js:355:11)

Did someone happen to have a similar error using this yeoman generator? I didn't change anything so far, just updated the configuration

Gabe DiNicola
@gabedinicola
Sep 21 2015 14:37
I was hoping someone could help me out. the following works great in Chrome but not in IE : http://codepen.io/gabedinicola/pen/MaWPXO
i think it has something to do with the setTimeout but the bottom buttons are not working
Bruce Young
@mutantspore
Sep 21 2015 14:50
Screen Shot 2015-09-21 at 10.47.39 AM.png
if i hit stop/start a few times I get this on Safari on MacOS.
@gabedinicola
Gabe DiNicola
@gabedinicola
Sep 21 2015 14:52
ok thnx. 1 more problem to fix.
CamperBot
@camperbot
Sep 21 2015 14:52
if you want to thank someone, put an @ before their name!
Gabe DiNicola
@gabedinicola
Sep 21 2015 14:52
@mutantspore thnx
CamperBot
@camperbot
Sep 21 2015 14:52
gabedinicola sends brownie points to @mutantspore :sparkles: :thumbsup: :sparkles:
:star: 397 | @mutantspore | http://www.freecodecamp.com/mutantspore
Avishay
@avishayshushan
Sep 21 2015 15:03
@gabedinicola i didn't notice a different between chrome and IE(maybe u have an older version?)
but i noticed that when i click several times on the 'start' button it start another count while the first is still running
in my pomodoro app i disable the start button after the first click and enable it when the user 'pause' or 'reset'
Gabe DiNicola
@gabedinicola
Sep 21 2015 15:04
@avishayshushan thank you. that seems like an easy fix
CamperBot
@camperbot
Sep 21 2015 15:05
gabedinicola sends brownie points to @avishayshushan :sparkles: :thumbsup: :sparkles:
:star: 254 | @avishayshushan | http://www.freecodecamp.com/avishayshushan
Pascal
@pfilippi24
Sep 21 2015 15:16
Nevermind, solved my problem through updating the yeoman, the generator and recreating the app
Briana
@LiathsAingeal
Sep 21 2015 15:40
blob
I have been stuck on this for days i input the code exactly how is said to and it isnt working i have also already tried it on multiple computers
@catapixel nope not yet it is still not working
tva10
@tva10
Sep 21 2015 15:44
@LiathsAingeal You should add this class in <img> tag
Benjamin Faure
@Ben4a
Sep 21 2015 15:44
Screenshot 2015-09-21 11.41.36.png
I feel like I've completed the first requirement and yet there it is incomplete, tried several things.
Briana
@LiathsAingeal
Sep 21 2015 15:45
@tva10 instead of in the style area?
tva10
@tva10
Sep 21 2015 15:46
@LiathsAingeal Look on previous lines
@LiathsAingeal it looks like tag <h2>
but img
Briana
@LiathsAingeal
Sep 21 2015 15:47
@tva10 It is but i feel like the class is wrong because it isnt turning green
tva10
@tva10
Sep 21 2015 15:48
@LiathsAingeal lights may not work...
Briana
@LiathsAingeal
Sep 21 2015 15:49
@tva10 what does that mean?
Benjamin Faure
@Ben4a
Sep 21 2015 15:50
This message was deleted
@Ben4a this is the last section I have to complete in waypoints then its onto bonfire! :)
tva10
@tva10
Sep 21 2015 15:52
@LiathsAingeal I mean that may be class isnt turning green because syntax Highlighting may not work
Briana
@LiathsAingeal
Sep 21 2015 15:52
blob
@tva10 if I do it this way though it does this
tva10
@tva10
Sep 21 2015 15:52
@LiathsAingeal nope
@LiathsAingeal you need to do new class in style tag like .smaller-image{...}
@LiathsAingeal and apply this into img tag like this <img class="className">
@LiathsAingeal dot. in css mean that it is class
Briana
@LiathsAingeal
Sep 21 2015 15:58
now i cant get the width to work though but it got the first check
tva10
@tva10
Sep 21 2015 16:00
@LiathsAingeal write style tag here
Briana
@LiathsAingeal
Sep 21 2015 16:03
@tva10 after the image class?
tva10
@tva10
Sep 21 2015 16:04
@LiathsAingeal It is easy, look how <h2> has red text. It has .red-text class. And this class has color property.
Mateja Trifunovski
@Matko95
Sep 21 2015 16:06
@LiathsAingeal
<style>
.smaller-image: width: 100px;
</style>
<img class="smaller-image" src="#"></img>
something like that
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:09
OK....I really don't understand what the Bonfire Everything Be True wants. I have this...but nothing is passing:
function every(collection, pre) {


    if (typeof pre === 'object'){
        var objectvalue = (Object.getOwnPropertyNames(pre));
        console.log(objectvalue);
       for (var i=0;i<=collection.length-1;i++){
          if(collection[i].hasOwnProperty(objectvalue)){

                console.log("Has objectvalue");
                return true;
          }
          else {
              console.log("Does not have objectvalue");
              return false;
          }
        }//end for
    }//end if


}


//every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');

every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'});
Briana
@LiathsAingeal
Sep 21 2015 16:09
@Matko95 ok now I am really lost
Mateja Trifunovski
@Matko95
Sep 21 2015 16:09
@LiathsAingeal could you post the full code?
explain formatting
CamperBot
@camperbot
Sep 21 2015 16:10

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Briana
@LiathsAingeal
Sep 21 2015 16:10
blob
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:10
Initially....I thought it wanted to know if the "sex" was the same for all elements.
Mateja Trifunovski
@Matko95
Sep 21 2015 16:10
the full code
like from line 1 to the end
Briana
@LiathsAingeal
Sep 21 2015 16:10
blob
line 17 got the first part of the problem right
Mateja Trifunovski
@Matko95
Sep 21 2015 16:11
remove the code on line 17
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:11
Really.....I just don't know what the Bonfire wants. This code works...but obviously it's not what the Bonfire wants.
Benjamin Faure
@Ben4a
Sep 21 2015 16:11

<<script>
function runSlots(){
var slotOne;
var slotTwo;
var slotThree;

var images = ["http://i.imgur.com/9H17QFk.png", "http://i.imgur.com/9RmpXTy.png", "http://i.imgur.com/VJnmtt5.png"];

slotOne = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
slotTwo = Math.floor(Math.random() * (3 - 1 + 1)) + 1;
slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;

$('.logger').html('');
$('.logger').html('Not A Win');

// Only change code below this line.
$($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
$($('.slot')[2]).html('<img src = "' + images[slotTwo-2] + '">');
$($('.slot')[1]).html('<img src = "' + images[slotThree-3] + '">');
// Only change code above this line.

if(slotOne !== slotTwo || slotTwo !== slotThree){
  return(null);
}

if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){
  $('.logger').html(slotOne);
  $('.logger').append(' ' + slotTwo);
  $('.logger').append(' ' + slotThree);
}

return([slotOne, slotTwo, slotThree]);

}

$(document).ready(function(){
$('.go').click(function(){
runSlots();
});
});
</script>

<div>
<div class = 'container inset'>
<div class = 'header inset'>
<img src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz' alt='learn to code javascript at Free Code Camp logo' class='img-responsive nav-logo'>
<h2>FCC Slot Machine</h2>
</div>
<div class = 'slots inset'>
<div class = 'slot inset'>

</div>
<div class = 'slot inset'>

</div>
<div class = 'slot inset'>

</div>
</div>
<br/>
<div class = 'outset'>
<button class = 'go inset'>
Go
</button>
</div>
<br/>
<div class = 'foot inset'>
<span class = 'logger'></span>
</div>
</div>
</div>

<style>
.slot > img {
margin: 0!important;
height: 71px;
width: 50px;
}
.container {
background-color: #4a2b0f;
height: 400px;
width: 260px;
margin: 50px auto;
border-radius: 4px;
}
.header {
border: 2px solid #fff;
border-radius: 4px;
height: 55px;
margin: 14px auto;
background-color: #457f86
}
.header h2 {
height: 30px;
margin: auto;
}
.header h2 {
font-size: 14px;
margin: 0 0;
padding: 0;
color: #fff;
text-align: center;
}
.slots{
display: flex;
background-color: #457f86;
border-radius: 6px;
border: 2px solid #fff;
}
.slot{
flex: 1 0 auto;
background: white;
height: 75px;
width: 50px;
margin: 8px;
border: 2px solid #215f1e;
border-radius: 4px;
text-align: center;
}
.go {
width: 100%;
color: #fff;
background-color: #457f86;
border: 2px solid #fff;
border-radius: 2px;
box-sizing: none;
outline: none!important;
}
.foot {
height: 150px;
background-color: 457f86;
border: 2px solid #fff;
}

.logger {
color: white;
margin: 10px;
}

.outset {
-webkit-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
}

.inset {
-webkit-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
}
</style>>

Briana
@LiathsAingeal
Sep 21 2015 16:11
@Matko95 but that is the part that is right
Mateja Trifunovski
@Matko95
Sep 21 2015 16:11
and rewrite the code on like 18 as `<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
Briana
@LiathsAingeal
Sep 21 2015 16:12
@Matko95 then where do i put the width
Mateja Trifunovski
@Matko95
Sep 21 2015 16:13
@LiathsAingeal trust me, and in your <style> tag add this
 smaller-image{
width: 100px;
}
Briana
@LiathsAingeal
Sep 21 2015 16:14
@Matko95 still says that it is wrong
blob
tva10
@tva10
Sep 21 2015 16:15
@LiathsAingeal
<style>
  .red-text {
    color: red;
  }

  .smaller-image { width: 100px; } 
  h2 {
    font-family: Lobster, Monospace;
  }

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

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

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

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Mateja Trifunovski
@Matko95
Sep 21 2015 16:15
@TheHighPriestess
//every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');
// look at the last parameter, you need to check if 'sex' is a property of collection
tva10
@tva10
Sep 21 2015 16:15
compare this and yours
Briana
@LiathsAingeal
Sep 21 2015 16:16
@tva10 @Matko95 Found what I was missing thank you guys so much :D
CamperBot
@camperbot
Sep 21 2015 16:16
liathsaingeal sends brownie points to @tva10 and @matko95 :sparkles: :thumbsup: :sparkles:
:star: 334 | @matko95 | http://www.freecodecamp.com/matko95
:star: 237 | @tva10 | http://www.freecodecamp.com/tva10
Roland Yegorov
@Rolandisimo
Sep 21 2015 16:19
Hey, guys can someone help me with HTML5 data-filter 'ing. I can't find any info on how to make it work.
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:19
@Matko95 Am I not doing that?
tva10
@tva10
Sep 21 2015 16:20
@TheHighPriestess your code still not work because you return true/false value after first check. After this return you exit every function
@TheHighPriestess use arr.every function there. It is pretty easy
Emily
@emvertes8711
Sep 21 2015 16:24

1

<style>
2

3
  .red-text {
4

5
    color: red;
6

7
  }
8

9
</style>
10

<h2>CatPhotoApp</h2>
11

12

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

How do I make the h2 red?
tva10
@tva10
Sep 21 2015 16:25
help formatting
CamperBot
@camperbot
Sep 21 2015 16:25

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

tva10
@tva10
Sep 21 2015 16:25
@emvertes8711 add class name to h2 tag
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:25
@tva10 it works for me
tva10
@tva10
Sep 21 2015 16:25
@emvertes8711 like this `<h2 class='someClassName'>
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:25
but it's not what the Bonfire wants
Bill
@kirah1314
Sep 21 2015 16:25
@emvertes8711 under <style> you have to reference the h2 tag
Emily
@emvertes8711
Sep 21 2015 16:25
Thanks, that helps
CamperBot
@camperbot
Sep 21 2015 16:25
if you want to thank someone, put an @ before their name!
Emily
@emvertes8711
Sep 21 2015 16:26
@tva10 @kirah1314 thanks for the help
CamperBot
@camperbot
Sep 21 2015 16:26
emvertes8711 sends brownie points to @tva10 and @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 238 | @tva10 | http://www.freecodecamp.com/tva10
:star: 248 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:26
In fact, I'm still not sure what the Bonfire wants.
I am now on my third attempt to understand it
because this is twice now that I have not correctly understand what I'm supposed to do.
It's Everything Be True...if someone wants to explain it to me
tva10
@tva10
Sep 21 2015 16:28
@TheHighPriestess may I get a sec to look this task
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:28
@tva10 sure
because I don't want to do this again...and then find out that what I did wasn't what the Bonfire wanted
tva10
@tva10
Sep 21 2015 16:29
@TheHighPriestess I got this task again in two lines
@TheHighPriestess I use .every and hasOwnProperty there
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:30
@tva10 what am I supposed to do though?
lamarpierce
@lamarpierce
Sep 21 2015 16:31
Need some help with Javscript lesson on Generating Random Whole Numbers within a Range
tva10
@tva10
Sep 21 2015 16:31
@TheHighPriestess you need to check that every object has property pre. If one of object hasnot this property, you should return false. Else return true.
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:31
@tva10 but they all have it
that's what confused me the first time through
Aleksander Gębicki
@Takumar
Sep 21 2015 16:32
@lamarpierce ask the question what is your problem?
matoula
@matoulam
Sep 21 2015 16:32
hello, can anyone tell me what i have to do to post my code here? :-/
Bill
@kirah1314
Sep 21 2015 16:32
help format
CamperBot
@camperbot
Sep 21 2015 16:32

:point_right: code formatting [wiki]

Inline code

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

Code Block

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

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

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

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

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

Bill
@kirah1314
Sep 21 2015 16:32
@matoulam ^
tva10
@tva10
Sep 21 2015 16:33
@TheHighPriestess I think that your code makes One loop and return true or false
Emily
@emvertes8711
Sep 21 2015 16:33

@tv10 I think that I have added the class name correctly but it still doesn't work? can you point out where I have gone wrong? `<1

<style>
2

3
  .red-text {
4

5
    color: red;
6

7
  }
8

9
</style>
10

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

12

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

lamarpierce
@lamarpierce
Sep 21 2015 16:33
I'm not able to get it to generate a whole integer. Trying to figure out the issue is because it appears that I've followed the instructions.
tva10
@tva10
Sep 21 2015 16:33
@TheHighPriestess but you need to chek all objects in array, you can do that this forEach, or every
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:33
@tva10 and my code works in repl.it
lamarpierce
@lamarpierce
Sep 21 2015 16:34
It's giving me this error - The random number that's generated by myFunction should be an integer
Mateja Trifunovski
@Matko95
Sep 21 2015 16:34
@lamarpierce could you post your code?
Aleksander Gębicki
@Takumar
Sep 21 2015 16:34
@lamarpierce I suppose you are using Math.random() function. You need to round the result to make it integer.
Mateja Trifunovski
@Matko95
Sep 21 2015 16:34
@lamarpierce i'm guessing you wrote return math.random()
Emily
@emvertes8711
Sep 21 2015 16:34

1

<style>
2

3
  .red-text {
4

5
    color: red;
6

7
  }
8

9
</style>
10

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

12

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

lamarpierce
@lamarpierce
Sep 21 2015 16:34

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.random();

Math.floor(Math.random() * (max - min + 1)) + min

}

// 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();})();

Emily
@emvertes8711
Sep 21 2015 16:34
How do I make it go red, I have tried to add a class, where am I going wrong?
Aleksander Gębicki
@Takumar
Sep 21 2015 16:34
@emvertes8711 please format your code a little because it is too long now.
Mateja Trifunovski
@Matko95
Sep 21 2015 16:35
@lamarpierce you need to return Math.floor(Math.random() * (max - min + 1)) + min
lamarpierce
@lamarpierce
Sep 21 2015 16:35
Here is my code
tva10
@tva10
Sep 21 2015 16:35
@TheHighPriestess I think that the best thay to check is Node js or Chrome Dev Tools console...
Mateja Trifunovski
@Matko95
Sep 21 2015 16:35
@lamarpierce when you write return Math.random() the function only returns a number between 0 and 1, you need to return a whole number between a range, and the formula for that is Math.floor(Math.random() * (max - min + 1)) + min
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:35
@tva10 do you know of a good explanation of .every? not MDN
Aleksander Gębicki
@Takumar
Sep 21 2015 16:35
@lamarpierce it don't work because you first return a fraction (Math.random()) and then calculate correct value.
Benjamin Faure
@Ben4a
Sep 21 2015 16:36
Screenshot 2015-09-21 11.41.36.png
lamarpierce
@lamarpierce
Sep 21 2015 16:36
Got it. All on the same line with return...correct?
Aleksander Gębicki
@Takumar
Sep 21 2015 16:36
@lamarpierce yes
Benjamin Faure
@Ben4a
Sep 21 2015 16:36
can't quite see how to finish this section
tva10
@tva10
Sep 21 2015 16:36
@TheHighPriestess do you know about forEach or map?
Benjamin Faure
@Ben4a
Sep 21 2015 16:36
tried a couple different things
Mateja Trifunovski
@Matko95
Sep 21 2015 16:36
@lamarpierce return Math.floor(Math.random() * (max - min + 1)) + min; only this
and remove return Math.random();
Emily
@emvertes8711
Sep 21 2015 16:37
var code = "formatted";
1
<style>
2
​
3
  .red-text {
4
​
5
    color: red;
6
​
7
  }
8
​
9
</style>
10
<h2 class="red-text">CatPhotoApp</h2>
11
​
12
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
13
​
lamarpierce
@lamarpierce
Sep 21 2015 16:37
Thanks @Takumar and @Matko95 for your help.
CamperBot
@camperbot
Sep 21 2015 16:37
lamarpierce sends brownie points to @takumar and @matko95 :sparkles: :thumbsup: :sparkles:
:star: 337 | @takumar | http://www.freecodecamp.com/takumar
:star: 335 | @matko95 | http://www.freecodecamp.com/matko95
Aleksander Gębicki
@Takumar
Sep 21 2015 16:37
@lamarpierce or you can prepare a variable: var result = Math.floor(Math.random() * (max-min +1)) + min and then return result return result;
Emily
@emvertes8711
Sep 21 2015 16:37
how to make it red?
tva10
@tva10
Sep 21 2015 16:37
@emvertes8711 you whant to make red text in <p> tag?
Emily
@emvertes8711
Sep 21 2015 16:37
H2
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:37
@tva10 I'm searching now for a good explanation of them.
lamarpierce
@lamarpierce
Sep 21 2015 16:38
Got it! @Takumar
Aleksander Gębicki
@Takumar
Sep 21 2015 16:38
@emvertes8711 your code seems correct :worried:
tva10
@tva10
Sep 21 2015 16:39
@TheHighPriestess Hm I see only russian examples and one example on dev mozilla
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:39
@tva10 both seem very involved
Emily
@emvertes8711
Sep 21 2015 16:39
Oh, it isn't working though
tva10
@tva10
Sep 21 2015 16:41
@TheHighPriestess I want to make one example:
var arr = [1, -1, 2, -2, 3];

function isPositive(number) {
  return number > 0;
}

alert( arr.every(isPositive) ); // false, because some of them are <0
alert( arr.some(isPositive) ); // true, because some of them has positive value
Emily
@emvertes8711
Sep 21 2015 16:42
@Takumar thanks anyway
CamperBot
@camperbot
Sep 21 2015 16:42
emvertes8711 sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 338 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Sep 21 2015 16:43

@emvertes8711 try just copy and paste this:

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

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

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

Maybe somewhere is any not needed character we don't see now.

Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:43
@tva10 so...I need to put a function within a function
Benjamin Faure
@Ben4a
Sep 21 2015 16:44
@Ben4a I'm sorry is there some other information I can provide y'all with that you need other than this screenshot?
tva10
@tva10
Sep 21 2015 16:44
@TheHighPriestess I can type answer here if you want...
Emily
@emvertes8711
Sep 21 2015 16:44
@Takumar thanks a lot, it is working now.
Aleksander Gębicki
@Takumar
Sep 21 2015 16:45
@emvertes8711 It seems the same as you typed :+1: I just cleared it up.
Emily
@emvertes8711
Sep 21 2015 16:45
I don't know, maybe I made a spelling error or added a space where I didn't need it
Benjamin Faure
@Ben4a
Sep 21 2015 16:45
Screenshot 2015-09-21 11.41.36.png
x34passenger
@x34passenger
Sep 21 2015 16:46
I am not able to use the ip address of my location to get the lat and lon in my javascript. http://codepen.io/x34passenger/pen/OyXLOz
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:48
function find(pre){

    return pre == objectvalue;
}

collection.every(function(find);
@tva10 like that?
tva10
@tva10
Sep 21 2015 16:48
@TheHighPriestess like that, but
@TheHighPriestess find function after applying to array has three arguments(value, index array)
@TheHighPriestess
function find(val ){
   return val.hasOwnProperty(pre);
}
it looks like this
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:50
@tva10 so....it HAS to be done this way?
this is confusing
i was using a for loop
tva10
@tva10
Sep 21 2015 16:51
@TheHighPriestess the answer has Two or One line//
@Ben4a Hey don't write [slotThree-3] because you go out from array.... you should write [slotThree-1]..... And in second slot tooo
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:53
@tva10 i guess I'm just getting frustrated now..because twice I did something...but it wasn't that the bonfire asked for LOL
in other words...I didn't understand the instructions
Emily
@emvertes8711
Sep 21 2015 16:53
How do you give a class to an img tag?
tva10
@tva10
Sep 21 2015 16:54
@emvertes8711 <img class='someClassName' src='path to img' ....>
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:54
@tva10 What's the answer?
Emily
@emvertes8711
Sep 21 2015 16:54
Ok, thank you @tva10
CamperBot
@camperbot
Sep 21 2015 16:54
emvertes8711 sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:warning: emvertes8711 already gave tva10 points
tva10
@tva10
Sep 21 2015 16:54
@TheHighPriestess do you return the result of every function?
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 16:55
I don't feel like guessing any longer.
@tva10 what do you mean?
Benjamin Faure
@Ben4a
Sep 21 2015 16:57
@tva10 [slotThree-1] in all three slots?
tva10
@tva10
Sep 21 2015 16:59
@Ben4a nope, this variable is index of First second and third image in array of images
@Ben4a I mean this
    $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
    $($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');
    $($('.slot')[2]).html('<img src = "' + images[slotThree-1] + '">');
x34passenger
@x34passenger
Sep 21 2015 17:02
Not sure how to approach Bonfire: Diff Two Arrays
SojournerOctocat
@SojournerOctocat
Sep 21 2015 17:03
@x34passenger One way is to use filter to diff the first array with the second, then use filter to diff the second array with the first, then concat the results.
x34passenger
@x34passenger
Sep 21 2015 17:04
@SojournerOctocat I don't understand the documentation on how to use the filter method
SojournerOctocat
@SojournerOctocat
Sep 21 2015 17:05
@x34passenger Yeah, it is confusing, isn't it? I can PM you an example of what I did, if that doesn't feel too much like cheating for you.
Or…
x34passenger
@x34passenger
Sep 21 2015 17:06
@SojournerOctocat yes please do
@SojournerOctocat please PM me
SojournerOctocat
@SojournerOctocat
Sep 21 2015 17:07
@x34passenger I did.
Peter Deal
@DealPete
Sep 21 2015 17:09
has anyone completed the simon game zipline?
x34passenger
@x34passenger
Sep 21 2015 17:15
thanks @SojournerOctocat
CamperBot
@camperbot
Sep 21 2015 17:15
x34passenger sends brownie points to @sojourneroctocat :sparkles: :thumbsup: :sparkles:
:star: 302 | @sojourneroctocat | http://www.freecodecamp.com/sojourneroctocat
Benjamin Faure
@Ben4a
Sep 21 2015 17:25
@tva10 so I would repeat that for each variable? like this?
<$($('.slot')0).html('<img src = "' + images[slotOne-2] + '">');
$($('.slot')1).html('<img src = "' + images[slotTwo-2] + '">');
$($('.slot')2).html('<img src = "' + images[slotThree-2] + '">');>
and then for 0?
x34passenger
@x34passenger
Sep 21 2015 17:26
Does anyone know how to start the Bonfire: Roman Numeral Converter, do we have a key value pair of numbers and roman numerals?
tva10
@tva10
Sep 21 2015 17:27
@Ben4a nope, you need only this three lines
  $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">');
    $($('.slot')[1]).html('<img src = "' + images[slotTwo-1] + '">');
    $($('.slot')[2]).html('<img src = "' + images[slotThree-1] + '">');
Benjamin Faure
@Ben4a
Sep 21 2015 17:27
@tva10 thank you for the help! really stuck on this one
CamperBot
@camperbot
Sep 21 2015 17:27
ben4a sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 239 | @tva10 | http://www.freecodecamp.com/tva10
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:40
What does the "unexpected token ILLEGAL" mean on a Bonfire?
the code works fine....
but i get that error message
it says "no user tests were run"
tva10
@tva10
Sep 21 2015 17:44
@TheHighPriestess Which bonfire?
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:44
@tva10 the same one..Everything Be True. I will post my code.
function every(collection, pre) {

    if(typeof pre === 'object'){
    var property = Object.getOwnPropertyNames(pre);
    //console.log(property);
    pre = property.toString();
    //console.log(pre);
    }


  var flag = false;

  for(var i=0; i<collection.length;i++)
  {
    if(collection[i].hasOwnProperty(pre)){
        flag = true;
    } 
    else {
        flag = false; 
        return flag;}
  }

return flag;
}

every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');

every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'});

every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa//-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'});
it works fine
but when I paste it into the bonfire....it gives me that error message
tva10
@tva10
Sep 21 2015 17:46
@TheHighPriestess umm
remove two of every testcases
because it wants one of them
Or may be an error in one of them
there is an error in last test case
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:49
hmm...ok let me try that
tva10
@tva10
Sep 21 2015 17:49
@TheHighPriestess I found
'Laa//-Laa'
like a Comment
x34passenger
@x34passenger
Sep 21 2015 17:49
thanks @SojournerOctocat
CamperBot
@camperbot
Sep 21 2015 17:49
x34passenger sends brownie points to @sojourneroctocat :sparkles: :thumbsup: :sparkles:
:warning: x34passenger already gave sojourneroctocat points
tva10
@tva10
Sep 21 2015 17:50
and it need to escape that
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:50
ah yeah...that's my fault..
@tva10 it still doesn't pass tests 2 and 3
Really....I have no idea what this Bonfire wants LOL
for the second test it says : "should return false if predicate returns falsey for any element in the collection: expected true to equal false"
but the predicate should NOT return falsey for any element
because they ALL have "sex"
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:55
Maybe I was right in the beginning...that the Bonfire wants to know the VALUE
Vatsala Swaroop
@smarshy
Sep 21 2015 17:55
Bonfire Friendly Date Ranges
CamperBot
@camperbot
Sep 21 2015 17:55

:fire:Bonfire: Friendly Date Ranges :link:

function friendly(str) {
  return str;
}

friendly(['2015-07-01', '2015-07-04']);

Implement a way of converting two dates into a more friendly date range that could be presented to a user.

more info:  bf details | bf links | hint

Vatsala Swaroop
@smarshy
Sep 21 2015 17:55
hint
CamperBot
@camperbot
Sep 21 2015 17:55
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:55
That's what I initially did...but that was, apparently, wrong as well
tva10
@tva10
Sep 21 2015 17:56
@TheHighPriestess ouououou... How I Have this bonfire??.... now I read test cases
I really don't know how the second test case works on my two lines code....
but it still works
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:56
@tva10 it works fine for me outside o f the Bonfire
but...it seems that this is not what the Bonfire wants...
Maybe someone can tell us what the Bonfire wants....because at this point...I'm clueless
I read through the instructions carefully
and I'm still not sure
tva10
@tva10
Sep 21 2015 17:59
@TheHighPriestess may be there is an issue?
because my code works
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 17:59
@tva10 possibly...yeah
yeah...mine works as well
tva10
@tva10
Sep 21 2015 18:00
@TheHighPriestess I mean that code got all test cases,,, but
but it should not ..
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:00
Something is wrong somewhere.
tva10
@tva10
Sep 21 2015 18:01
@TheHighPriestess pf, I think that I need to read task before making them....
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:01
Look at the test cases....if the Bonfire were only looking to see if the property "sex" was present....it wouldn't have test cases 2 and 3
test cases 2 and 3 are almost the same.....
This is why I initially thought it wanted me to check if all the VALUEs were the same
tva10
@tva10
Sep 21 2015 18:05
@TheHighPriestess may be I write Issue....
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:06
@tva10 Yes, because I believe that it should be working
tva10
@tva10
Sep 21 2015 18:06
@TheHighPriestess there should be more test cases there...
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:07
@tva10 yes, the test cases seem odd....test cases 2 and 3 are almost the same
tva10
@tva10
Sep 21 2015 18:08
@TheHighPriestess they need to chek true value on this testcase every([{'user': 'Tinky-Winky', 'sex': 'female'},{'user': 'Po', 'sex': 'female'}], {'sex':'female'});
sam horacek
@samlama111
Sep 21 2015 18:09
can anyone help me with bonfire:missing letters?
CamperBot
@camperbot
Sep 21 2015 18:09
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
tva10
@tva10
Sep 21 2015 18:13
@TheHighPriestess aaaaa, I can't understand this For this, check to see if the property defined in the second argument is present on every element of the collection. my English so bad....
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:19
@tva10 English is my native language and I am confused LOL
Batinex12
@Batinex12
Sep 21 2015 18:20
Waypoint: Use Clockwise Notation to Specify the Margin of an Element
I am stuck in this challenge. Use Clockwise Notation to give the element with the green-box class a margin of 40px on its top and left side, but only 20px on its bottom and right side.
I
I've written margin: 40px, 20px, 20px, 40px; and it isnt correct according to site
vvkgdm
@vvkgdm
Sep 21 2015 18:21
<script>
$(document).ready(function(){});
</script>
tva10
@tva10
Sep 21 2015 18:21
@Batinex12 margin: 40px 20px 20px 40px;
use spaces between
Batinex12
@Batinex12
Sep 21 2015 18:21
ok
thank you:)
CamperBot
@camperbot
Sep 21 2015 18:21
if you want to thank someone, put an @ before their name!
Batinex12
@Batinex12
Sep 21 2015 18:21
thank you @tva10
CamperBot
@camperbot
Sep 21 2015 18:21
batinex12 sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 240 | @tva10 | http://www.freecodecamp.com/tva10
vvkgdm
@vvkgdm
Sep 21 2015 18:21
Make sure your script element has a closing tag..i got closing tag right @tva10 tv10
<script>
$(document).ready(function(){});
</script> @tva10
tva10
@tva10
Sep 21 2015 18:23
@vvkgdm Could You show all code? and the name of the task
vvkgdm
@vvkgdm
Sep 21 2015 18:24
<script>
$(document).ready(function(){});
</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>
</script>
@tva10
vvkgdm
@vvkgdm
Sep 21 2015 18:25
tva10
@tva10
Sep 21 2015 18:25
your code looks workable
vvkgdm
@vvkgdm
Sep 21 2015 18:26
ok what is wrong then@tva10
tva10
@tva10
Sep 21 2015 18:27
@vvkgdm Try refreshing the page, or clear the cache
because your answer is Working
Tod
@thermobee
Sep 21 2015 18:27
Can somebody explain to me the break function of the pomodoro watch?
The break length
vvkgdm
@vvkgdm
Sep 21 2015 18:28
nope didnt worked@tva10
tva10
@tva10
Sep 21 2015 18:29
@vvkgdm
I paste this into my page,, and done this task
<script>
$(document).ready(function(){});
</script>
blob
really don't know why you did not pass second test case
vvkgdm
@vvkgdm
Sep 21 2015 18:32
@tva10 man donno i copied it and tried again same result nothing changed at all
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:32
@tva10 Here is code that passes that Bonfire. Notice that it only tests for "sex"...not an object being passed in
tva10
@tva10
Sep 21 2015 18:34
@TheHighPriestess Okay, there are need to check definition of property and its value if needed
@vvkgdm could you put screenshot here.... may be I found mistake///
@vvkgdm but I really think.. that it is browser error
Elizabeth Hatleli
@TheHighPriestess
Sep 21 2015 18:37
@tva10 So....I was correct initially
tva10
@tva10
Sep 21 2015 18:37
Yes
vvkgdm
@vvkgdm
Sep 21 2015 18:38
how to put screeshot
Waypoint- Learn how Script Tags and Document Ready Work - Free Code Camp 2015-09-22 00-07-19.png
tva10
@tva10
Sep 21 2015 18:39
@vvkgdm I see something after 26 line
there are </script> tag
He was not needed there
@vvkgdm or if you want you can Reset code and do it again
vvkgdm
@vvkgdm
Sep 21 2015 18:42

@tva10

wow thankssss buddy

tva10
@tva10
Sep 21 2015 18:42
@vvkgdm no problem
sorry for such a long answer
vvkgdm
@vvkgdm
Sep 21 2015 18:44
@tva10
nope the best answer i blind though lol
tva10
@tva10
Sep 21 2015 18:46
@vvkgdm I blind for a 10 minutes too
vvkgdm
@vvkgdm
Sep 21 2015 18:49
@tva10 ok then happy coding,im following you in github cyaa
tva10
@tva10
Sep 21 2015 18:51
@vvkgdm I think it is not necessary, because there's nothing interesting happens :D
I m so lazy to upload my code in github...
lamarpierce
@lamarpierce
Sep 21 2015 19:00
Can someone help me figure why I'm everything checks okay except top 1? See screenshot.
www.freecodecamp.com.jpg
tva10
@tva10
Sep 21 2015 19:05
@lamarpierce looks like workable code
@lamarpierce try reset task, and do it again...
but I really don't see mistake there
Joshua Abu
@Absolutestunna
Sep 21 2015 19:07
At what point in the code development using FCC curriculum do you start adding your code to github. Secondly, what tips do you have for the web development webpage assignment. I don't even know where start?
lamarpierce
@lamarpierce
Sep 21 2015 19:10
Thanks @tva10. I reset the task, but same result
CamperBot
@camperbot
Sep 21 2015 19:10
lamarpierce sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 241 | @tva10 | http://www.freecodecamp.com/tva10
Levyian
@levyian
Sep 21 2015 19:11
@Absolutestunna not sure about the first question. But what do you mean by web dev webpage?
tva10
@tva10
Sep 21 2015 19:11
@Absolutestunna Look for https://www.codecademy.com/ there are some interesting tasks for much frontend and backend dev
@lamarpierce It is not worked again? Write code here...
I will check it
lamarpierce
@lamarpierce
Sep 21 2015 19:13

<script>
function runSlots(){
var slotOne;
var slotTwo;
var slotThree;

var images = ["http://i.imgur.com/9H17QFk.png", "http://i.imgur.com/9RmpXTy.png", "http://i.imgur.com/VJnmtt5.png"];

slotOne = Math.floor(Math.random() (3 - 1 + 1)) + 1;
slotTwo = Math.floor(Math.random()
(3 - 1 + 1)) + 1;
slotThree = Math.floor(Math.random() * (3 - 1 + 1)) + 1;

$('.logger').html('');
$('.logger').html('Not A Win');

// Only change code below this line.

$($(".slot")[0]).html ('<img src = "' + images[slotOne-1] + '">');
$($(".slot")1).html ('<img src = "' + images[slotTwo-1] + '">');
$($(".slot")2).html ('<img src = "' + images[slotThree-1] + '">');

// Only change code above this line.

if(slotOne !== slotTwo || slotTwo !== slotThree){
return null;
}

if(slotOne !== undefined && slotTwo !== undefined && slotThree !== undefined){
$('.logger').html(slotOne);
$('.logger').append(' ' + slotTwo);
$('.logger').append(' ' + slotThree);
}

return [slotOne, slotTwo, slotThree];
}

$(document).ready(function(){
$('.go').click(function(){
runSlots();
});
});
</script>

<div>
<div class = 'container inset'>
<div class = 'header inset'>
<img src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz' alt='learn to code javascript at Free Code Camp logo' class='img-responsive nav-logo'>
<h2>FCC Slot Machine</h2>
</div>
<div class = 'slots inset'>
<div class = 'slot inset'>

</div>
<div class = 'slot inset'>

</div>
<div class = 'slot inset'>

</div>
</div>
<br/>
<div class = 'outset'>
<button class = 'go inset'>
Go
</button>
</div>
<br/>
<div class = 'foot inset'>
<span class = 'logger'></span>
</div>
</div>
</div>

<style>
.slot > img {
margin: 0!important;
height: 71px;
width: 50px;
}
.container {
background-color: #4a2b0f;
height: 400px;
width: 260px;
margin: 50px auto;
border-radius: 4px;
}
.header {
border: 2px solid #fff;
border-radius: 4px;
height: 55px;
margin: 14px auto;
background-color: #457f86
}
.header h2 {
height: 30px;
margin: auto;
}
.header h2 {
font-size: 14px;
margin: 0 0;
padding: 0;
color: #fff;
text-align: center;
}
.slots{
display: flex;
background-color: #457f86;
border-radius: 6px;
border: 2px solid #fff;
}
.slot{
flex: 1 0 auto;
background: white;
height: 75px;
width: 50px;
margin: 8px;
border: 2px solid #215f1e;
border-radius: 4px;
text-align: center;
}
.go {
width: 100%;
color: #fff;
background-color: #457f86;
border: 2px solid #fff;
border-radius: 2px;
box-sizing: none;
outline: none!important;
}
.foot {
height: 150px;
background-color: 457f86;
border: 2px solid #fff;
}

.logger {
color: white;
margin: 10px;
}

.outset {
-webkit-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: 0px 0px 15px -2px rgba(0,0,0,0.75);
}

.inset {
-webkit-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
-moz-box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 15px -2px rgba(0,0,0,0.75);
}
</style>

Levyian
@levyian
Sep 21 2015 19:14
@Absolutestunna To be clear, I meant which assignment?
@lamarpierce ahh, you're missing the [] for the array access here" $($(".slot")1).html ('<img src = "' + images[slotTwo-1] + '">'); $($(".slot")2).html ('<img src = "' + images[slotThree-1] + '">');
it's suppose to be $($(".slot")[1]).html ('<img src = "' + images[slotTwo-1] + '">');
Joshua Abu
@Absolutestunna
Sep 21 2015 19:17
@levyian Section 7 on the map. Basic Front End Projects. The second assignment is creating a website for your portfolio..
Levyian
@levyian
Sep 21 2015 19:18
@Absolutestunna oh ok, did you look at the example from the instructions?
tva10
@tva10
Sep 21 2015 19:18
@lamarpierce Hey, where is mistake, you should remove spaces between .html and ('<img...)
@lamarpierce It was not work because test cases can not recognize spaces
lamarpierce
@lamarpierce
Sep 21 2015 19:20
Let me try that @tva10
That did it. Thanks again. @tva10
CamperBot
@camperbot
Sep 21 2015 19:21
lamarpierce sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:warning: lamarpierce already gave tva10 points
Joshua Abu
@Absolutestunna
Sep 21 2015 19:21
Yeah i did. @levyian I want to do something different. I am thinking of recreating his. Giving me the experience.
tva10
@tva10
Sep 21 2015 19:21
@lamarpierce no problem)
Joshua Abu
@Absolutestunna
Sep 21 2015 19:21
But i want to be able to sketch something and build it..that's what i'll be doing in real life anyways. might as well start now @levyian
Levyian
@levyian
Sep 21 2015 19:25
@Absolutestunna so you're talking about the process - going from start to finish product right?
Joshua Abu
@Absolutestunna
Sep 21 2015 19:38
@levyian yeah..pretty much
Levyian
@levyian
Sep 21 2015 19:38
@Absolutestunna the design process is different for everyone. But this article gave me a good place to start: http://webdesignfromscratch.com/design-process/web-design-process/. Hopefully it can help you too.
Joshua Abu
@Absolutestunna
Sep 21 2015 19:39
@levyian Thank you very much. I'll check it out
CamperBot
@camperbot
Sep 21 2015 19:39
absolutestunna sends brownie points to @levyian :sparkles: :thumbsup: :sparkles:
:star: 307 | @levyian | http://www.freecodecamp.com/levyian
Levyian
@levyian
Sep 21 2015 19:40
@Absolutestunna yeah np :)
Prashanth
@dgprashanth
Sep 21 2015 19:53
Guys! Need some help with a problem with the pomodoro time zipline
I am unable to update the session time start according to the session duration value
As of now, the code resets the timer to 25 when I press the + or - buttons, but I am unable to update the current value and assign it tot he timer
It seems like a trivial issue, but it has been bugging me the entire day, and I would appreciate some help :)
I think there is an issue with the scope of the timer variable that I am using, and I don't know how to fix it
Michael Kallies
@mkallies
Sep 21 2015 19:56
Hey I need help on Bonfire: Check for Palindromes
CamperBot
@camperbot
Sep 21 2015 19:56
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Michael Kallies
@mkallies
Sep 21 2015 19:56
bonfire check for palindromes
CamperBot
@camperbot
Sep 21 2015 19:56

:fire:Bonfire: Check for Palindromes :link:

function palindrome(str) {
  // Good luck!
  return true;
}



palindrome("eye");

Return true if the given string is a palindrome. Otherwise, return false.

more info:  bf details | bf links | hint

Rex Schrader
@SaintPeter
Sep 21 2015 19:58
@dgprashanth Let me take a look
@mkallies Share your code so far?
Prashanth
@dgprashanth
Sep 21 2015 19:58
@SaintPeter I think I shall just PM you :)
Rex Schrader
@SaintPeter
Sep 21 2015 20:01
@dgprashanth ok, rather than using that rather convoluted selector to try to pull a val out of the HTML . . . instead just keep an internal javascript value for the current session. Call it var sessionTime or something. Instead of reading it FROM the HTML, write it TO the HTML. Then for the addSessionInput, just do sessionTime++ and write it back out: $('session').html(sessionTime);
Prashanth
@dgprashanth
Sep 21 2015 20:12
@SaintPeter Thanks! :+1:
CamperBot
@camperbot
Sep 21 2015 20:12
dgprashanth sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 677 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Sep 21 2015 20:12
:D
Levyian
@levyian
Sep 21 2015 20:16
@mkallies did you still need help?
Emanuele Antonelli
@Em-Ant
Sep 21 2015 20:21
@dgprashanth great design. The shadows are awesome ...
Prashanth
@dgprashanth
Sep 21 2015 20:22
@Em-Ant Thanks, I took some inspiration from other people :)
CamperBot
@camperbot
Sep 21 2015 20:22
dgprashanth sends brownie points to @em-ant :sparkles: :thumbsup: :sparkles:
:star: 348 | @em-ant | http://www.freecodecamp.com/em-ant
Emanuele Antonelli
@Em-Ant
Sep 21 2015 20:23
@dgprashanth , i'm following you on codepen, so i can take inspiration from you :smile:
Prashanth
@dgprashanth
Sep 21 2015 20:23
@Em-Ant Haha, i'm just a newb!
vaggelis-composer
@vaggelis-composer
Sep 21 2015 20:31
Hi all, I'm doing the zipline challenge where I create my portfolio page. There is a small white space between each background image for each div. Adjusting the height doesn't seem to work. I'm wondering how to get rid of this
Avil
@Avil172
Sep 21 2015 20:34

hi, i have been learning html and css and i am confused about margin and padding.
http://freecodecamp.com/challenges/waypoint-adjust-the-margin-of-an-element
in the above link( if you reset the code), the margin of red box is 20px, whereas that of green box is 10 px.

so what will be the distance between red box and green box?

Prashanth
@dgprashanth
Sep 21 2015 20:35
could you share the code? @vaggelis-composer
vaggelis-composer
@vaggelis-composer
Sep 21 2015 20:35
Prashanth
@dgprashanth
Sep 21 2015 20:38
@Avil172 The distance between the two will be 30pixels(20+10)
10 from the green box and 20 from the red box
A good way to figure out how something works is to play around with the values. If you change the red box margin to 0, you will have your answer :)
Avil
@Avil172
Sep 21 2015 20:40
@dgprashanth thanks but why doesn't it look like 30? and how do you find this out(the distance). i have actually played with the values.
CamperBot
@camperbot
Sep 21 2015 20:40
avil172 sends brownie points to @dgprashanth :sparkles: :thumbsup: :sparkles:
:star: 228 | @dgprashanth | http://www.freecodecamp.com/dgprashanth
Prashanth
@dgprashanth
Sep 21 2015 20:41
@Avil172 you could change both the margin values for both boxes to 0 and start from there
It also depends on your screen resolution or perhaps your idea of how big the pixels are?
Because numbers wise, it seems to add up to 30
Avil
@Avil172
Sep 21 2015 20:42
@dgprashanth ok so i changed red box's value to 0, but what about green box's margin? i mean, the green box's border doesn't seem to be at a 10px distance from red box(its set to 10px)
lamarpierce
@lamarpierce
Sep 21 2015 20:43
I'm having trouble getting the diffierence between the public and private in the code for this example. Would someone be willin gto help me out? http://freecodecamp.com/challenges/waypoint-make-object-properties-private
Rex Schrader
@SaintPeter
Sep 21 2015 20:46
@lamarpierce Sure
MG
@marjoriegoodwin
Sep 21 2015 20:46
'<input type="submit" value="Submit">' Why is this not right in creating a Submit error? It should be correct, but I can't pass the tutorial on this.
...creating a Submit button not error.
Rex Schrader
@SaintPeter
Sep 21 2015 20:46
@lamarpierce The difference is this:
this.isAPublicVariable; // because it can be accessed outside the object
var thisIsAPrivateVariable; // becuse it can only be access from INSIDE the object
Prashanth
@dgprashanth
Sep 21 2015 20:47
@Avil172 So are you saying that The green box's margin value is set to 10px and it is still not looking like it is that far? perhaps you could share a screenshot here?
Alexander Schuneman
@AxSch
Sep 21 2015 20:47
hint bonfire chunky monkey
CamperBot
@camperbot
Sep 21 2015 20:47
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
jameswlytle
@jameswlytle
Sep 21 2015 20:49
bf Validate US Telephone numbers
CamperBot
@camperbot
Sep 21 2015 20:49

:fire:Bonfire: Validate US Telephone Numbers :link:

function telephoneCheck(str) {
  // Good luck!
  return true;
}



telephoneCheck("555-555-5555");

Return true if the passed string is a valid US phone number

more info:  bf details | bf links | hint

jameswlytle
@jameswlytle
Sep 21 2015 20:50
the following regex appears to work per www.regexpal.com, however, my code does not. any thoughts? ^(1 )?(?[0-9]{3})?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$
lamarpierce
@lamarpierce
Sep 21 2015 20:51
@SaintPeter I get your example. Thanks for that. How would that work in the example?
CamperBot
@camperbot
Sep 21 2015 20:51
lamarpierce sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 678 | @saintpeter | http://www.freecodecamp.com/saintpeter
Avil
@Avil172
Sep 21 2015 20:52
@dgprashanth my bad, sorry. i was confused.
Rex Schrader
@SaintPeter
Sep 21 2015 20:52
@jameswlytle You may need to "escape" your literal parenthases by putting a forward slash in front of them.
Irina
@2Irina2
Sep 21 2015 20:52

Hi there!

Anybody could help me with the Seek and Destroy Bonfire?
http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy

Prashanth
@dgprashanth
Sep 21 2015 20:52
@Avil172 no problem! :)
jameswlytle
@jameswlytle
Sep 21 2015 20:52
@SaintPeter I do, just didn't get included in the copy and paste. it will work for 555-555-5555 but not 5555555555
Avishay
@avishayshushan
Sep 21 2015 20:53
bf pairwise
CamperBot
@camperbot
Sep 21 2015 20:53

:fire:Bonfire: Pairwise :link:

function pairwise(arr, arg) {
  return arg;
}

pairwise([1,4,2,3,0,5], 7);

Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.

more info:  bf details | bf links | hint

jameswlytle
@jameswlytle
Sep 21 2015 20:53
@SaintPeter I take that back. it does NOT work for 555-555-5555
Avishay
@avishayshushan
Sep 21 2015 20:53
did anyone can explain what should i return?
at the pairwise
jameswlytle
@jameswlytle
Sep 21 2015 20:53
@SaintPeter it works for 1 and a number. at least not on FCC. www.regexpal.com shows it to deliver the correct results no matter what is put in.
Rex Schrader
@SaintPeter
Sep 21 2015 20:53
@lamarpierce Anything variable that says this in front of it needs to be changed to a var for a definition and then remove the this. for the access. So in that example, this.gear needs to be var gear where it is defined and then everywhere you use it it'll just be gear.
BruceJamesH
@BruceJamesH
Sep 21 2015 20:54

Can't figure out why this won't return false on "1 eye for 1 eye" in the palindrome bonfire. Any suggestions?

function palindrome(str) {
str = str.toLowerCase();
str = str.replace(/[^a-z]/g, '');
for (var i = 0; i < Math.floor(str.length / 2); i++) {
if (str[i] != str[str.length - i - 1]) {
return false;
}
}
return true;
}

MG
@marjoriegoodwin
Sep 21 2015 20:54
'<input type="submit" value="Submit">' Why isn't this correct in creating a Submit button? It should be correct, but I can't pass the tutorial on this.
Rex Schrader
@SaintPeter
Sep 21 2015 20:54
@jameswlytle You can try http://regex101.com - it might work better.
jameswlytle
@jameswlytle
Sep 21 2015 20:55
@SaintPeter Okay, so on that site nothing works. hmmm. am i that far off base on the regex junk?
Rex Schrader
@SaintPeter
Sep 21 2015 20:56
@jameswlytle Possibly :D - they're HARD. The nice thing is, off to the right, it explains what it is doing. Start from the begining of the regex and try it agianst all of the possible starts - don't try to do it all in one go. Then as you add things, you can see how it goes. Put ALL of your sample nmbers down at the bottom in the test area
lamarpierce
@lamarpierce
Sep 21 2015 20:56
@SaintPeter OK. Got it!
vaggelis-composer
@vaggelis-composer
Sep 21 2015 20:56
@dgprashanth any idea what's up with the code?
Prashanth
@dgprashanth
Sep 21 2015 20:57
@vaggelis-composer Checking it out now :)
Rex Schrader
@SaintPeter
Sep 21 2015 20:57
@lamarpierce Awesome!
vaggelis-composer
@vaggelis-composer
Sep 21 2015 20:58
@dgprashanth great!
Prashanth
@dgprashanth
Sep 21 2015 21:02
@vaggelis-composer It seems while using container-fluid, its best to follow it up with another <div class="row></div>
which basically binds all the elements inside it, this should get rid of the unwanted margins
vaggelis-composer
@vaggelis-composer
Sep 21 2015 21:03
@dgprashanth I see. So row won't place all the divs inside it in a row?
jameswlytle
@jameswlytle
Sep 21 2015 21:04
@SaintPeter i got it. i had to rebuild my regex from scratch to see that i had left out 2 ? thanks!
CamperBot
@camperbot
Sep 21 2015 21:04
jameswlytle sends brownie points to @saintpeter :sparkles: :thumbsup: :sparkles:
:star: 679 | @saintpeter | http://www.freecodecamp.com/saintpeter
Rex Schrader
@SaintPeter
Sep 21 2015 21:04
@jameswlytle Awesome!
Prashanth
@dgprashanth
Sep 21 2015 21:05
@vaggelis-composer No, that won't happen. I tried it and it removes the margins on the side, you will still have to edit the elements later according to your needs
vaggelis-composer
@vaggelis-composer
Sep 21 2015 21:06
Of course. Thank you @dgprashanth
CamperBot
@camperbot
Sep 21 2015 21:06
vaggelis-composer sends brownie points to @dgprashanth :sparkles: :thumbsup: :sparkles:
:star: 229 | @dgprashanth | http://www.freecodecamp.com/dgprashanth
Prashanth
@dgprashanth
Sep 21 2015 21:06
You're welcome
vaggelis-composer
@vaggelis-composer
Sep 21 2015 21:07
@dgprashanth I appreciate removing the margins on the sides, but what about vertically?
Augustas
@AugustasV
Sep 21 2015 21:08
guys, why i am not learning? learning to code, but when i stop - not remember everything i learned
Chris
@Shifthawke
Sep 21 2015 21:12
Because some people to do things several times before they remember. @AugustasV
Rex Schrader
@SaintPeter
Sep 21 2015 21:12
@AugustasV Step 1: Don't stop. Code every day. Even if it's just for 10 minutes.
someone can help ? :p
Chris
@Shifthawke
Sep 21 2015 21:12
If you need to, pick five way points and just repeat, repeat, repeat until you can do it mostly without looking @AugustasV
Augustas
@AugustasV
Sep 21 2015 21:14
@SaintPeter ok, ill try
@Shifthawke what is five way points?
Rex Schrader
@SaintPeter
Sep 21 2015 21:15
@AugustasV Also, for general encouragement: https://gitter.im/FreeCodeCamp/YouCanDoThis
vaggelis-composer
@vaggelis-composer
Sep 21 2015 21:15
@AugustasV i find it helpful also to write down the lessons in a notebook
@AugustasV Although, ideally, there should be more practice problems for each waypoint
BruceJamesH
@BruceJamesH
Sep 21 2015 21:18
I have the same problem @AugustasV . I think it only really sinks in after you apply it in real-world projects that matter to you. Many times. Small drills and quizzes are just a start. And I bet if you reviewed old lessons, you'd be surprised at what you've learned so far. Hang tough.
Chris
@Shifthawke
Sep 21 2015 21:19
Each little task you do is a way point. Just pick five of them that follow each other and repeat those for practice. @AugustasV
I also agree with @vaggelis-composer . I write some of it in a notebook too. I have carptal tunnel so mine come out looking like stenographer short hand lol.
Avil
@Avil172
Sep 21 2015 21:22
hi.. can anyone help?
@dgprashanth mentioned that if two elements have different margins then the distance between them should be margin of element 1 + margin of element 2. and after playing with different margin values, i found that it was right.
but after solving this ..
http://freecodecamp.com/challenges/waypoint-use-clockwise-notation-to-specify-the-padding-of-an-element
it looks like the distance value between the elements is not same as (margin of element 1+ margin of element 2)
Prashanth
@dgprashanth
Sep 21 2015 21:25
@Avil172 Hey avil, This waypoint that you have mentioned talks about padding, and not the margins. They happen to be two different things. Margins meanwhile can also have the same detail(i.e top,left,bottom,right)
Check out this link, it should explain the basic difference between margins and padding
Avil
@Avil172
Sep 21 2015 21:30

@dgprashanth oops, i am sorry, again.
thanks for the explanation.
while i was waiting for a reply, i tried to understand the concept and searched for it, and i found this..
http://stackoverflow.com/questions/5958699/difference-between-margin-and-padding
the fourth answer states..

"Top/Bottom margins are collapsible.

So if you have a 20px margin at the bottom of an element and 30px margin at the top of the next element,

The margin between the two elements will be 30px rather than 50px.

This does not apply to left/right margin or padding."

CamperBot
@camperbot
Sep 21 2015 21:30
avil172 sends brownie points to @dgprashanth :sparkles: :thumbsup: :sparkles:
:warning: avil172 already gave dgprashanth points
Avil
@Avil172
Sep 21 2015 21:31
@dgprashanth yep i am checking the link.
@Avil172 You are right, The biggest number of the margins will be taken and not the simple addition that I said it was! :)
Pedro Hernández
@PedroJS
Sep 21 2015 21:38
i'm trying to overwrite bootstrap rules in codepen, but is not working, someone can help me please?
Prashanth
@dgprashanth
Sep 21 2015 21:38
@vaggelis-composer I would advise to open up a new codePen document, and start copying one element after another, whilst making sure the margins don't exist anymore. It has gotten a little messed up to clear. If you want an alternative, it would be best to identify where the background is showing up, and just move the elements margins up
@PedroJS share your code?
Avil
@Avil172
Sep 21 2015 21:39
@dgprashanth but how can this be? because i tested what you said and found that you were right..
eg- http://freecodecamp.com/challenges/waypoint-add-a-negative-margin-to-an-element
(reset the code)
now see that the red box has margin of -15 px and green box has margin of 20 px?
so the distance between the elements looks to be 20 + (-15)= 5px(which is what you said at that time), rather than the biggest number i.e 20px
Prashanth
@dgprashanth
Sep 21 2015 21:39
@vaggelis-composer For example, if you add a margin-top:-20px to your #My-Page and see the margins disappear :)
Pedro Hernández
@PedroJS
Sep 21 2015 21:39

<p data-height="268" data-theme-id="0" data-slug-hash="MaeyLM" data-default-tab="result" data-user="PedroJS" class='codepen'>See the Pen <a href='http://codepen.io/PedroJS/pen/MaeyLM/'>MaeyLM</a> by Pedro Hernández (<a href='http://codepen.io/PedroJS'>@PedroJS</a>) on <a href='http://codepen.io'>CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

affs
how can i embed codepen here
vaggelis-composer
@vaggelis-composer
Sep 21 2015 21:44
@dgprashanth thank you. I found a bit of a different solution. I made my divs inline-block elements. That really did the trick
CamperBot
@camperbot
Sep 21 2015 21:44
vaggelis-composer sends brownie points to @dgprashanth :sparkles: :thumbsup: :sparkles:
:warning: vaggelis-composer already gave dgprashanth points
Orbers
@Orbers
Sep 21 2015 21:45

//correct code

function repeat(str, num) {
var a = [];

for (var i = 0; i < num; i++) {
a.push(str)
};

return a.join('');
}

repeat("abc", 3, "");

//I know the below code is wrong but in my head I want "i" to show up somewhere in the command line of the for loop. why doesn't the "i" show up in the commnad line of the correct code?

function repeat(str, num) {
var a = [];

for (var i = 0; i < num; i++) {
a.push(str) * i
};

return a.join('');
}

repeat("abc", 3, "");

Tim P
@xTimpi
Sep 21 2015 21:49
Is there a way to use ng-repeat without a data pool? like ng-repeat with a set number, or ng-repeat as often as the content of a integer variable
all the internets solutions are super weird and I wonder if there is a cleaner way than „create a new array that is as big as the number you want to repeat, and then use its length"
Chocobowings
@chocobowings
Sep 21 2015 21:50
@xTimpi
The ngRepeat directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and $index is set to the item index or key.
Tim P
@xTimpi
Sep 21 2015 21:51
Yeah, I get that, but there is no context I just want x buttons
Chocobowings
@chocobowings
Sep 21 2015 21:51
@xTimpi So what is that you are trying to accomplish exactly ?
Tim P
@xTimpi
Sep 21 2015 21:52
I have a form with a dropdown „Number of Options“, in there is an integer between 0 and 10, and I want to render X Input fields on the page whenever that value changed, X being whatever is selected in „Number of Options"
any idea how to change the color of my name? i'm trying to override bootstraap styles but is not working for me...
Chocobowings
@chocobowings
Sep 21 2015 21:55
@xTimpi If I understand correctly you want ng-repeat to create an amount of input fields accordingly to the number clicked. Is that correct ?
Tim P
@xTimpi
Sep 21 2015 21:55
@chocobowings exactly
@chocobowings but its all good, I used the quickfix that is reccomended on stackoverflow on multiple occasions
Chocobowings
@chocobowings
Sep 21 2015 21:58
@xTimpi So ng-repeat iterates over a collection that's why they recommend you to create an array and then use ng-repeat (example items in [1,2,3,4,5,6])
Mateja Trifunovski
@Matko95
Sep 21 2015 21:58
@PedroJS you must use something like this
.navbar-default .navbar-brand {
    color: red;
}
Chocobowings
@chocobowings
Sep 21 2015 21:59
@xTimpi you should use ng-click to change the values of what ng-repeat is iterating over.
@xTimpi for example every time someone clicks on your menu ng-click will change the array that ng-repeat is using assigning a different number of elements
Tim P
@xTimpi
Sep 21 2015 22:01
@chocobowings I’m using ng-change for a dropdown menu, works pretty much the same way
Chocobowings
@chocobowings
Sep 21 2015 22:01
@xTimpi yup
Pedro Hernández
@PedroJS
Sep 21 2015 22:04
@Matko95 now is working thanks (y). Any way i can change it direct by bootstrap file?, may i access it from codepen?
CamperBot
@camperbot
Sep 21 2015 22:04
pedrojs sends brownie points to @matko95 :sparkles: :thumbsup: :sparkles:
:star: 337 | @matko95 | http://www.freecodecamp.com/matko95
Mateja Trifunovski
@Matko95
Sep 21 2015 22:05
@PedroJS maybe locally, but you definently can't on codepen
Chris
@Shifthawke
Sep 21 2015 22:10
I'm going to follow you chocobo.
-sneaks behind a bush and furiously types on the computer-
Chocobowings
@chocobowings
Sep 21 2015 22:10
@Shifthawke >.> hehe
Chris
@Shifthawke
Sep 21 2015 22:10
Bwahahahahaha.
Chocobowings
@chocobowings
Sep 21 2015 22:10
<.<
Chris
@Shifthawke
Sep 21 2015 22:10
<_<;
Chocobowings
@chocobowings
Sep 21 2015 22:10
~0.0~
Chris
@Shifthawke
Sep 21 2015 22:11
I'm in a good mood and forgot you could follow people so now I'm following people I talk to on here sometimes.
Chocobowings
@chocobowings
Sep 21 2015 22:12
@Shifthawke now I am following you ... ~(o_0)~
henry fritz
@henryamster
Sep 21 2015 22:19
On bonfire: make a person I'm not sure why bob is not an instance of Person. Any ideas?
var Person = function(firstAndLast) {
   var fullName = firstAndLast;
   var container = firstAndLast.split(' ');
   var first = container[0]; 
   var last = container[1];
   function changeFirstName(name) {first = name;}
   function changeLastName(name) {last = name;}
   function changeFullName(name) {fullName = name;}
  //
   return {
     getFirstName: function() {return first;},
     getLastName: function() {return last;},
     getFullName: function() {return fullName;},
     setFirstName: function(val) {changeFirstName(val);},
     setLastName: function(val) {changeLastName(val);},
     setFullName: function(val) {changeFullName(val);},

};

  //return firstAndLast;
};

var bob = new Person('Bob Ross');
bob.getFullName();
Chris
@Shifthawke
Sep 21 2015 22:19
YAY! @chocobowings
Friends for ever! lol
Chocobowings
@chocobowings
Sep 21 2015 22:22
@Shifthawke lol ^o.o^
Ansuke
@Ansuke
Sep 21 2015 23:14
Bonfire: Return Largest Numbers in Arrays, I am not sure why this is incorrect. It is able to pick the numbers from the array's and return an array of the largest numbers.
function largestOfFour(arr) {
  var largeArray = [];
  var largestNumber = 0;

  for (i = 0; i < arr.length; i++) {
    for (j = 0; j < arr[i].length; j++) {
      if (arr[i][j] > largestNumber) {
        largestNumber = arr[i][j];
      }
    }
    largeArray.push(largestNumber);
  }
  return largeArray;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]], "");
CamperBot
@camperbot
Sep 21 2015 23:14
Sorry, can't find a bonfire called return largest numbers in arrays i am not sure why this is not correct it is able to pick the numbers from the arrays and return an array of the largest numbersfunction largestoffourarr var largearray var largestnumber 0 for i 0 i arrlength i for j 0 j arrilength j if arrij largestnumber largestnumber arrij largearraypushlargestnumber return largearraylargestoffour4 5 1 3 13 27 18 26 32 35 37 39 1000 1001 857 1 . [ Check the map? ]
Bill
@kirah1314
Sep 21 2015 23:16
@Ansuke you need to reset largestNumber to 0 so it can find the largest number in all the arrays and not just 1 array
Ansuke
@Ansuke
Sep 21 2015 23:17
@kirah1314 Thanks for the quick reply, don't know why it was working on some and not the others.
CamperBot
@camperbot
Sep 21 2015 23:17
ansuke sends brownie points to @kirah1314 :sparkles: :thumbsup: :sparkles:
:star: 249 | @kirah1314 | http://www.freecodecamp.com/kirah1314
Fausto Ramírez L.
@faustor21
Sep 21 2015 23:26
Hi, just want to report that the Waypoint: Manage Packages with NPM, the how-to-npm it's full with bugs
Bill
@kirah1314
Sep 21 2015 23:28
@Ansuke I see your codes actually did already find the largest # in the arrays but because largestnumber isn't resetting, so it fails the 2nd test
Fausto Ramírez L.
@faustor21
Sep 21 2015 23:28
no even the how-to-npm verify skip afte doing the exercise 08 "publish"
it doesn't work!
Bill
@kirah1314
Sep 21 2015 23:29
@Ansuke if you switch the first and second array then you'll see both arrays come out to 27
Jacob Jamell
@jjamell
Sep 21 2015 23:29
@Ansuke Math.max.apply(null, arr) hint hint
Also Array.prototype.map() is your best friend
dkoepke417
@dkoepke417
Sep 21 2015 23:57
This message was deleted

So I am working on BF: Largest number in an Array. I can get my code to work for the first set of testing but no subsequent sets. I realize they want to use for and if statements but why not just sort them and create a new array.
function largestOfFour(arr) {
// You can do this!
var one = arr[0].sort();
var two = arr1.sort();
var three = arr[2].sort();
var four = arr[3].sort();
var newArr = [one[3], two[3], three[3], four[3]];

return newArr;
}

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

DTing
@dting
Sep 21 2015 23:59
@dkoepke417 sort will sort the array lexigraphically
it converts the elements in the array to strings
then sorts them
you need to pass a compareFunction to the sort function if you want to sort another way