These are chat archives for FreeCodeCamp/Help

15th
Jul 2017
Eric Miller
@ericmiller777
Jul 15 2017 00:14
hey guys
nvm
shivam gupta
@shivamg11000
Jul 15 2017 01:14
@ericmiller777 :wave:
Eric Miller
@ericmiller777
Jul 15 2017 01:14
hey
Joseph
@revisualize
Jul 15 2017 01:26
Hello.
Joseph
@revisualize
Jul 15 2017 01:49
Mastering Web Application Development with AngularJS
https://www.packtpub.com/packt/offers/free-learning
Eric Miller
@ericmiller777
Jul 15 2017 01:51
hey guy
guys
so i got the answer
but
its not coming back as an array

function largestOfFour(arr) {
// You can do this!
var num = 0;
var biggestNum = 0;
var numArray = [];
for (i = 0; i < arr.length; i++){
//for (j = 0; j < arr[i].length; j ++){
biggestNum = Math.max.apply(Math,arr[i]);
numArray += biggestNum;
//}
}
return numArray;
}

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

i get the right answer but numArray is not return an array just the correct answer
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 01:53
@ericmiller777 push the biggest number into the numArray
Eric Miller
@ericmiller777
Jul 15 2017 01:53
I got one without taking hour!
@ravikishorethella thanks
CamperBot
@camperbot
Jul 15 2017 01:54
ericmiller777 sends brownie points to @ravikishorethella :sparkles: :thumbsup: :sparkles:
:cookie: 955 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Eric Miller
@ericmiller777
Jul 15 2017 01:54
hours*
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 01:55
@ericmiller777 :thumbsup:
Eric Miller
@ericmiller777
Jul 15 2017 01:55
wow the advanced answer is amazing
Nick Janne
@njanne19
Jul 15 2017 01:59
Does anybody know if there is an algorithm form making maps for the Dungeon Project I can't think of any other way I could make map that would be big enough to be actually playable
Kyle Holm
@thekholm80
Jul 15 2017 02:05
I used a library called ROT.js to make my dungeon maps
Nick Janne
@njanne19
Jul 15 2017 02:09
@thekholm80 did you use a local environment or were you able to do it all on codepen
Kyle Holm
@thekholm80
Jul 15 2017 03:19
I did it locally
Nitin Sahu
@globefire
Jul 15 2017 04:11

function truncateString(str, num) {
  // Clear out that junk in your trunk
  var a = "";
  if(num != str.length){
    if(num >= 3){
      a = str.slice(0, num-3) + "...";
    }
      else{
      a = str.slice(0, num) + "...";
    }
  }
  else{
    a = str;
  }
  return a;
}

truncateString("A-tisket a-tasket A green and yellow basket", 11);
what's wrong in the last case ?
prakash chandra yadav
@prakashyadav008
Jul 15 2017 04:28
hey can someone help me out .I am not able to get the $.getJSON code work
Viktor Tiutiun
@vittorioVT
Jul 15 2017 05:04
@prakashyadav008 you need ohly one bootstrap: v.3.3 .7 or v.4.0.0, but don't both at once
Eric Miller
@ericmiller777
Jul 15 2017 05:51
hey i did my code like this

function confirmEnding(str, target) {
// "Never give up and good luck will find you."
// -- Falcor
if(str.substr(str.length - target.length) == target){
return true;
}else{
return false;
}
}

confirmEnding("Conner", "n");

is it okay that i do mine much more complicated then the him solution
or should i be coming up with that one?
rushendra
@rushendrarushi
Jul 15 2017 06:02
var myStr="I am a \"double quoted\"string inside\"double quotes\"."; whats wrong with this code?
i got it
i should give spaces lol
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:04
:smile:
rushendra
@rushendrarushi
Jul 15 2017 06:05
are you from russia?
viktore
viktor*
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:05
@rushendrarushi ukraine
rushendra
@rushendrarushi
Jul 15 2017 06:05
whenever i saw a name like viktor i relate them to russian mafia lol
it's a famous name :P
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:06
@rushendrarushi :+1:
rushendra
@rushendrarushi
Jul 15 2017 06:06
i'm sorry if you feel bad
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:06
never mind :smile:
rushendra
@rushendrarushi
Jul 15 2017 06:07
:)
are you learning anything? @vittorioVT
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:08
@rushendrarushi D3
rushendra
@rushendrarushi
Jul 15 2017 06:08
data visualization ?
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:08
yes
rushendra
@rushendrarushi
Jul 15 2017 06:08
nice..!!
can i ask you a question viktor?
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:09
:smile:
rushendra
@rushendrarushi
Jul 15 2017 06:09
why do we need $ to write a function?
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:10
@rushendrarushi this is the syntax jQuery
iso
@iso1048
Jul 15 2017 06:10
does anyone know if khan academy is a good place to learn computer science?
rushendra
@rushendrarushi
Jul 15 2017 06:10
yeah why do we need $ why cant we use @
is there anything specific to use $ @vittorioVT
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:11
@rushendrarushi in jQuery this means call a function
rushendra
@rushendrarushi
Jul 15 2017 06:12
ok thanks for your help @vittorioVT
CamperBot
@camperbot
Jul 15 2017 06:12
rushendrarushi sends brownie points to @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 782 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:12
@rushendrarushi ееhey thought it up, decided it was cool :smile:
@rushendrarushi you're welcome
rushendra
@rushendrarushi
Jul 15 2017 06:12
:)
@rushendrarushi ееhey thought it up, decided it was cool :smile: lol
Viktor Tiutiun
@vittorioVT
Jul 15 2017 06:13
*they
@rushendrarushi this is if you want their brand, sign, exclusive, but now in many languages this symbol is used
about team of jQuery
rushendra
@rushendrarushi
Jul 15 2017 06:17
yeah i'm seeing that
Duplicated
@Duplicated
Jul 15 2017 07:17
@LordFifth thanks for sharing the link for CSS :D
CamperBot
@camperbot
Jul 15 2017 07:17
duplicated sends brownie points to @lordfifth :sparkles: :thumbsup: :sparkles:
:cookie: 548 | @lordfifth |http://www.freecodecamp.com/lordfifth
Saif Ur Rahman
@saifsmailbox98
Jul 15 2017 09:02
@rushendrarushi the only two valid identifier symbols allowed are _ and $, it is just the selector function named $.
$()
rushendra
@rushendrarushi
Jul 15 2017 09:10
thanks @saifsmailbox98
CamperBot
@camperbot
Jul 15 2017 09:10
rushendrarushi sends brownie points to @saifsmailbox98 :sparkles: :thumbsup: :sparkles:
:cookie: 780 | @saifsmailbox98 |http://www.freecodecamp.com/saifsmailbox98
rushendra
@rushendrarushi
Jul 15 2017 09:11
what is madlib?
i'm not getting anything about it
is it a comic or is it a game?
or is it something else>
?
heroiczero
@heroiczero
Jul 15 2017 09:20
@rushendrarushi https://en.wikipedia.org/wiki/Mad_Libs#Format that is mad libs format
@rushendrarushi you fill in the blank with adverbs, nouns and pronouns to make funny sentences
rushendra
@rushendrarushi
Jul 15 2017 09:21
i'm stuck at 137
i'm clueless
sorry 154
challenge
heroiczero
@heroiczero
Jul 15 2017 09:25
@rushendrarushi Is it the madlib challenge
rushendra
@rushendrarushi
Jul 15 2017 09:25
yes
heroiczero
@heroiczero
Jul 15 2017 09:26
@rushendrarushi what do you have so far or do you have no idea how to approach it?
rushendra
@rushendrarushi
Jul 15 2017 09:26

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

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

i did this
and the error thing is showing this wordBlanks("dog", "big", "ran", "quickly") should contain all of the passed in words separated by non-word characters (and any additional words in your madlib).
what does this mean?
heroiczero
@heroiczero
Jul 15 2017 09:27
@rushendrarushi you already have the parameters myNoun, myAdjective, myVerb, myAdverb in your funcation
@rushendrarushi the function being function wordBlanks(myNoun, myAdjective, myVerb, myAdverb)
rushendra
@rushendrarushi
Jul 15 2017 09:28
so i just add the strings to the result?
heroiczero
@heroiczero
Jul 15 2017 09:28
@rushendrarushi you just have to append the parameters in a sentence with "spaces" like result= myNoun+ " " + myVerb +... and so on
rushendra
@rushendrarushi
Jul 15 2017 09:29
that's it?
heroiczero
@heroiczero
Jul 15 2017 09:29
@rushendrarushi yes
rushendra
@rushendrarushi
Jul 15 2017 09:29
@heroiczero thanks
CamperBot
@camperbot
Jul 15 2017 09:29
rushendrarushi sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1489 | @heroiczero |http://www.freecodecamp.com/heroiczero
Praveen Saraogi
@saraogipraveen
Jul 15 2017 09:40
which is best MERN or MEAN
andrea
@girlcodecrush
Jul 15 2017 10:05
Hi. I'm working on a tribute page and trying to put an image from another website to the page. The source website has multiple images and i want one of them. How can I pin the image I want to the tribute page?
heroiczero
@heroiczero
Jul 15 2017 10:05
@girlcodecrush right click the image and copy the image source
andrea
@girlcodecrush
Jul 15 2017 10:06
yup. thanks
Apo Shaan
@Apocryphonist
Jul 15 2017 10:07
Hello I was wondering can I import external resources like images into codepen
heroiczero
@heroiczero
Jul 15 2017 10:08
@Apocryphonist like your own images or images from other websites?
Apo Shaan
@Apocryphonist
Jul 15 2017 10:09
my own image
heroiczero
@heroiczero
Jul 15 2017 10:09
@Apocryphonist https://blog.codepen.io/documentation/pro-features/asset-hosting/ you can either do that or try to find a image hosting site that works
Apo Shaan
@Apocryphonist
Jul 15 2017 10:10
i m currently working on portfolio project, doing most of the editing in webstorm, is there any way i can import my edited file in codepen or can i use my git repo to submit the project
heroiczero
@heroiczero
Jul 15 2017 10:11
@Apocryphonist you could use git to submit it.
Apo Shaan
@Apocryphonist
Jul 15 2017 10:11
Thanks, One more thing can i submit my private repository
@heroiczero ??
heroiczero
@heroiczero
Jul 15 2017 10:15
@Apocryphonist you can submit it into github if that is what you are asking?
Apo Shaan
@Apocryphonist
Jul 15 2017 10:17
Yes, I already uploaded my project in the github private repo, can I share or submit it to freecodecamp
@heroiczero
heroiczero
@heroiczero
Jul 15 2017 10:17
@Apocryphonist yes
Apo Shaan
@Apocryphonist
Jul 15 2017 10:18
Thank you very much, you are a lifesaver
@heroiczero
Ene Catalin
@EneCatalin
Jul 15 2017 10:49
cat
cat
Bomee
@Bomulacious
Jul 15 2017 10:51
Hi - why is this code not generating anything? I'm tring to converting JSON Data to HTML https://codepen.io/Bomulacious/pen/owVLvw?editors=1010
heroiczero
@heroiczero
Jul 15 2017 10:58
@Bomulacious https://forum.freecodecamp.org/t/codepen-json-issues/63154 that might answer your problem
Ene Catalin
@EneCatalin
Jul 15 2017 10:59
@Bomulacious check the cosnole
you're getting two errors
Bomee
@Bomulacious
Jul 15 2017 11:13
@heroiczero @EneCatalin thanks, I'll take a look
CamperBot
@camperbot
Jul 15 2017 11:13
bomulacious sends brownie points to @heroiczero and @enecatalin :sparkles: :thumbsup: :sparkles:
:cookie: 438 | @enecatalin |http://www.freecodecamp.com/enecatalin
:star2: 1492 | @heroiczero |http://www.freecodecamp.com/heroiczero
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:28
@EneCatalin ostrich , help me with vue
MightyGarhem
@MightyGarhem
Jul 15 2017 11:35
Why everything I place in the html code ends up on the image? Isnt it supposed to be under it? And if I change the picture position the entire page gets messed.. help me out plz https://codepen.io/MightyGarhem/pen/QgVmga
Ene Catalin
@EneCatalin
Jul 15 2017 11:45
@diomed cat, ostrich is here
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:46
meow
Ene Catalin
@EneCatalin
Jul 15 2017 11:46
ok, let's start
first off, what is vue ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:47
smth fancy that's in these days
Ene Catalin
@EneCatalin
Jul 15 2017 11:47
it sounds gay
anyway, that aside, what can ostrich do to help you with vue ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:48
dot dot godot
Ene Catalin
@EneCatalin
Jul 15 2017 11:48
???
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:49
I+ll pm u
prog omar ahmed
@omarKady
Jul 15 2017 11:51
hey
May Kittens Devour Your Soul
@diomed
Jul 15 2017 11:51
but later, apparently. . .
I must mosey.
bye
prog omar ahmed
@omarKady
Jul 15 2017 11:51
this is my personal portfolio webpage
i have only problem
i checked it on mobile but it does not responsive to mobile
Daniil Holstinin
@scrimiil
Jul 15 2017 12:01
@omarKady it's not responsive at all
prog omar ahmed
@omarKady
Jul 15 2017 12:02
@scrimiil ؟؟؟؟؟
Ene Catalin
@EneCatalin
Jul 15 2017 12:07
means it looks horrid on mobile
prog omar ahmed
@omarKady
Jul 15 2017 12:07
@EneCatalin ok what is the solution>
??
Ene Catalin
@EneCatalin
Jul 15 2017 12:08
it's your project
use media queries
or bootstrap
prog omar ahmed
@omarKady
Jul 15 2017 12:11
is there difference between "container" class and "container-fluid" in bootstrap??
@EneCatalin ?
Thami Memel
@ThamiMemel
Jul 15 2017 12:13
hello guys i have a question about javascript is it possible to change a global variable value from inside a function ?
var x = 10;
function somefunc() {
x = 5;
}
console.log(x);
this code for example, when i check the console it's 10 not 5
Ene Catalin
@EneCatalin
Jul 15 2017 12:17
@omarKady yes
but I've no idea what the dif is
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:23
.
Ene Catalin
@EneCatalin
Jul 15 2017 12:24
what cat ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:24
calico :cat:
Ene Catalin
@EneCatalin
Jul 15 2017 12:25
???
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:26
@ThamiMemel Just reference the variable inside the function; no magic, just use it's name. If it's been created globally, then you'll be updating the global variable.
diomed @diomed copy-pasted this answer from the web and hopes 4 the best.
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:31
Two penguins were walking across an iceberg. One penguin turned to the second penguin and said, "You look like you're wearing a tuxedo." And the second penguin said, "Maybe I am."
Ene Catalin
@EneCatalin
Jul 15 2017 12:31
not fun :P
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:32
yes, js is funnier
Ene Catalin
@EneCatalin
Jul 15 2017 12:33
anyway, what's the vue problem ?
ostrich needs to do the wiki viewer project
this is going to take a long long long time
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:34
I want to implement a scrollbar https://github.serafin.io/vuebar/#installation
but it doesn't wanna show like it is on demo, at all
Ene Catalin
@EneCatalin
Jul 15 2017 12:34
you're using node
why is cat pretending not to know code when cat uses node
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:35
what is node?
Ene Catalin
@EneCatalin
Jul 15 2017 12:35
oh you used this
<script src="vuebar.js"></script>
lol
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:36
I used link to unpkg
Ene Catalin
@EneCatalin
Jul 15 2017 12:36
use
<script src="vuebar.js"></script>
it will work
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:37
make me a demu you emu
Ene Catalin
@EneCatalin
Jul 15 2017 12:37
I am not touching vue
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:38
classic ostrich. of no help @ all
Ene Catalin
@EneCatalin
Jul 15 2017 12:39
I told you, include that
maybe it works
why are you even using vue ?
btw cat WINTER IS COMINGF
IN TWO DAYS
you watching it right ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:40
@Margaret2 is already ready
she got T-shirt & all
Ene Catalin
@EneCatalin
Jul 15 2017 12:41
thought she didn't watch tv shows
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:41
:sunglasses:
Ene Catalin
@EneCatalin
Jul 15 2017 12:41
please don't tell her in the books hodor comes back as a zombie
only to be murdered by john snow
(who also comes back as a something)
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:41
something
Ene Catalin
@EneCatalin
Jul 15 2017 12:42
as the night king
happy now ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:42
.
Ene Catalin
@EneCatalin
Jul 15 2017 12:42
ima just pay for hosting
fk that free beep, it sucked
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:43
@EneCatalin don't forget to spoil everything important >,<
Ene Catalin
@EneCatalin
Jul 15 2017 12:43
you know I can't forget that
I mean you could read the books and find all that stuff out
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:44
or some1 could shut his filthy ostrich mouth and not talk about spoilers
Ene Catalin
@EneCatalin
Jul 15 2017 12:44
I mean I already gave you the biggest one
john snow = night king
what more could I do ?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:47
u could delete your spoilers, damn unflying bird
Ene Catalin
@EneCatalin
Jul 15 2017 12:47
people need to read the books
they deserve it
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:52
spoiler blabbers deserve to be escorted like this:
.
prog omar ahmed
@omarKady
Jul 15 2017 12:53

i modified my portfolio web page .... i added

<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0" >
</head>
to make it fit to mobile

is this right?
help?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 12:54
looks right to me
prog omar ahmed
@omarKady
Jul 15 2017 12:55
on mobile ?? @diomed
BuntyBru
@BuntyBru
Jul 15 2017 13:11

hi need a quick help

can we decrease the width of "container" class in bootstrap?

prog omar ahmed
@omarKady
Jul 15 2017 13:13
explain more? @BuntyBru
CamperBot
@camperbot
Jul 15 2017 13:13

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
May Kittens Devour Your Soul
@diomed
Jul 15 2017 13:16
@BuntyBru you can set your own width by rewriting class
.container {width: 400px;}
for example
BuntyBru
@BuntyBru
Jul 15 2017 13:17

@omarKady
I want to put three options in a row/navbar
but the thing is that
WITHOUT CONTAINER

All the three elements seem to be left aligned and the remaining space is empty
whereas

WITH CONTAINER
elements instead of being in same row
get divided into three different rows

@diomed
will my defination of the class CONTAINER override BOOTSTRAP Container Class?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 13:20
yes
that's what u want, no?
BuntyBru
@BuntyBru
Jul 15 2017 13:20
yes @diomed
@diomed
Thanks a lot mate
it worked
CamperBot
@camperbot
Jul 15 2017 13:23
buntybru sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5172 | @diomed |http://www.freecodecamp.com/diomed
May Kittens Devour Your Soul
@diomed
Jul 15 2017 13:24
:+1:
BuntyBru
@BuntyBru
Jul 15 2017 13:26
@diomed
why would kittens devour my soul ?
:P
May Kittens Devour Your Soul
@diomed
Jul 15 2017 13:29
coz they're hungry, hungry kittens :cat: :cat:
BuntyBru
@BuntyBru
Jul 15 2017 13:31
@diomed
ahha
prog omar ahmed
@omarKady
Jul 15 2017 13:31
@BuntyBru in the head of page you added class="container"
BuntyBru
@BuntyBru
Jul 15 2017 13:31
@omarKady
the problem is solved mate
mithun
@dmithun
Jul 15 2017 13:53

function truncateString(str, num) {
// Clear out that junk in your trunk

if(str.length>num ){
return str.slice(0, num-3)+ '...';
}
else if (str.length<=3){
return str.slice(0, num)+ '...';
}
else{
return str;
}
}

truncateString("A-tisket a-tasket A green and yellow basket", 11);

help me please
madhuri soni
@sonimadhuri
Jul 15 2017 14:08
@dmithun put your else if statement as the first if condition to check
mithun
@dmithun
Jul 15 2017 14:10
if(str.length>num && str.length<=3 ){
return str.slice(0, num-3)+ '...' && str.slice(0, num)+ '...';
}
like this @sonimadhuri ??????
Mike Batista
@mbmontana
Jul 15 2017 14:10
Starting on my Tribute page. I'm going to ask a really basic question. Do I start on it by creating a "New Pen" in CodePen?
madhuri soni
@sonimadhuri
Jul 15 2017 14:11
no let them be separate if statements just chnge the order @dmithun
@dmithun also if (str.length<=3||num<=3) add the or statement because when the string length <= 3 or num<=3 you will splice the string from 0 to num .if you dont add this the last test case will not be met.
mithun
@dmithun
Jul 15 2017 14:26
thankx @sonimadhuri
CamperBot
@camperbot
Jul 15 2017 14:26
dmithun sends brownie points to @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
mithun
@dmithun
Jul 15 2017 14:28

function truncateString(str, num) {
// Clear out that junk in your trunk

if (num<=3){
return str.slice(0, num)+ '...' ;
}
else if(str.length>num){
return str.slice(0, num-3)+ '...' ;
}
else {
return str;
}

}
truncateString("A-tisket a-tasket A green and yellow basket", 11);

i did it like this
madhuri soni
@sonimadhuri
Jul 15 2017 14:40
@dmithun :+1:
rainny767zk
@rainny767zk
Jul 15 2017 14:43
+7
Mike Batista
@mbmontana
Jul 15 2017 15:02
So I'm starting my FCC Tribute page. Is this page going to be viewable to the general public? I'm wondering if it's OK to use a Getty Images photo that I pulled from the Web without any copyright issues.
Manish Giri
@Manish-Giri
Jul 15 2017 15:03
@diomed :wave:
Margaret
@Margaret2
Jul 15 2017 15:12
@diomed :wave:
Ene Catalin
@EneCatalin
Jul 15 2017 15:14
cat has a vue prob you guys
Margaret
@Margaret2
Jul 15 2017 15:14
@mbmontana your FCC projects do have to be publicly viewable, however, if it's just one simple page on codepen i doubt anyone's gonna come after you for it
prog omar ahmed
@omarKady
Jul 15 2017 15:15
@BuntyBru ok continue
Margaret
@Margaret2
Jul 15 2017 15:20
@Manish-Giri omg :astonished: :point_up: July 15, 2017 9:52 AM
Ene Catalin
@EneCatalin
Jul 15 2017 15:21
@Margaret2 what ? the name ?
who hasn't had that little thing ?
Margaret
@Margaret2
Jul 15 2017 15:21
well, that and the code, it's soooo long, that challenge hardly needs any code lol
Ene Catalin
@EneCatalin
Jul 15 2017 15:21
she has other problems
the code is probs the least of them
Margaret
@Margaret2
Jul 15 2017 15:22
she's not the only one with problems :unamused:
Ene Catalin
@EneCatalin
Jul 15 2017 15:22
?
you ok brit ? Just drink some tea
Kyle Holm
@thekholm80
Jul 15 2017 15:33
good morning folks
Margaret
@Margaret2
Jul 15 2017 15:34
@thekholm80 :sunny: morning
aidanlearnscode
@aidanlearnscode
Jul 15 2017 15:37
@mbmontana I'd say 99% of people who build the tribute page just use an imge that they have no rights on. I have. If anythin comes of it [which it won
won't, I'll just change it.
Kyle Holm
@thekholm80
Jul 15 2017 15:37
in the us copyright doesn't apply the same to student projects
Margaret
@Margaret2
Jul 15 2017 15:38
yeah, and realistically, probably not many people total are going to view your tribute page, sorry :P
Mike Batista
@mbmontana
Jul 15 2017 15:38
@Margaret2 @aidanlearnscode Thanks!
CamperBot
@camperbot
Jul 15 2017 15:38
mbmontana sends brownie points to @margaret2 and @aidanlearnscode :sparkles: :thumbsup: :sparkles:
:cookie: 117 | @aidanlearnscode |http://www.freecodecamp.com/aidanlearnscode
:star2: 2857 | @margaret2 |http://www.freecodecamp.com/margaret2
Ronald Rodríguez
@ronrsuarez
Jul 15 2017 15:44

Hi there, I have this grunt task witch runs autoprefixer + cssnano

grunt.config("postcss", {
        options: {
            processors: [
                autoprefixer({ browsers: "last 2 versions" })
            ]
        },
        dev: {
            src: ".tmp/css/*.css"
        },
        build: {
            options: {
                processors: [
                    autoprefixer({ browsers: "last 2 versions" }), // <=== HERE
                    cssnano({ preset: 'default' }) ]
            },
            src: "build/css/*.css"
        }
    });

Now I I specify processors in top level options as above, tasks will pick it, but since I need to specify cssnano for the build task, the whole processors option gets replaced. Is there a way for me to sort of “extend” the processors array instead of repeating the whole thing? ty.

aidanlearnscode
@aidanlearnscode
Jul 15 2017 15:47
Hey, any feed back for my tribute page? Took a few designs, complete re-starts, I'm still not happy with it but from what I know, people go back to it at a later date and improve on it. So yeah, any feedback is appreciative:
https://codepen.io/aidanlearnscode/full/weOZLJ/
Praveen Saraogi
@saraogipraveen
Jul 15 2017 16:36
is anyone up for pair program
fir project random quote machine
*for
Mike Batista
@mbmontana
Jul 15 2017 16:44

Working on Tribute page and trying to get image on the page. I saved it to dropbox and copied the URL, but the image still won't show up. Any thoughts? Hopefully the code I'm about to show is properly formatted. Still haven't even figured out how to do THAT right :worried:
```<h1>Rodney Carter</h1>

<h2>Jack of all trades for late-80s Steelers</h2>
<img src="https://www.dropbox.com/s/pft6fyo2zsgmln3/RodneyCarterCard.jpg?dl=0" alt="Action photo of Rodney Carter">```

Momozor
@momozor
Jul 15 2017 16:46
I think you should replace the dl=0 to dl=1 in the dropbox url string.
@mbmontana
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 16:48
@mbmontana use can also use imgbb.com
Mike Batista
@mbmontana
Jul 15 2017 16:49
@faraco Didn't work
shivam gupta
@shivamg11000
Jul 15 2017 16:49
dont use imgbb.com it goes down sometimes
madhuri soni
@sonimadhuri
Jul 15 2017 16:49
@mbmontana replace www.dropbox.com with dl.dropboxusercontent.com
Your issue is similar to this (you are not the only one) - https://forum.freecodecamp.org/t/page-doesnt-show-image-from-dropbox/132270
Mike Batista
@mbmontana
Jul 15 2017 16:51
Do I need to hit the Run button in CodePen for the image to show?
May Kittens Devour Your Soul
@diomed
Jul 15 2017 16:51
yes
Momozor
@momozor
Jul 15 2017 17:01
heh
Nelson53
@Nelson53
Jul 15 2017 17:44

<style>
.red-text {
color: #000000;
}
.orchid-text {
color: #000000;
}
.sienna-text {
color: #000000;
}
.blue-text {
color: #000000;
}
</style>

<h1 class= rgb(255, 0, 0)>I am red!</h1>

<h1 class="orchid-text">I am orchid!</h1>

<h1 class="sienna-text">I am sienna!</h1>

<h1 class="blue-text">I am blue!</h1>

whats wrong with this code
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 18:08
@Nelson53 what is #000000?
check that
Sodiq Abdulhakeem
@Sawdeek
Jul 15 2017 18:12
say thatns @Nutech08186181915
thank u @ nutech. it work fine now
Kamorudeen Nurudeen I. A.
@Nutech08186181915
Jul 15 2017 18:13
@Sawdeek thanks
CamperBot
@camperbot
Jul 15 2017 18:13
nutech08186181915 sends brownie points to @sawdeek :sparkles: :thumbsup: :sparkles:
:cookie: 23 | @sawdeek |http://www.freecodecamp.com/sawdeek
Sodiq Abdulhakeem
@Sawdeek
Jul 15 2017 18:20
@Nutech08186181915 thans
May Kittens Devour Your Soul
@diomed
Jul 15 2017 18:32

#FFA500 is the new #000000

ajdev27
@ajdev27
Jul 15 2017 18:35
can someone help me with lesson "Nesting For Loops"
Stephane
@overmelo
Jul 15 2017 18:35
happy new year
@ajdev27 any issue?
ajdev27
@ajdev27
Jul 15 2017 18:36
@overmelo its July 15th
Abdullah Ali
@aali21
Jul 15 2017 18:36
Hello!
Nick Ross
@codecampNick
Jul 15 2017 18:36
maybe @ajdev27 what’s up?
Abdullah Ali
@aali21
Jul 15 2017 18:36
https://codepen.io/aali21/pen/weRaLV?editors=1100 How do I make it so that my navbar doesnt disappear when i scroll down
Nick Ross
@codecampNick
Jul 15 2017 18:37
@aali21 check out “z-index"
ajdev27
@ajdev27
Jul 15 2017 18:37
@overmelo i dont understand it i found the solution online but i dont understand how people got the answer @codecampNick
wait
oh boy
im way to tired
i meant to say i found the solution online but i dont understand how people got the solution
Sam Goldberg
@sgoldber61
Jul 15 2017 18:38

Hi guys I'm a bit stuck on the twitchTV stream status. For every streamer in my pre-set array of streamer names, I'm getting the JSON data. I'm using both https://wind-bow.glitch.me/twitch-api/channels/ and /streams/. I'm taking the return value of all the $.getJSON calls and storing them into an array completeChannels and an array completeStreams. Then I'm using $.when.apply($, completeChannels.concat(completeStreams)).done(function() { to do stuff once all the JSON data is obtained.

The JSON calls are all working, but the $.when.apply( is not working... and I'm really stuck. Any advice would be much appreciated. If needed, my codepen is here https://codepen.io/sgoldber61/pen/eRbddP

Nick Ross
@codecampNick
Jul 15 2017 18:40
@ajdev27 can you paste the code?
ajdev27
@ajdev27
Jul 15 2017 18:41
@codecampNick i found code online im just trying to understand how people got the answer
i dont understand the lesson
how do i paste code again?
the correct way
Nick Ross
@codecampNick
Jul 15 2017 18:43
put on one line with nothing else. then your code and then on another line
Stephane
@overmelo
Jul 15 2017 18:43
lest thy code be copieth and pasteth
Nick Ross
@codecampNick
Jul 15 2017 18:43
Put “” on one line then your code and then “” on the last line all by itself:)
ajdev27
@ajdev27
Jul 15 2017 18:44
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
      product *= arr[i][x];
    }
  }
thats the code
i dont understand it tho
Nick Ross
@codecampNick
Jul 15 2017 18:44
thanks!
So this is a multi demensional array something like [[1,2,3],[4,5,6]]
ajdev27
@ajdev27
Jul 15 2017 18:45
ok
Nick Ross
@codecampNick
Jul 15 2017 18:46
so the length of the array would be two as there are two sub arrays
makes sense?
that is what the first “for” loop is looking at
Stephane
@overmelo
Jul 15 2017 18:47
hence the 2 for loops
Nick Ross
@codecampNick
Jul 15 2017 18:48
yep, you have to know how many things are in the array, then the second “for” loops looks at the sub arrays
the first “for” loops says “hey, there are two things here and there are stuff in them” the second “for” loops says” cool, lets look at the stuff in the first grouping and then lets look at the stuff in the second grouping and see if I can find what I’m looking for"
it takes a while to wrap your head around some of these concepts. I’ve banged my head against a wall a bunch of times!
Nick Ross
@codecampNick
Jul 15 2017 18:53
does that help at all @ajdev27 ?
Nick Ross
@codecampNick
Jul 15 2017 19:02
maybe this will help?
var thing = [[1,2,3],[4,5,6]];
console.log(thing.length);


output = thing.length; // returns 2
output = thing[0]; //returns "[1,2,3]" this is the first for loop
output = thing[0][0]; // returns "1" this is the second for loop
LOL, I guess I’m doing a terrible job of explaining this………...
Ryan Draves
@RyanDraves
Jul 15 2017 19:21
Hello, I'm trying to do the javascript calculator challenge, and I'm having issues adding an event listener to overflows. None of the examples I could find online of this were working at all. Anyone know?
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:25
@Manish-Giri ?
Kyle Holm
@thekholm80
Jul 15 2017 19:26
shh you'll wake him up
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:26
:smile:
Darren
@DarrenfJ
Jul 15 2017 19:32
'day fCC
hey guys :D @ravikishorethella @thekholm80
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:32
@DarrenfJ hello :wave:
Kyle Holm
@thekholm80
Jul 15 2017 19:32
@DarrenfJ :wave:
Darren
@DarrenfJ
Jul 15 2017 19:36
jeebus it's quiet in here
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:36
make some nosie :smile:
Darren
@DarrenfJ
Jul 15 2017 19:37
rattles cage
Kyle Holm
@thekholm80
Jul 15 2017 19:38
lol
i'm only 1/2 here
Darren
@DarrenfJ
Jul 15 2017 19:39
m too now.. gonna go watch coding vids....
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:39
@DarrenfJ bye
Darren
@DarrenfJ
Jul 15 2017 19:39
in case i misss yah when i pop back in... thanks etc etc ;)
Kyle Holm
@thekholm80
Jul 15 2017 19:39
have fun @DarrenfJ thanks for stopping by
Darren
@DarrenfJ
Jul 15 2017 19:40
thanks @thekholm80 @ravikishorethella
CamperBot
@camperbot
Jul 15 2017 19:40
darrenfj sends brownie points to @thekholm80 and @ravikishorethella :sparkles: :thumbsup: :sparkles:
:star2: 1339 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 957 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:40
@DarrenfJ ty too
CamperBot
@camperbot
Jul 15 2017 19:40
ravikishorethella sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1903 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Jul 15 2017 19:40
keep rawking the volunteering.. even though it's slow it's always appreciated that we have a bit of a community going here
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:41
@thekholm80 @DarrenfJ did you guys buy wes bos learn node course?
Kyle Holm
@thekholm80
Jul 15 2017 19:41
I did not
i've never bought any wes bos stuff
Darren
@DarrenfJ
Jul 15 2017 19:41
hmmm... i bought a few of his a while ago but still haven;t got to them tbh
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:41
do you want that?
Darren
@DarrenfJ
Jul 15 2017 19:42
react maybe?
can't remember actually
you?
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:42
@DarrenfJ if I find something on react I will let you know
Kyle Holm
@thekholm80
Jul 15 2017 19:42
I bought a Steve Girder react-redux course on udemy that was pretty good
he uses es6, so it's pretty up-to-date
David Lower
@davidlower
Jul 15 2017 19:44
Does anyone use Atom for their text-editor
Darren
@DarrenfJ
Jul 15 2017 19:44
@ravikishorethella you taking his node course? any good?
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:45
@DarrenfJ not yet but, planning to take afterwards
@davidlower yes
David Lower
@davidlower
Jul 15 2017 19:45
@ravikishorethella Hi Ravi
Kyle Holm
@thekholm80
Jul 15 2017 19:45
I use Atom
David Lower
@davidlower
Jul 15 2017 19:45
I am trying to use the inbuilt git commands
Kyle Holm
@thekholm80
Jul 15 2017 19:46
i do all my git on command line, haven't really tried using the built in Atom stuff
David Lower
@davidlower
Jul 15 2017 19:46
So I do a ‘git add all, commit and push. It then comes up with the ‘commit-editor’ to write your message. I don’t know how to get out of this or confirmation the message. Tab and return don’t work
Yes I normal use terminal but since it is inbuilt it is actually much quicker
Abdullah Ali
@aali21
Jul 15 2017 19:47
Does anyone know the freecodecamp and github icon color code.. Ive tried looking online but cant find anything
Kyle Holm
@thekholm80
Jul 15 2017 19:48
have you tried using the dev console inspector @aali21 ?
Ravi Kishore Thella
@ravikishorethella
Jul 15 2017 19:48
@davidlower I use git bash to do the stuff
David Lower
@davidlower
Jul 15 2017 19:48
Oh I just figured it out. I just cmd-s to save it
simple. Oh man this is much much faster using it natively inside.
Kyle Holm
@thekholm80
Jul 15 2017 19:49
lol
maybe i'll have to give it a try
Abdullah Ali
@aali21
Jul 15 2017 19:49
@thekholm80 idk how u get that
David Lower
@davidlower
Jul 15 2017 19:49
I can use one command to add, push and commit within atom.
I don’t have to go to terminal and locate repository file and then add all the various commands
It’s brilliant
Kyle Holm
@thekholm80
Jul 15 2017 19:50
image.png
@aali21 looks like the color is "darkgreen"
for FCC
David Lower
@davidlower
Jul 15 2017 19:50
Plus it is all keybindings too
really brilliant
Kyle Holm
@thekholm80
Jul 15 2017 19:51
i just recently added terminal to my atom, it was a game changer
@aali21 looks like github's color is #24292e
David Lower
@davidlower
Jul 15 2017 19:52
@thekholm80 you said you didn’t use it
Kyle Holm
@thekholm80
Jul 15 2017 19:53
i said i didn't use what?
David Lower
@davidlower
Jul 15 2017 19:53
the terminal inside atom
Kyle Holm
@thekholm80
Jul 15 2017 19:53
i don't use the built in github stuff
David Lower
@davidlower
Jul 15 2017 19:53
so what is the difference
Kyle Holm
@thekholm80
Jul 15 2017 19:54
image.png
this is the built in github ui
image.png
this is a terminal
__mifflin__
@cdrainxv
Jul 15 2017 19:54
I use the terminal… only because I have a lot of aliases set up for it.
And my terminal is sooooo pretty.
Kyle Holm
@thekholm80
Jul 15 2017 19:55
i have so many terminals running just for web dev, i love having them right there inside the editor
image.png
and i can color code them lol
David Lower
@davidlower
Jul 15 2017 19:55
Yeah I suspect when really getting into the back end stuff terminal will become a beast
Kyle Holm
@thekholm80
Jul 15 2017 19:56
i have db running in one, db shell in one, nodemon in one and webpack in one
David Lower
@davidlower
Jul 15 2017 19:56
I am just a simple person. Just pushing to my repo on GitHub - nothing complicated. But using with keybinding to push and commit everything inside atom is very very nice
Kyle Holm
@thekholm80
Jul 15 2017 19:58
someday i'll learn how to configure webpack as express middleware and life will be awesome
__mifflin__
@cdrainxv
Jul 15 2017 19:59
If only react could be setup with a cli like angular…. :smile:
Kyle Holm
@thekholm80
Jul 15 2017 19:59
coming soon in ES8 this Object.values() and Object.entries() is going to be awesome
will be available in node 8, i can't wait
__mifflin__
@cdrainxv
Jul 15 2017 20:02
Node 8 is already out. You mean ES8? I am just looking forward to the pipe operator.
Kyle Holm
@thekholm80
Jul 15 2017 20:03
the article says they're available in node 8, not sure if i've upgraded yet
looks like i've got v7.10.0
__mifflin__
@cdrainxv
Jul 15 2017 20:03
You should set up nvm… so you can have several versions of node.
Kyle Holm
@thekholm80
Jul 15 2017 20:04
node version manager?
__mifflin__
@cdrainxv
Jul 15 2017 20:04
Yes.
Kyle Holm
@thekholm80
Jul 15 2017 20:04
interesting
Abdullah Ali
@aali21
Jul 15 2017 20:22
@thekholm80 thx
CamperBot
@camperbot
Jul 15 2017 20:22
aali21 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1340 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Aita Kane
@aita-kane
Jul 15 2017 20:26
hello i'm trying to place two pictures side by side but when i do there's always one covering the other I apply a position and z-index but nothing change
Abdullah Ali
@aali21
Jul 15 2017 20:29
image.png
why are the bullet points on the right?
so frustrating ><
korzo
@korzo
Jul 15 2017 20:30
@aita-kane z-index and position doesn't help. You should use floats, display: inline-block, or display: table-cell on images
Aita Kane
@aita-kane
Jul 15 2017 20:31
@korzo wait please imma show you a picture of it
ftest.PNG
Abdullah Ali
@aali21
Jul 15 2017 20:33
can someone tell me how I bring the bullet points together with the text https://codepen.io/aali21/pen/weRaLV?editors=1100
check pagetwo
aidanlearnscode
@aidanlearnscode
Jul 15 2017 20:33
Hey. I've just completed my portfolio page. Would love feedback. I'm not that happy with it but from what I know, a lot of people go back to the portfolio page and improve it. So any feedback is appreciative:
https://codepen.io/aidanlearnscode/full/weOZLJ/
Kyle Holm
@thekholm80
Jul 15 2017 20:35
image.png
those colors kind of disappear into your background
Abdullah Ali
@aali21
Jul 15 2017 20:36
@aidanlearnscode hey it looks good, but if you could fix that bug in the portfolio section it'd be great
and maybe if u want change the background for each page
aidanlearnscode
@aidanlearnscode
Jul 15 2017 20:39
@aali21 cheers. Which bug is it?
korzo
@korzo
Jul 15 2017 20:39
@aita-kane Your images are too big. give img max-width: 40% and display: inline-block
Aita Kane
@aita-kane
Jul 15 2017 20:40
@korzo i give that to the div or the img?
aidanlearnscode
@aidanlearnscode
Jul 15 2017 20:40
@thekholm80 triedchanging them and for some reason, couldnt.
Abdullah Ali
@aali21
Jul 15 2017 20:40
image.png
@aidanlearnscode this kinda looks off... try adding padding to ur portfolio text
korzo
@korzo
Jul 15 2017 20:41
@aita-kane Do you have images wrapped in div?
Aita Kane
@aita-kane
Jul 15 2017 20:42
@korzo yes <div class="fr"> <img src="fr.jpg" > </div>
CamperBot
@camperbot
Jul 15 2017 20:42
:bulb: to format code use backticks! ``` more info
aidanlearnscode
@aidanlearnscode
Jul 15 2017 20:42
@aali21 Damn. It doesn't look like that on my screen. Strange
korzo
@korzo
Jul 15 2017 20:44
@aita-kane then .ft img {max-width: 100%;}
But it would be useful to post your code to jsbin/codepen
actually i did post it on codepen but the picture s are in my laptop so i can't have them load in there
Aita Kane
@aita-kane
Jul 15 2017 20:53
@korzo ok actually i'm tryng to place my pictures so i can have this result
tr2.PNG
korzo
@korzo
Jul 15 2017 20:59
@aita-kane It would very difficult to do in CSS. Create this image in graphic editor, the add it to background and place logo over it
Aita Kane
@aita-kane
Jul 15 2017 21:00
actually that's exactly what i was thinking i 'm doing it with illustrator then save it for the web
bu t thank you so much for your help that's really nice @korzo
CamperBot
@camperbot
Jul 15 2017 21:01
aita-kane sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 255 | @korzo |http://www.freecodecamp.com/korzo
aidanlearnscode
@aidanlearnscode
Jul 15 2017 21:07
@korzo Why are you using my image on that page? Just asking. Not sure if the reply was supposed to be at me or something?
ajdev27
@ajdev27
Jul 15 2017 21:08
 arr[i].length;
what does it mean in a for loop when the variable i is in brackets?
korzo
@korzo
Jul 15 2017 21:10
@aidanlearnscode I already deleted this pen. I needed image for demonstration and I mixed up gitter usernames. Sorry about that
cowCrazy
@cowCrazy
Jul 15 2017 21:13
@ajdev27 simply as you wrote it? [i] is an operator, that returns the item from the array on it's left-side in the index specified in the brackets
Alex
@alexandrupintilei
Jul 15 2017 21:16
https://codepen.io/balexoy/pen/VWbNaQ
Why img isnt default?Help pls!
Uriel Guzmán
@Burinson
Jul 15 2017 21:21

How can I return the largest number of each array?

function largestOfFour(arr) {
  // You can do this!
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
      arr = Math.max(arr[i][x]);
    }

  }

  return arr;

}

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

This is what I've got so far

cowCrazy
@cowCrazy
Jul 15 2017 21:27
@alexandrupintilei for some reason you don't have access to cTemp in the if statment..... I tried to place it just bellow the block of the cTemp and there it worked. to give a better answer I need to have a moment to read it on a normal text editor to see why it is not in the scope
cowCrazy
@cowCrazy
Jul 15 2017 21:32
@Burinson notice that you are modifying arr, which is the array you are checking, replace it with a different var
Uriel Guzmán
@Burinson
Jul 15 2017 21:37

@cowCrazy

function largestOfFour(arr) {
  // You can do this!
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
      var newArray = Math.max.apply(null, arr[i][x]);
    }

  }

  return newArray;

}

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

It's out of scope though

cowCrazy
@cowCrazy
Jul 15 2017 21:38
@Burinson decalare the new var at the top of the function, then it would be in the scope
Uriel Guzmán
@Burinson
Jul 15 2017 21:38
@cowCrazy what should I initialize it with?
function largestOfFour(arr) {
  // You can do this!
  var newArray = 0;
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
       newArray = Math.max.apply(null, arr[i][x]);
    }

  }

  return newArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
like that?
cowCrazy
@cowCrazy
Jul 15 2017 21:40
@Burinson that's a start! now you wanna return an arrray right?
Uriel Guzmán
@Burinson
Jul 15 2017 21:41
@cowCrazy yeah
cowCrazy
@cowCrazy
Jul 15 2017 21:42
So better make newArray an array in first place such as var newArray = []
Uriel Guzmán
@Burinson
Jul 15 2017 21:43
function largestOfFour(arr) {
  // You can do this!
  var newArray = [];
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
       newArray = Math.max.apply(null, arr[i][x]);
    }

  }

  return newArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
cowCrazy
@cowCrazy
Jul 15 2017 21:43
you know how to add new element to an array?
Uriel Guzmán
@Burinson
Jul 15 2017 21:43
Nope
cowCrazy
@cowCrazy
Jul 15 2017 21:44
Alex
@alexandrupintilei
Jul 15 2017 21:44
@cowCrazy Thanks,i can wait
CamperBot
@camperbot
Jul 15 2017 21:44
alexandrupintilei sends brownie points to @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 263 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
Uriel Guzmán
@Burinson
Jul 15 2017 21:44
Okay, gonna read that, but what am I going to add with push?
__mifflin__
@cdrainxv
Jul 15 2017 21:45
The largest element in each subarray.
cowCrazy
@cowCrazy
Jul 15 2017 21:46
what you find in Math.max()
Uriel Guzmán
@Burinson
Jul 15 2017 21:46
Ohh
Okay, give me a moment
Uriel Guzmán
@Burinson
Jul 15 2017 21:49
function largestOfFour(arr) {
  // You can do this!
  var newArray = [];
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
       newArray = arr.push(Math.max.apply(null, arr[i][x]));
    }

  }

  return newArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
__mifflin__
@cdrainxv
Jul 15 2017 21:49
@Burinson: You also only need one for loop when you are using Math.max() method in this algorithm.
Uriel Guzmán
@Burinson
Jul 15 2017 21:50
should I delete the inner loop?
cowCrazy
@cowCrazy
Jul 15 2017 21:50
@Burinson you are really close!!!
Joseph
@revisualize
Jul 15 2017 21:50
@Burinson you really need ti figure out what Math.max() does
@Burinson yes
@Burinson if
@Burinson you use math.max
__mifflin__
@cdrainxv
Jul 15 2017 21:50
Math.max() takes an array (or a csv list) and finds the max value in the array.
cowCrazy
@cowCrazy
Jul 15 2017 21:51
@Burinson think again what are you trying to achieve, and how deep should you go inside the original arr. but you are more or almost there :)
Uriel Guzmán
@Burinson
Jul 15 2017 21:54
function largestOfFour(arr) {
  // You can do this!
  var newArray = [];
  for (var i = 0; i < arr.length; i++) {

       newArray = arr.push(Math.max.apply(null, arr));
    }



  return newArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
I understand that Math.max(4, 15) would give me 15
but not really sure how to use in an array
or for multiple arrays
Joseph
@revisualize
Jul 15 2017 21:56
@Burinson arr[i]
@Burinson this newArray = arr.push(Math.max.apply(null, arr)); is all wrong
@Burinson The push() method adds one or more elements to the end of an array and returns the new length of the array.
@Burinson you're making newArray a number
Uriel Guzmán
@Burinson
Jul 15 2017 21:59
I'm so lost
why am I making it a number?
holy crap
function largestOfFour(arr) {
  // You can do this!
  var newArray = [];
  for (var i = 0; i < arr.length; i++) {

       newArray.push(Math.max.apply(null, arr[i]));
    }



  return newArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
I did it
cowCrazy
@cowCrazy
Jul 15 2017 22:08
@Burinson well done!!!
Uriel Guzmán
@Burinson
Jul 15 2017 22:08
@cowCrazy thanks
CamperBot
@camperbot
Jul 15 2017 22:08
burinson sends brownie points to @cowcrazy :sparkles: :thumbsup: :sparkles:
:cookie: 264 | @cowcrazy |http://www.freecodecamp.com/cowcrazy
Joseph
@revisualize
Jul 15 2017 22:09
@Burinson grats
Uriel Guzmán
@Burinson
Jul 15 2017 22:09
@revisualize thank you too
CamperBot
@camperbot
Jul 15 2017 22:09
burinson sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
:star2: 4346 | @revisualize |http://www.freecodecamp.com/revisualize
Joseph
@revisualize
Jul 15 2017 22:15
If you are in one of these markets:
Seattle, Los Angeles, Chicago, Silicon Valley, Dallas, Washington DC
Check out: http://www.codingdojo.com/alexa-skills-workshop
It's a free coding workshop put on by Coding Dojo. They have partnered with Amazon to offer training to teach developers how to build Alexa Skills.
dmlk418
@dmlk418
Jul 15 2017 22:47
hey guys, I am having trouble with the Falsy Bouncer problem from
basic algorithm scripting

function bouncer(arr) {
myArray = [];
for (i = 0; i < arr.length; i++) {
if (arr[i] !== false && arr[i] !== null && arr[i] !== 0 && arr[i] !== "" && arr[i] !== undefined && isNaN(arr[i]) == false) {
myArray.push(arr[i]);

}
}
return myArray;

this is what I have so far and I understand that this line (isNaN(arr[i]) == false) is what is giving me trouble
if I include it, it eliminates my string values, but if I set it to true or remove it, I get a null value in my array
cowCrazy
@cowCrazy
Jul 15 2017 22:52
@alexandrupintilei the problem was that you placed the if statement inside the .on('click', function(){}) means this code will be executed only when the button is clicked, so you can try to click button and you will see you background changes. To overcome it, I think best what you already did, to place it bellow the var deceleration and then it is executed as expected when the data from the api is returning.
Tim Bakker
@ixava
Jul 15 2017 23:00
@dmlk418 Maybe you could compare your value to NaN explicitly
@dmlk418 instead of using a function
cowCrazy
@cowCrazy
Jul 15 2017 23:05
@dmlk418 true/false in js is much different than other scripts.... check this, and best tip I can give you is that if you put a value (or variable) inside an if() it is automatically translated to true/false var a = 'abc'; if(a){console.log(a)} the code inside the if will run because var a has a truthy value
dmlk418
@dmlk418
Jul 15 2017 23:10
@ixava if I set arr[i] !== NaN, the function still returns null for inputs of NaN and it suggests I use isNaN instead
cowCrazy
@cowCrazy
Jul 15 2017 23:12
NaN === NaN is false
dmlk418
@dmlk418
Jul 15 2017 23:13
@cowCrazy I set arr[i] !== NaN the function still returns null if NaN is an input
cowCrazy
@cowCrazy
Jul 15 2017 23:14
@dmlk418 you read what I wrote you above?
dmlk418
@dmlk418
Jul 15 2017 23:16
@cowCrazy I just saw it. The way I wrote it was that it pushed the value if it is not equal to NaN so I set it at !==
stealthygame
@stealthygame
Jul 15 2017 23:26
I'm starting the "Random Quote Generator" website... Do i just start off googling 'random quote' APIs?
cowCrazy
@cowCrazy
Jul 15 2017 23:28
@dmlk418 it is lot of work to try and figure out all the truthy/falsy values, you would need to check each of them for its own way, if it is a string then not empty, if it is a number then not 0 and so on.... so then it is lots of work.... let the if decide for you, the js engine knows best for itself :)
@stealthygame here is an option - https://random-quote-generator.herokuapp.com
stealthygame
@stealthygame
Jul 15 2017 23:30
@cowCrazy so i would just pass that url to my getJson function ?
@cowCrazy or do i put that url in the settings under javascript in codePen ?
I can understand code... but I dont get how these different things all "connect"
cowCrazy
@cowCrazy
Jul 15 2017 23:34
@stealthygame it goes in your getJSON function.... in the settings you add the jquery library itself for example or other libraries you need
stealthygame
@stealthygame
Jul 15 2017 23:34
is a library different than an API ?
@cowCrazy is a library different than an API ?
cowCrazy
@cowCrazy
Jul 15 2017 23:36
Also can read here to work better with the getJSON function. The library is not in the form of api, it is adding another js file to your cod
stealthygame
@stealthygame
Jul 15 2017 23:37
would i search a library just like i would for an array of JSON objects ? or does that depend the the library?
Serenity
@qmikew1
Jul 15 2017 23:42
no, in a library (lib) you'd included a reference and use its methods - jquery is a simple example
cowCrazy
@cowCrazy
Jul 15 2017 23:42
Google codepen + the library you wanna use, it will show you best how to add it, then you don' t need to search it, you just work with it as you did in the fcc lessons, you just write the $(document).ready(function(){}) then all what you need inside that function...
Uriel Guzmán
@Burinson
Jul 15 2017 23:46
Need help
function confirmEnding(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor

  if (str === str.substr(target.length)) {
    return true;
  } else {
  return false;
    }
  }


confirmEnding("Bastian", "n");
challenge is ''confirm the ending''
Serenity
@qmikew1
Jul 15 2017 23:51
you are sort of on the right track but substr takes two arguments (end is optional) your current output on str is astian
Uriel Guzmán
@Burinson
Jul 15 2017 23:53
@qmikew1 I don't understand the tip in the forum To get the Nth-to-Last character you will use length() and turn it into a negative number.
Serenity
@qmikew1
Jul 15 2017 23:54
ok, hang on a sec
Uriel Guzmán
@Burinson
Jul 15 2017 23:54
an error pops up and says ''length() is not a function''
if I place the parenthesis
Serenity
@qmikew1
Jul 15 2017 23:55
length doesn't take args
Uriel Guzmán
@Burinson
Jul 15 2017 23:55
exactly
Serenity
@qmikew1
Jul 15 2017 23:55
but give me a second and we can talk about the negative piece
Uriel Guzmán
@Burinson
Jul 15 2017 23:55
ah, okay
What I understoon is that if you place a negative number on the substr arg and omit the length, you will get the last nth-to-last character
but don't understand how I'm supposed to use length()
Serenity
@qmikew1
Jul 15 2017 23:57
use .length
Uriel Guzmán
@Burinson
Jul 15 2017 23:58
yeah, that's why I used target.length but it didn't work, lol
Serenity
@qmikew1
Jul 15 2017 23:58
but you should be able to use () ... but
but we're getting off track