These are chat archives for FreeCodeCamp/Help

11th
Sep 2017
leonaaa
@leonaaa
Sep 11 2017 00:00
//Is It Truthy?
function isTruthy(str){
  if (str) {
    return true;
  }
    return false;
}

isTruthy('hello world'); //true
isTruthy(''); //false
isTruthy(0); //false
how come using an if/else statement returns the second test case to true? but if i don’t it returns false
just1witness
@just1witness
Sep 11 2017 00:02
Show your code with the if/else
@leonaaa
leonaaa
@leonaaa
Sep 11 2017 00:03
function isTruthy(str){
  if (str) {
    return true;
  } else {
    return false;
  }
}
the first one’s correct.. but i’m not sure why using an if/else statement would cause (‘’) to be true
just1witness
@just1witness
Sep 11 2017 00:04
huh, good question
Idk either
I get the right results
true, false, false
just1witness
@just1witness
Sep 11 2017 00:06
Maybe the brackets were a little off the first time? @leonaaa
leonaaa
@leonaaa
Sep 11 2017 00:07
actually - nevermind
i’m getting the answer i want.. haha
thanks =)
Manish Giri
@Manish-Giri
Sep 11 2017 00:08
you could also try the shorter way
function isTruthy(str){
  return Boolean(str);
 }
Gersho
@Gersho
Sep 11 2017 00:10
if the function is like that, is there a point in the function at all ?
leonaaa
@leonaaa
Sep 11 2017 00:11
haha, no
just a basic introductory question
just1witness
@just1witness
Sep 11 2017 00:16
@Gersho Mayyyybe, the point of that lesson, is to come to that very conclusion....
Eric Miller
@ericmiller777
Sep 11 2017 02:04
anyone doing anything interesting?
Gersho
@Gersho
Sep 11 2017 02:05
i'm starting to read about canvas, better late than never i guess ?
but that might not qualify as "interesting"
just1witness
@just1witness
Sep 11 2017 02:06
Sounds, borriiinterseting! :)
Gersho
@Gersho
Sep 11 2017 02:07
i love that made up word @just1witness
just1witness
@just1witness
Sep 11 2017 02:07
;P
Gersho
@Gersho
Sep 11 2017 02:09
but i'm kinda worried for my react challenges, i learned a bit about react, it's cool and all, but that totaly doesn't prepare me for game of life, the roguelike or the recipebox
just1witness
@just1witness
Sep 11 2017 02:23
You mean in backend?
Gersho
@Gersho
Sep 11 2017 02:28
in data visualisation
(i call them chapter 1, 2 ,3 xD)
and no i didn't get my front end cert yet, haven't done my portfolio
just1witness
@just1witness
Sep 11 2017 02:31
oh, I'm almost at the cert, going to data vis next
Gersho
@Gersho
Sep 11 2017 02:32
that's also where the lessons are in "not implemented yet" mode :P
but CodeAcademy has pretty cool react lessons
just1witness
@just1witness
Sep 11 2017 02:34
ah, yeah. Thanks for the tip @Gersho
CamperBot
@camperbot
Sep 11 2017 02:34
just1witness sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @gersho |http://www.freecodecamp.com/gersho
Darren
@DarrenfJ
Sep 11 2017 04:48
evening fCC
Gersho
@Gersho
Sep 11 2017 04:49
:wave: @DarrenfJ
Darren
@DarrenfJ
Sep 11 2017 04:50
:wave:
have't tried the Codecademy revamped react... you say it's good?
Gersho
@Gersho
Sep 11 2017 04:50
well i can't compare with others since it's the only i've taken, but so far React part 1 has been full of knowledge explained in a correct way
it introduced me to class constructors, i'm a bit confused about them since i have trouble seeing the difference with function constructors
Darren
@DarrenfJ
Sep 11 2017 04:58
ok cool...
i started in on it a year or so ago but i htink they revamped it since then
Gersho
@Gersho
Sep 11 2017 05:00
there's just so much stuff to learn, i'm on canvas at the moment
Darren
@DarrenfJ
Sep 11 2017 05:00
want to take the new one
oh yah.. way too much to learn :D
of everything
Gersho
@Gersho
Sep 11 2017 05:02
on a more personal note i've been extremely lucky last week, Irma and Jose both missed where i live by a hair
Darren
@DarrenfJ
Sep 11 2017 05:07
ah good...
I have a friend in Florida who packed up for safer ground recently.. haven't been checking the news though this weekend, so I don't know what's up with it...
Where are yah located? Are you in texas?
Gersho
@Gersho
Sep 11 2017 05:09
i don't know if it made the news in canada, but on st martin the jail got damaged and ~ 200+ escaped
i'm in Guadeloupe
you might have to zoom in after using google :p
Nadia
@nadiaschutz
Sep 11 2017 05:15
hi can someone explain me why does my app closes on pressing enter? thanks
Darren
@DarrenfJ
Sep 11 2017 05:15
jeebus
Darren
@DarrenfJ
Sep 11 2017 05:16
@nadiaschutz it's probably beyond my present mental capacity.. but i do like the look and feel of the chat box you built
it's probably beyond my present mental capacity to help troubleshoot i mean
Nadia
@nadiaschutz
Sep 11 2017 05:17
@DarrenfJ too saaaaaaaaaad...i need to submit it today
@DarrenfJ thanks
CamperBot
@camperbot
Sep 11 2017 05:18
nadiaschutz sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2016 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Sep 11 2017 05:19
@nadiaschutz what's it for? a uni course or something?
maybe try the main room.. there's usually way more people hanging out there lately
Nadia
@nadiaschutz
Sep 11 2017 05:20
@DarrenfJ nope...that's my internship...
Darren
@DarrenfJ
Sep 11 2017 05:20
ah cool
Nadia
@nadiaschutz
Sep 11 2017 05:20
which one the main room?
Darren
@DarrenfJ
Sep 11 2017 05:21
i was gonna suggest the js room as well but i went to see if it's active and i just noticed yer already in there...
Nadia
@nadiaschutz
Sep 11 2017 05:21
@DarrenfJ k will try there
Darren
@DarrenfJ
Sep 11 2017 05:21
coolCool
Gersho
@Gersho
Sep 11 2017 05:22
i never go to that room, it increase too much my procastination rate
Nadia
@nadiaschutz
Sep 11 2017 05:22
@Gersho haha
Darren
@DarrenfJ
Sep 11 2017 05:23
i know.. it's a bit of a discussion mostly room..
Manish Giri
@Manish-Giri
Sep 11 2017 05:23
@DarrenfJ :wave:
Darren
@DarrenfJ
Sep 11 2017 05:23
following the hteads too can be a full time gig
@Manish-Giri buddy!
Nadia
@nadiaschutz
Sep 11 2017 05:23
@Gersho i come to gitter only when i really really need someones help
Darren
@DarrenfJ
Sep 11 2017 05:23
how's the streak.. i think we saved it ;)
Gersho
@Gersho
Sep 11 2017 05:23
@nadiaschutz you should keep it open and read from time to time, seeing others problem is a good source of knowledge
Manish Giri
@Manish-Giri
Sep 11 2017 05:23
hehe
yeah
@DarrenfJ ty
CamperBot
@camperbot
Sep 11 2017 05:23
manish-giri sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
Darren
@DarrenfJ
Sep 11 2017 05:23
@nadiaschutz manish might be able to help.. i am mentally spent...
CamperBot
@camperbot
Sep 11 2017 05:23
:star2: 2017 | @darrenfj |http://www.freecodecamp.com/darrenfj
Manish Giri
@Manish-Giri
Sep 11 2017 05:23
ffs
@DarrenfJ ty
CamperBot
@camperbot
Sep 11 2017 05:23
manish-giri sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
api offline
Darren
@DarrenfJ
Sep 11 2017 05:23
thanks @Manish-Giri
CamperBot
@camperbot
Sep 11 2017 05:23
darrenfj sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6525 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Sep 11 2017 05:24
:gun:
Darren
@DarrenfJ
Sep 11 2017 05:24
streak savers ;)
Manish Giri
@Manish-Giri
Sep 11 2017 05:24
lol
Nadia
@nadiaschutz
Sep 11 2017 05:24
@Manish-Giri manish can you look at my doodle -noodle ??
i posted it earlier
Manish Giri
@Manish-Giri
Sep 11 2017 05:25
@nadiaschutz yeah looking, one se
*sec
Gersho
@Gersho
Sep 11 2017 05:25
funny thing when i look at my own point chart, the empty part are where i worked the hardest for the most part xD (when building the projects)
Darren
@DarrenfJ
Sep 11 2017 05:25
doodle-noodle best name evah!
@nadiaschutz i just recommended the main room cause there's so many million more people in there than here now
Manish Giri
@Manish-Giri
Sep 11 2017 05:26
enter doesn't do anything for me
can you describe how to reproduce the problem? @nadiaschutz
@DarrenfJ I started the "learn python" track from treehouse
Gersho
@Gersho
Sep 11 2017 05:27
the fact that is resets IS the problem iirc
Nadia
@nadiaschutz
Sep 11 2017 05:28
@Manish-Giri it should console log
Gersho
@Gersho
Sep 11 2017 05:29
i started python at code academy, i'm not a big fan of space indentation but it's an easy learn with a JS background
Eric Miller
@ericmiller777
Sep 11 2017 05:30
python doesnt use {} right?
Darren
@DarrenfJ
Sep 11 2017 05:30
@Manish-Giri ah cool... i'll probably jump into python again in a few months
Gersho
@Gersho
Sep 11 2017 05:30
@ericmiller777 yep, it use indentation as blocks
Eric Miller
@ericmiller777
Sep 11 2017 05:30
that sounds horrible
but ppl seem to llove it
Manish Giri
@Manish-Giri
Sep 11 2017 05:30
@nadiaschutz still no go
no enter, no logs
Gersho
@Gersho
Sep 11 2017 05:30
that was my reaction too Eric
and with so many language loaded, Zeal is becoming a mess
Darren
@DarrenfJ
Sep 11 2017 05:32
I don't remember it very well (was a few years ago) but I remember it seeming easy... this was when i still found js clunky
but then a) I don't use it sand b) i don't remember it at all
Manish Giri
@Manish-Giri
Sep 11 2017 05:33
@DarrenfJ it's nowhere near as elegant as ruby
but ruby has almost no use outside of rails, and rails is on the decline
remember that article about devbootcamp shutting down their rails curriculum
Nadia
@nadiaschutz
Sep 11 2017 05:37
@Manish-Giri never mind...found the error
Manish Giri
@Manish-Giri
Sep 11 2017 05:37
@nadiaschutz :+1:
Nadia
@nadiaschutz
Sep 11 2017 05:37
@Manish-Giri how do you put tumb up?
Manish Giri
@Manish-Giri
Sep 11 2017 05:38
@nadiaschutz if you type :
it pops up a list of emojis
Nadia
@nadiaschutz
Sep 11 2017 05:38
oh
Manish Giri
@Manish-Giri
Sep 11 2017 05:38
you can select from the list
Nadia
@nadiaschutz
Sep 11 2017 05:38
cool
@Manish-Giri :clap:
Manish Giri
@Manish-Giri
Sep 11 2017 05:38
:sparkles:
Nadia
@nadiaschutz
Sep 11 2017 05:38
@Manish-Giri :fire:
Manish Giri
@Manish-Giri
Sep 11 2017 05:39
:feelsgood:
Gersho
@Gersho
Sep 11 2017 05:39

By the way, i have a personal project (that i aim to be my "cool project" that makes me employable) but i don't know what are the techs i need exactly, if you have some opinion on the matter, here are the specs(in code, the parts i don't know how to do):
-customer side, browse youtube via a youtube api page and pick a video

send that data to a server? i need that data on the "admin" side

-admin would have a page (in react ?) where requests would come to him, make a playlist

have a 3rd page  get the playlist info from admin

3rd page display playlist (react probably)
thanks in advance :D

so i guess i'm supposed to use whatever the equivalent of lamp is today
Darren
@DarrenfJ
Sep 11 2017 05:42
@Manish-Giri yah true... i'll miss ruby having only just gotten into it.. but i liked python well enough back then too
@nadiaschutz cool on figuring it out yerself... virtual high five
@Gersho not enough brain power to help you out on it either tbh :/
Nadia
@nadiaschutz
Sep 11 2017 05:44
@DarrenfJ :smile:
@DarrenfJ i broke my brain till i found the error lol
Darren
@DarrenfJ
Sep 11 2017 05:46
ha!
i should just go play video games or something...
Gersho
@Gersho
Sep 11 2017 05:47
of course, as study for your roguelike challenge
Darren
@DarrenfJ
Sep 11 2017 05:47
study
yes yes, of course.. study ;)
Nadia
@nadiaschutz
Sep 11 2017 05:47
go study...don't play
Manish Giri
@Manish-Giri
Sep 11 2017 05:47
how's codewars coming? @DarrenfJ
Darren
@DarrenfJ
Sep 11 2017 05:48
many dragons were killed in the making of this movie video game
@Manish-Giri ah.. ok. i'm just doing easy ones for now to see how quickly i can come up with code on the fundamentals without thinking it through too much...
Manish Giri
@Manish-Giri
Sep 11 2017 05:50
yep
nice
@DarrenfJ
Darren
@DarrenfJ
Sep 11 2017 05:51
all part of the try to code a little bit each day without breaking my brains too much
Manish Giri
@Manish-Giri
Sep 11 2017 05:51
yeah
i try to do 2-3 katas each day
Gersho
@Gersho
Sep 11 2017 05:51
i'm trying to step up my game but the brain hurting is an issue
Darren
@DarrenfJ
Sep 11 2017 05:52
for me it's just i do QA so all day i am trying to figure out how to break stuff and describe how to repeat the steps to break it.. and trying to wrestle a company that wants to push stuff through sometimes without testing it.. so actually end day i'm often mindspent so easy coding is the way for me to go now
@DarrenfJ that sounds very hectic
kudos for coding along even with all of that
Darren
@DarrenfJ
Sep 11 2017 05:56
yah.. i'm not working more than 8 or 8 and ahalf hours a day
but i tech comedy shows Sunday and monday nights...
Manish Giri
@Manish-Giri
Sep 11 2017 05:56
just solved that kata
function anagrams(word, words) {
  return words.filter(e => e.length === word.length && check(word, e) && check(e, word));
}
const check = (foo, bar) => foo.split('').every(l => bar.includes(l));
Darren
@DarrenfJ
Sep 11 2017 05:56
so if you see me online tomorrow at 2 am i would have worked, then went off and worked and got home at midnight
Manish Giri
@Manish-Giri
Sep 11 2017 05:56
wow
that's :fire:
Darren
@DarrenfJ
Sep 11 2017 05:57
it's fun to tech but it's still work
just solved that kata
that was fast :D
Manish Giri
@Manish-Giri
Sep 11 2017 05:59
lol
Darren
@DarrenfJ
Sep 11 2017 06:01
we should start a clan in there
apparently we earn honour or something.. it's the wutang clan of coding
Manish Giri
@Manish-Giri
Sep 11 2017 06:02
oh we can start clans?
nice
let's do it
Darren
@DarrenfJ
Sep 11 2017 06:06
i'm not sure how yet but i'll go explore
clan seems to be by company school or organization
Darren
@DarrenfJ
Sep 11 2017 06:12
can always throw it in ScryNet ;)
Manish Giri
@Manish-Giri
Sep 11 2017 06:13
yup
:clap:
Darren
@DarrenfJ
Sep 11 2017 06:17
how do we become allies?
Manish Giri
@Manish-Giri
Sep 11 2017 06:17
uh
lemme see
what's your user id there?
or user name
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 06:27
Hello, your feedback is highly appreciated https://codepen.io/ravikishorethella/full/jLggNP/
@DarrenfJ hey buddy
how are you?
Manish Giri
@Manish-Giri
Sep 11 2017 06:27
@DarrenfJ just followed you
i think we're now allies
Darren
@DarrenfJ
Sep 11 2017 06:28
@ravikishorethella hey man :D
@Manish-Giri what's yer id in there?
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 06:28
It's been so longggg @DarrenfJ
@ravikishorethella :wave:
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 06:29
@Manish-Giri :wave:
how is it going?
Manish Giri
@Manish-Giri
Sep 11 2017 06:30
@DarrenfJ if 2 people follow each other, then they become allies
@ravikishorethella same old, boring life
you?
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 06:30
started doing the fcc challenges after 3 months :smile:
Left with 4 more front-end projects and some algorithm challenges
Darren
@DarrenfJ
Sep 11 2017 06:31
@ravikishorethella schweet
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 06:31
:smile:
Darren
@DarrenfJ
Sep 11 2017 06:32
4 kyu buddy!
Manish Giri
@Manish-Giri
Sep 11 2017 06:32
:feelsgood:
Darren
@DarrenfJ
Sep 11 2017 06:38
added Scrynet as a clan.. on your profile it's it's just a field
ok.. gonna sneak off to bed finally
Manish Giri
@Manish-Giri
Sep 11 2017 06:40
how do you add clan?
@EneCatalin is here
howdy
long time
Jake
@JakeDVirus
Sep 11 2017 07:37
how to convert this curl command information to jquery ajax call
curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
1LifeLess
@1LifeLess
Sep 11 2017 08:08
Hi,( on JS) i have received a link from an api, and i want to perform a click/download on that link without creating it as an HTML elements, is it possible?
Michael Bomholt
@bomholtm
Sep 11 2017 08:16
hey everyone :) where can i ask beta related questions?
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:18
@1LifeLess ofcourse
but what you wanna do with the info that comes from the api request?
1LifeLess
@1LifeLess
Sep 11 2017 08:19
@tiagocorreiaalmeida it is just download link, i want the browser to download it as soon as the api response returnns
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:20
so you wanna make a request and return the data like to a .json file ?
think this is what you looking for
1LifeLess
@1LifeLess
Sep 11 2017 08:21
@tiagocorreiaalmeida i already did, on property of the returned data is a link, i want to simulate a click on it so it will start download
one property*
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:23

"This approach has the following advantages over other proposed ones:

No HTML element needs to be clicked
Result will be named as you want it
no jQuery needed"

1LifeLess
@1LifeLess
Sep 11 2017 08:23
@tiagocorreiaalmeida this is not what i'm looking for, forget the json story, let's assume i receive a link from http request and i receive this link as a text, now i want my browser to to click it
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:23
check the second solution
you want
to open a link
you received?
1LifeLess
@1LifeLess
Sep 11 2017 08:24
yes
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:24
window.open('link is here', 'name');
change the name
to
_blank
for new page
tab*
1LifeLess
@1LifeLess
Sep 11 2017 08:25
@tiagocorreiaalmeida like that? window.open(link, '');
@tiagocorreiaalmeida interesting...but it doesn't seems to work as it's direct download link
@tiagocorreiaalmeida or is it because JS BIN permission limitation
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:32
can you send me your code?
and sorry for the delay
1LifeLess
@1LifeLess
Sep 11 2017 08:43
Dauli Pamale Alexis Ange
@Dauli
Sep 11 2017 08:54
Hello everyone. i need help on counting cards https://www.freecodecamp.org/challenges/counting-cards
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:54
@1LifeLess somehow not working maybe ask help in others chats mate
1LifeLess
@1LifeLess
Sep 11 2017 08:55
@tiagocorreiaalmeida it's because the browser is blocking auto events
@tiagocorreiaalmeida to fight all popups, so i guess i'll have to simulate an event
@tiagocorreiaalmeida but thank you
CamperBot
@camperbot
Sep 11 2017 08:55
1lifeless sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 08:59
@1LifeLess if you try that locally does it work?
@Dauli in what can we help you'
Dauli Pamale Alexis Ange
@Dauli
Sep 11 2017 09:01
since 3 days i can't pass the challenge on counting cards.

var count = 0;

function cc(card) {
// Only change code below this line
if (card == 2 || card == 3 || card == 4 || card == 5 || card == 6) {
count+=1;
} else if (card == 10 || card == 'J' || card == 'Q' || card == 'K' || card == 'A') {
count-=1;
}
if (card > 0) {
return count + " Bet";
} else {
return count + " Hold";
}
// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');

thats my code and the instruction is: You will write a card counting function. It will receive a card parameter and increment or decrement the global count variable according to the card's value (see table). The function will then return a string with the current count and the string "Bet" if the count is positive, or "Hold" if the count is zero or negative. The current count and the player's decision ("Bet" or "Hold") should be separated by a single space.
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 09:04
@Dauli I think what you mean in the last if is
that if (count > 0)
card is the argument you receive it can even be a string
and since the value your incremented was the count so
Dauli Pamale Alexis Ange
@Dauli
Sep 11 2017 09:10
@tiagocorreiaalmeida really really thank you very much. you made my day.
CamperBot
@camperbot
Sep 11 2017 09:10
dauli sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 345 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
LydaTech
@lydatech
Sep 11 2017 09:18
anyone using lite-server with node?
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 09:28
@Dauli np if you can't understand why things dont work try to use console.logs to check some variables value, just an example, so you could see whre the code is goin wrong
Albert Cardona II
@daddycardona
Sep 11 2017 10:06
@DarrenfJ Me too :) I was binge watching netflix I also was to exhausted to code this weekend I got done 2 challenges and then bam I had my gf over and was out almost all day yesterday :)
Dauli Pamale Alexis Ange
@Dauli
Sep 11 2017 10:07
thanks man @tiagocorreiaalmeida
CamperBot
@camperbot
Sep 11 2017 10:07
dauli sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
api offline
Rajan
@ProgramNovice
Sep 11 2017 10:28
Hi guys
I have a doubt regarding one of the challenges
Albert Cardona II
@daddycardona
Sep 11 2017 10:34
I hae doubt every new challenge lol
so what do you need help with @ProgramNovice
Rajan
@ProgramNovice
Sep 11 2017 10:47
Thanks Albert :)
Albert Cardona II
@daddycardona
Sep 11 2017 10:47
what challenge are you on?
Rajan
@ProgramNovice
Sep 11 2017 10:48
<style>
  .injected-text {
    margin-bottom: -25px;
    text-align: center;
  }

  .box {
    border-style: solid;
    border-color: black;
    border-width: 5px;
    text-align: center;
  }

  .yellow-box {
    background-color: yellow;
    padding: 10px;
  }

  .red-box {
    background-color: red;
    padding: 20px;
  }

  .green-box {
    background-color: green;
    padding: 20px;
  }
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
  <h5 class="box red-box">padding</h5>
  <h5 class="box green-box">padding</h5>
</div>
Albert Cardona II
@daddycardona
Sep 11 2017 10:48
Sorted Union is the one I am on and it says to make the arr unique however it does not set you up for success because it only passes one array instead of 3
Rajan
@ProgramNovice
Sep 11 2017 10:48
I'm on Adjusting the Padding of an Element challenge
Albert Cardona II
@daddycardona
Sep 11 2017 10:49
Okay for which one?
or what does it say to adjust I might not be on this one or don't remember :)
Rajan
@ProgramNovice
Sep 11 2017 10:50
what does the code margin-bottom: -25px; signify? because it has a negative value
Albert Cardona II
@daddycardona
Sep 11 2017 10:50
oh let me see real quick give me 5 minutes I have to get my clothes out the dryer ;)
Rajan
@ProgramNovice
Sep 11 2017 10:50
ok sure take your time
thanks :)
Albert Cardona II
@daddycardona
Sep 11 2017 10:51
it means that your page looks like it is sliding up from the bottom
Rajan
@ProgramNovice
Sep 11 2017 10:53
oh ok
and the code padding: 10px;. Does the padding refer to the height of the box?
Albert Cardona II
@daddycardona
Sep 11 2017 10:55
will give you an example
Rajan
@ProgramNovice
Sep 11 2017 10:55
ok sure
Albert Cardona II
@daddycardona
Sep 11 2017 10:56
No it refers to the padding lol Iet me get you an example on codepen
that is my profile I have a negative margin makes it look like the page is moving up
Rajan
@ProgramNovice
Sep 11 2017 10:58
oh ok now i understand better :)
@daddycardona Thanks Albert :)
CamperBot
@camperbot
Sep 11 2017 10:59
programnovice sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Sep 11 2017 11:00
if you use the padding in a code pen you can see how it changes the section
that explains padding better than I can lol but I understand it @ProgramNovice
when you use padding: 10px; it makes it so that padding top left right and bottom have 10px distance from the border of a element
Rajan
@ProgramNovice
Sep 11 2017 11:04
oh ok thanks :) @daddycardona
CamperBot
@camperbot
Sep 11 2017 11:04
programnovice sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
api offline
LydaTech
@lydatech
Sep 11 2017 11:14
@Manish-Giri thx
@Manish-Giri thanks
CamperBot
@camperbot
Sep 11 2017 11:14
lydatech sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6526 | @manish-giri |http://www.freecodecamp.com/manish-giri
Yash Bhardwaj
@imyashbhardwaj
Sep 11 2017 11:40
can anyone tell me why this simple jsonp request is not working
???
Albert Cardona II
@daddycardona
Sep 11 2017 11:50
it says you have an unexpected token in that
blob
@imyashbhardwaj
heroiczero
@heroiczero
Sep 11 2017 11:53
@imyashbhardwaj you url does not have a callback when it is a jsonp
Albert Cardona II
@daddycardona
Sep 11 2017 11:53
so it is in your url you missing or added something that don't belong there
Yash Bhardwaj
@imyashbhardwaj
Sep 11 2017 11:54
@heroiczero @daddycardona but when i put it in address bar it runs fine
any idea??
@heroiczero for callback i gave a function in success
Yash Bhardwaj
@imyashbhardwaj
Sep 11 2017 12:03
thank you so much @heroiczero :)
CamperBot
@camperbot
Sep 11 2017 12:03
imyashbhardwaj sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1716 | @heroiczero |http://www.freecodecamp.com/heroiczero
horo
@wolfHoro
Sep 11 2017 13:23
Hey guys. I would like to ask some questions. I'm doing the "Show the Local Weather Incomplete" project. I found a free weather data API, but the provider's technical documentation requires that the string in the code that requested the API data must be encrypted with the hmac-sha1 method. I do not know how to load this plugin in codeopen
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 13:28
why dont you use some simple api?
https://darksky.net/dev @wolfHoro if you wanna give it a try
horo
@wolfHoro
Sep 11 2017 13:31
@tiagocorreiaalmeida Thank you very much. I did not find a simple API before. I'll try now
CamperBot
@camperbot
Sep 11 2017 13:31
wolfhoro sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Aniculaesei
@Aniculaesei
Sep 11 2017 13:46
@Aniculaesei
Hi guys!Can you tell me why I can't log in with email on BETA version?
Thank you
CamperBot
@camperbot
Sep 11 2017 13:46
sorry aniculaesei, you can't send brownie points to yourself! :sparkles: :sparkles:
Morchid Chellali
@Morched23MJ
Sep 11 2017 13:52
What's a simple way to display a description of a project (containing h1 h3 and p) with a side image?
just1witness
@just1witness
Sep 11 2017 14:00
@Aniculaesei beta log in is disabled now
Launch date is Jan 2018
Tentative
Aniculaesei
@Aniculaesei
Sep 11 2017 14:01
@just1witness so I can't use it anymore?
just1witness
@just1witness
Sep 11 2017 14:02
It would seem so. I haven't heard that they will re-enable log in before launch. Also, before launch nothing you've done is carried I over.
Aniculaesei
@Aniculaesei
Sep 11 2017 14:03
I have worked there,and I think the course is more complete on beta wersion,compared with main version :)
just1witness
@just1witness
Sep 11 2017 14:04
I look forward to it release.
It's*
At this point, I welcome more complicated. I miss doing algorithms
Aniculaesei
@Aniculaesei
Sep 11 2017 14:06
you finished the algorithms on the main version?
they are so hard
i /ve tried on the main version.....but hmmmmm
just1witness
@just1witness
Sep 11 2017 14:07
Yeah, most at least twice. It is hard for sure, but worth plugging through. If you need help with any you can pm me.
Razvan
@razvanlikespizza
Sep 11 2017 14:40
This is the first time I get stuck with Algorithms...Can somebody explain in words this challenge? I dont have any idea how to get the next elements..
https://www.freecodecamp.org/challenges/chunky-monkey
please and thank you
plss
teevik
@teevik
Sep 11 2017 14:54
@razvanlikespizza You can loop through the array but add size to the index instead of 1, and use some sort of slice and push system
Razvan
@razvanlikespizza
Sep 11 2017 14:58
@teevik Can you explain this code please?
function chunkArrayInGroups(arr, size) {
  var newArr = [];
  for (var x = 0; x < arr.length; x+= size) {
    newArr.push(arr.slice(x, x+size));
  }
  return newArr;
}

chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6], 3);
I understand it, but no totally..
[[0, 1, 2], [3, 4, 5], [6]]
Why is 6 and not [6] [ ] [ ] ?
teevik
@teevik
Sep 11 2017 15:03
From mozilla: If end is greater than the length of the sequence, slice extracts through the end of the sequence (arr.length).
Razvan
@razvanlikespizza
Sep 11 2017 15:03
Daaaaaaaaaaaaaaaaaamn
@teevik thanksssssss u lil fish <3 :chocolate_bar: :love_letter: :heart:
@teevik thank you
CamperBot
@camperbot
Sep 11 2017 15:04
razvanlikespizza sends brownie points to @teevik :sparkles: :thumbsup: :sparkles:
:cookie: 235 | @teevik |http://www.freecodecamp.com/teevik
teevik
@teevik
Sep 11 2017 15:04
lol
Razvan
@razvanlikespizza
Sep 11 2017 15:04
:)
+1 follower on GitHub
teevik
@teevik
Sep 11 2017 15:06
thanks
NAVANEETH
@NAVANEETH1
Sep 11 2017 17:41
is vs code code editor good for beginners
Ravi Kishore Thella
@ravikishorethella
Sep 11 2017 17:46
@NAVANEETH1 yes
NAVANEETH
@NAVANEETH1
Sep 11 2017 17:48
can some good things of vs code
wnghero
@wnghero
Sep 11 2017 18:14
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
 result = lookup[val];
  var lookup = {
    alpha: "Adams",
    bravo: "Boston",
    charlie: "Chicago",
    delta: "Denver",
    echo: "Easy",
    foxtrot: "Frank"
  };

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

// Change this value to test
phoneticLookup("charlie");
why isnt my lookup table working?
just1witness
@just1witness
Sep 11 2017 18:21
@wnghero What's the objective for this test, I can't remember
wnghero
@wnghero
Sep 11 2017 18:24
@just1witness i got it, it was a dta flow issue
just1witness
@just1witness
Sep 11 2017 18:32
k
Morchid Chellali
@Morched23MJ
Sep 11 2017 18:39
Minutes ago, I had a <title> in my html <head>, and now it disappeared, is it normal?
Darren
@DarrenfJ
Sep 11 2017 19:06
hey fCC
how goes it.. you know, the code
Yash Bhardwaj
@imyashbhardwaj
Sep 11 2017 19:48
in cloud9 terminal i wrote view package.json
now a black window is appearing
does anyone know how to go back t previous window
???
12annumishra17
@12annumishra17
Sep 11 2017 19:56
hey i need help
anyone can?
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 19:56
what code editor you feel is the best for html/css/js/jquery? brackets,atom or visual studio code?
Stephen James
@sjames1958gm
Sep 11 2017 20:06
@imyashbhardwaj Try :q!
@12annumishra17 What do you need help with
my weather app stopped working
and now i'm getting access denied errors
the apis work
can anyone help me?
piteto
@piteto
Sep 11 2017 20:12
@stashe86 You're getting some mixed content issues - you'll need to make sure your APIs all start with https
It seems ip-api.com doesn't work over https though...
stashe86
@stashe86
Sep 11 2017 20:12
it used to work
piteto
@piteto
Sep 11 2017 20:12
on your local computer or on codepen?
stashe86
@stashe86
Sep 11 2017 20:12
on codepen
Doesn't work at all ^^
stashe86
@stashe86
Sep 11 2017 20:13
i know i already tried that.
piteto
@piteto
Sep 11 2017 20:13
Maybe it used to work back in April when you created the codepen, but not anymore
stashe86
@stashe86
Sep 11 2017 20:14
i don't want to redo a whole project just because codepen is fucking retarded
piteto
@piteto
Sep 11 2017 20:14
it isn't codepen....may want to look at your code
stashe86
@stashe86
Sep 11 2017 20:14
the code worked.
piteto
@piteto
Sep 11 2017 20:14
past tense
stashe86
@stashe86
Sep 11 2017 20:14
and now it doesn't.
piteto
@piteto
Sep 11 2017 20:15
Change your code to:
  //Get Coordinates and call getWeather
  $.getJSON("https://ipinfo.io/json",function(coords) {
    lat = coords.loc.split(',')[0];
    lon = coords.loc.split(',')[1];
    weatherURL = 'https://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + lon + '&units=imperial&appid=' + appid;
    getWeather(weatherURL);
  });
  //End getting coordinates

  //Start getWeather Function
  function getWeather(weatherURL){
Tiago Correia
@tiagocorreiaalmeida
Sep 11 2017 20:15
"Result: parsererror SyntaxError: Unexpected token < in JSON at position 0 200 parsererror"
12annumishra17
@12annumishra17
Sep 11 2017 20:16
@sjames1958gm bro i need help
Stephen James
@sjames1958gm
Sep 11 2017 20:16
What do you need?
12annumishra17
@12annumishra17
Sep 11 2017 20:16
@sjames1958gm i needed help in job sequencing problem with deadline using greedy method
c code for that
if u can help
do so
@sjames1958gm
Stephen James
@sjames1958gm
Sep 11 2017 20:18
@stashe86 openweathermap doesn't support https unless you pay
stashe86
@stashe86
Sep 11 2017 20:18
it's working
piteto
@piteto
Sep 11 2017 20:18
It works fine over https @sjames1958gm, but maybe they paid
stashe86
@stashe86
Sep 11 2017 20:18
i didn't pay and it's still working
maybe it has limited functionality?
12annumishra17
@12annumishra17
Sep 11 2017 20:19
@sjames1958gm bro u dere?
LydaTech
@lydatech
Sep 11 2017 20:19
@12annumishra17 read your PM
stashe86
@stashe86
Sep 11 2017 20:19
thanks @piteto
CamperBot
@camperbot
Sep 11 2017 20:19
stashe86 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 91 | @piteto |http://www.freecodecamp.com/piteto
No restrictions, they just made it free a month ago it seems
Hongyu Zhang
@vicgarvey
Sep 11 2017 20:44
Hey community, I have a question about the javascript challenge "Escape Sequences in Strings". I wrote my code as
myStr = 'FirstLine\r\SecondLine\\rThirdLine';
but it doesn't work... :( Where went wrong?
myStr = 'FirstLine\r\SecondLine\\rThirdLine';
It seems the chat room truncates multiple backslash
Hongyu Zhang
@vicgarvey
Sep 11 2017 20:50
Ohhh I read the forum and the problem is solved
just change the first \r to \n... don't know why
Mike Batista
@mbmontana
Sep 11 2017 22:06
Need a hint here. I think I'm really close. The Mutations challenge. I have to return true if all the letters in the second string are in the first string, false if not. I got all the checkmarks except one, where I need false on "hello" and "hey" For some reason the "y" in "hey" isn't being considered. Thoughts?
function mutation(arr) {
 var firstElement;
 var secondElement;
 var splitStr;
  firstElement = arr[0].toLowerCase();
  secondElement = arr[1].toLowerCase();
  splitStr = secondElement.split('');
 for (i = 0; i < splitStr.length; i++) {
 if (firstElement.indexOf(splitStr[i], 0) >= 0)
 {return true;}
   else {return false;}
 }


}

mutation(["hello", "hey"]);
Kyle Holm
@thekholm80
Sep 11 2017 22:11
@mbmontana your code never checks beyond the first letter, since you're returning inside your loop
Mike Batista
@mbmontana
Sep 11 2017 22:14
@thekholm80 Should I not follow the for loop with the if statement?
Kyle Holm
@thekholm80
Sep 11 2017 22:14
you should not return anything until you've checked everything
Manish Giri
@Manish-Giri
Sep 11 2017 22:37
@thekholm80 :wave:
Darren
@DarrenfJ
Sep 11 2017 22:37
hey guys! :D @Manish-Giri @thekholm80
Manish Giri
@Manish-Giri
Sep 11 2017 22:38
@DarrenfJ :wave:
Darren
@DarrenfJ
Sep 11 2017 22:39
i'm just about to split work (QAing) to work (teching comedy shows)...
now you got me trying to do 2 codewars a day.. before i was just whenever
Manish Giri
@Manish-Giri
Sep 11 2017 22:41
yeaaahhhh
:smiling_imp:
unlike some genioouuuss who copy-pasted his way to 1kyu, we are mere mortals and that too very dumb ones, so we got to toil
Darren
@DarrenfJ
Sep 11 2017 22:45
yah.. i'm still way overusing for loops nand if statements though.. gotta figure out/remember to use some of those tertiary conditional and functions like .map etc...
cut my code down by half
but refactoring shall come
later.
ok i'm off
codeOn!
Manish Giri
@Manish-Giri
Sep 11 2017 22:46
:wave:
Engjell Bislimi
@Engjell00
Sep 11 2017 22:52
anyone could explain me what is border-box
box-sizing
@Engjell00
Gersho
@Gersho
Sep 11 2017 22:59
@Engjell00 i believe this image should prove usefull https://www.w3schools.com/css/css_boxmodel.asp
Engjell Bislimi
@Engjell00
Sep 11 2017 23:00
i actually meant the code not the layout
like I see in some CSS h1{ box-sizing: border-box;}
Kyle Holm
@thekholm80
Sep 11 2017 23:14
@Manish-Giri @DarrenfJ hiya
abdellah
@abdellah-khaddou
Sep 11 2017 23:15
Hllo
Can anyone help me in Javascript
just1witness
@just1witness
Sep 11 2017 23:18
@abdellah-khaddou What's your question
@Manish-Giri Thank you for the link, it answered a question I didn't know I had
CamperBot
@camperbot
Sep 11 2017 23:18
just1witness sends brownie points to @abdellah-khaddou and @manish-giri :sparkles: :thumbsup: :sparkles:
:cookie: 180 | @abdellah-khaddou |http://www.freecodecamp.com/abdellah-khaddou
:star2: 6527 | @manish-giri |http://www.freecodecamp.com/manish-giri
Nick Cleary
@Hijerboa
Sep 11 2017 23:23
Can someone explain where the infinite loop is in this?
function steamrollArray(arr){
  for(i=0; i<arr.length; i++){
    while(Array.isArray(arr[i]) == true){
      for(j=0; j<arr[i].length; j++){
        arr[(i+j)] = arr[i][j];
      }
    }
  }
  console.log(arr);
  return arr;
}
The web page won't load when I try to load it off my local machine, suggesting an infinite loop, but FCC's infinite loop checker doesn't go off...
just1witness
@just1witness
Sep 11 2017 23:25
Holy crap loops
it's FOUR loops in a row...
Gersho
@Gersho
Sep 11 2017 23:26
the == true is not necessary, isArray returns true/false already
just1witness
@just1witness
Sep 11 2017 23:26
oh, 3 my bad, but still
You don't need to use a loop at all for this
Are you familiar with the reduce function?
@Hijerboa
Nick Cleary
@Hijerboa
Sep 11 2017 23:28
@just1witness nope
or maybe i am and just forgot it
just1witness
@just1witness
Sep 11 2017 23:31
So you want to check one index with a test, is array true right?
then you want to combine the contents into one array.
Look at the reduce function on MDN and think about how you could do it with that.
If you can't come up with a working solution, copy what you did come up with here, and tag me. I'll help you more.
@Hijerboa
Nick Cleary
@Hijerboa
Sep 11 2017 23:31
@just1witness ok thanks mate!
CamperBot
@camperbot
Sep 11 2017 23:31
hijerboa sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 340 | @just1witness |http://www.freecodecamp.com/just1witness
just1witness
@just1witness
Sep 11 2017 23:31
no prob
Nick Cleary
@Hijerboa
Sep 11 2017 23:48

@just1witness so far I've got this:

function steamrollArray(arr){
  var finalArray = arr.reduce(function(a,b,c,d){
    return [a,b,c,d];
  });
  console.log(finalArray);
  return finalArray;
}

But that just returns the array in an exponentially more complicated format

just1witness
@just1witness
Sep 11 2017 23:49
you only need a, and b
Nick Cleary
@Hijerboa
Sep 11 2017 23:49
hmmm
just1witness
@just1witness
Sep 11 2017 23:50
and you still need to do the array is array chech, just use an if statement in the function
@Hijerboa
Nick Cleary
@Hijerboa
Sep 11 2017 23:50
ohhh i thought that this was supposed to somehow reduce it automatically
that makes more sense
just1witness
@just1witness
Sep 11 2017 23:50
so if (Array.isArray(b))
Nick Cleary
@Hijerboa
Sep 11 2017 23:52

...

function steamrollArray(arr){
  var finalArray = arr.reduce(function(a,b){
    if(Array.isArray(a)){
      a = a[0];
    }
    if(Array.isArray(b)){
      b = b[0];
    }
    return [a,b];
  });
  console.log(finalArray);
  return finalArray;
}

that accomplished nothing... D:

@just1witness
crap
im an idiot
just1witness
@just1witness
Sep 11 2017 23:53
lol, no you're not
I banged my head against the wall daily going through these
Nick Cleary
@Hijerboa
Sep 11 2017 23:53
Let me modify that: that did accomplish something
then do you need some sort of recursion or something?
korzo
@korzo
Sep 11 2017 23:54
@Hijerboa sure. You can't do it without recursion
just1witness
@just1witness
Sep 11 2017 23:54
so the if statement (Array.isArray(b)) is true, you want to do something. Do you know what that is?
Nick Cleary
@Hijerboa
Sep 11 2017 23:54
because depending on the levels of array-ness it needs to go through multiple times
korzo
@korzo
Sep 11 2017 23:54
@Hijerboa Exactly
Nick Cleary
@Hijerboa
Sep 11 2017 23:54
@just1witness ... reduce it?
just1witness
@just1witness
Sep 11 2017 23:54
concat
Nick Cleary
@Hijerboa
Sep 11 2017 23:54
@korzo lol i wasn't sure if this would work properly with recursion
Gersho
@Gersho
Sep 11 2017 23:54

I banged my head against the wall daily going through these

i think steamroll is the hardest challenge of all

Nick Cleary
@Hijerboa
Sep 11 2017 23:55
@just1witness ohhh then merge them
just1witness
@just1witness
Sep 11 2017 23:55
then outside the function after it no longer returns true, you'll want to concat one last time
Nick Cleary
@Hijerboa
Sep 11 2017 23:55
ok
just1witness
@just1witness
Sep 11 2017 23:55
@Hijerboa
@Gersho It was very hard, yes
Nick Cleary
@Hijerboa
Sep 11 2017 23:55
@Gersho nah mate hello world is way harder
korzo
@korzo
Sep 11 2017 23:56
@Gersho It is as long as you are not familiar with recursion.
I think it's first real experience with recursion on FCC
just1witness
@just1witness
Sep 11 2017 23:56
Just wait until you get to exact change
that took me 4 days
Nick Cleary
@Hijerboa
Sep 11 2017 23:56
plz no now I'm scared
Gersho
@Gersho
Sep 11 2017 23:56
@korzo i hated them so much for not telling me about it in the lessons :P but it can actually be done without recursion
just1witness
@just1witness
Sep 11 2017 23:56
lol
Nick Cleary
@Hijerboa
Sep 11 2017 23:57
@Gersho I'm just glad I took AP CS last year and learned recursion lol
Gersho
@Gersho
Sep 11 2017 23:57
exact change isn't the same kind of hard, it's more "it's ok but there's 534354354 details to take into account"
korzo
@korzo
Sep 11 2017 23:57
@Gersho yes, using splice. but it's little tricky,
just1witness
@just1witness
Sep 11 2017 23:58
@Gersho I still struggle with the concept of recursion to be honest. I know what it is, but maybe not how and when to use it as well as I should
Nick Cleary
@Hijerboa
Sep 11 2017 23:58

ok I tried this:

function steamrollArray(arr){
  var finalArray = arr.reduce(function(a,b){
    if(Array.isArray(a)){
      a = a[0];
    }
    if(Array.isArray(b)){
      a = a.concat(b);
    }
    return [a,b];
  });
  console.log(finalArray);
  return finalArray;
}

but i get an error saying concat is not a function

wut
just1witness
@just1witness
Sep 11 2017 23:58
You only need one if statement, for starters
change the a in your first one to a b and get rid of the second one
Kyle Holm
@thekholm80
Sep 11 2017 23:59
you have to initialize your accumulator as an array
Gersho
@Gersho
Sep 11 2017 23:59
,[]) at the end ?
Kyle Holm
@thekholm80
Sep 11 2017 23:59
reduce(function(){}, [])