These are chat archives for FreeCodeCamp/Help

28th
Sep 2017
piteto
@piteto
Sep 28 2017 00:00
that time when you miss all the fun :)
Eric Miller
@ericmiller777
Sep 28 2017 00:06
hey guys
piteto
@piteto
Sep 28 2017 00:09
hello
Brianna
@brisourceful
Sep 28 2017 00:09
damn
good one @piteto
piteto
@piteto
Sep 28 2017 00:11
had to remember how I did that steamroller algorithm
Manish Giri
@Manish-Giri
Sep 28 2017 00:33
what's new in this though
rest + concat + spread + sort
not sure if that's a question or a statement @Manish-Giri
Alexander Køpke
@alexanderkopke
Sep 28 2017 00:52
@piteto he described your code with keywords
Eric Miller
@ericmiller777
Sep 28 2017 01:43
hello
Kyle Holm
@thekholm80
Sep 28 2017 01:44
hey
Eric Miller
@ericmiller777
Sep 28 2017 01:47
@piteto thats weird lol
Eric Miller
@ericmiller777
Sep 28 2017 02:08
hey guys
why does
$("#blue").css("background-color", "blue");
this work
but this doesnt $("#blue").css("background-color", "rgba(0, 0, 255, 0.5f)");
piteto
@piteto
Sep 28 2017 02:09
$("#blue").css("background-color", "rgba(0, 0, 255, 0.5)");
no f after 0.5
Eric Miller
@ericmiller777
Sep 28 2017 02:11
oh crap it works
@piteto thanks
CamperBot
@camperbot
Sep 28 2017 02:11
ericmiller777 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 158 | @piteto |http://www.freecodecamp.com/piteto
Eric Miller
@ericmiller777
Sep 28 2017 02:11
why does it not accept the float
am i confuseing C# and javascript again?
Ken Haduch
@khaduch
Sep 28 2017 02:24
@ericmiller777 - you have to provide a valid CSS value for the rgba color setting, so you can only provide a floating point string value that is legal for rgba...
Eric Miller
@ericmiller777
Sep 28 2017 02:25
@khaduch thanks
CamperBot
@camperbot
Sep 28 2017 02:25
ericmiller777 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3318 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Sep 28 2017 02:27
@ericmiller777 - you're welcome.
Eric Miller
@ericmiller777
Sep 28 2017 02:44
so i have a
var sound1 = new Audio("simonSound1.mp3");
but sound1.play();
is not working
Kyle Holm
@thekholm80
Sep 28 2017 02:54
where is simonSound1.mp3?
@ericmiller777
Eric Miller
@ericmiller777
Sep 28 2017 02:56
in root
Kyle Holm
@thekholm80
Sep 28 2017 02:56
so you're doing this locally?
Gersho
@Gersho
Sep 28 2017 02:56
shouldn't it be ./ if it's as the same place than your index file ?
Kyle Holm
@thekholm80
Sep 28 2017 02:57
yep
if it's local
Eric Miller
@ericmiller777
Sep 28 2017 02:57
lemme try
Kyle Holm
@thekholm80
Sep 28 2017 02:57
well, it's good to always use ./ for same directory as current file
Eric Miller
@ericmiller777
Sep 28 2017 02:58
ar sound1 = new Audio("/simonSound1.mp3");
that right?
Kyle Holm
@thekholm80
Sep 28 2017 02:58
missing the .
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 02:58
@thekholm80 :wave:
Kyle Holm
@thekholm80
Sep 28 2017 02:58
@ravikishorethella :wave: hey buddy
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 02:59
@thekholm80 how are you?
Kyle Holm
@thekholm80
Sep 28 2017 02:59
I'm good, how's life in Indy?
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 02:59
pretty interesting :smile:
Kyle Holm
@thekholm80
Sep 28 2017 02:59
good deal
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 02:59
switched my majors from computer science to Data Analytics :smile:
Eric Miller
@ericmiller777
Sep 28 2017 03:00
really weird i see the speaker come in tab and everything
Kyle Holm
@thekholm80
Sep 28 2017 03:00
on purpose?
Eric Miller
@ericmiller777
Sep 28 2017 03:00
but no sound
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:00
yes
Kyle Holm
@thekholm80
Sep 28 2017 03:00
lol
just messing with you
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:00
and doing this fcc in my free time
Kyle Holm
@thekholm80
Sep 28 2017 03:00
so you're going to work in big data ... they say it's the new Oil Industry
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:01
:smile: hope so
Eric Miller
@ericmiller777
Sep 28 2017 03:01
lol ive heard people say this on linkedin too
@Gersho i had to make adjustments but thats for the help with getting the buttons to light up, i never would have thought of nesting the functions
@Gersho thanks
CamperBot
@camperbot
Sep 28 2017 03:02
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 479 | @gersho |http://www.freecodecamp.com/gersho
Kyle Holm
@thekholm80
Sep 28 2017 03:02
@ravikishorethella well I think that's cool. I hope it is always interesting for you and you make tons of $$$
Gersho
@Gersho
Sep 28 2017 03:02
well nowdays people actually buy stuff that spy on them, so yeah big data is important xD
Eric Miller
@ericmiller777
Sep 28 2017 03:02
lol
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:03
@thekholm80 tons :worried: really?? It is hard finding a job
Kyle Holm
@thekholm80
Sep 28 2017 03:11
@ravikishorethella Is it? I haven't looked for a job in a while, and never in the tech field so I only know what I hear from others
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:12
@thekholm80 not for you. It is hard for international students :worried:
Kyle Holm
@thekholm80
Sep 28 2017 03:13
oh, right. I never thought of that
I've heard some stories about that H-1B visa, it doesn't sound like a lot of fun
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:14
Today we had a career fair and they openly said that they are not hiring any international students
Kyle Holm
@thekholm80
Sep 28 2017 03:15
I wonder if you'd have better luck on one of the coasts?
middle america is ... different
Ravi Kishore Thella
@ravikishorethella
Sep 28 2017 03:17
Yeah, should look at different places.
Gersho
@Gersho
Sep 28 2017 03:17
honestly watching from outside all of america is "different"
Eric Miller
@ericmiller777
Sep 28 2017 03:18
https://ericmiller777.github.io/Simon_Game_freeCodeCamp/ anyone see whats wrong with my audio?
Gersho
@Gersho
Sep 28 2017 03:19
i have sound when the computer plays
Kyle Holm
@thekholm80
Sep 28 2017 03:19
@ericmiller777 are your speakers turned on?
Gersho
@Gersho
Sep 28 2017 03:20
i can't play (no only sound, but my clic is not being recorded)
Eric Miller
@ericmiller777
Sep 28 2017 03:20
yes
do you hear sound?
Gersho
@Gersho
Sep 28 2017 03:20
yes
Eric Miller
@ericmiller777
Sep 28 2017 03:20
oh click start
should light up 1
Kyle Holm
@thekholm80
Sep 28 2017 03:20
I have sound
Eric Miller
@ericmiller777
Sep 28 2017 03:20
weird
Kyle Holm
@thekholm80
Sep 28 2017 03:20
it went boop
Gersho
@Gersho
Sep 28 2017 03:21
load page,
press start
???
profit
Eric Miller
@ericmiller777
Sep 28 2017 03:21
i dont hear it :(
i can hear the files if i play them
and i can hear soundcloud
Gersho
@Gersho
Sep 28 2017 03:21
sound disabled in browser ?
Eric Miller
@ericmiller777
Sep 28 2017 03:21
soundcloud works?
Gersho
@Gersho
Sep 28 2017 03:22
i don't know, but it works, maybe browser specific ?
Eric Miller
@ericmiller777
Sep 28 2017 03:22
tryed firefox and chrome maybe i need to restart....
Gersho
@Gersho
Sep 28 2017 03:22
tried firefox and vivaldi, both ok
Kyle Holm
@thekholm80
Sep 28 2017 03:23
i'm using chrome and i hear it
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:23
Hello /help :wave:
Kyle Holm
@thekholm80
Sep 28 2017 03:24
@NahuelOvejero :wave:
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:24
Sup Kyle
Kyle Holm
@thekholm80
Sep 28 2017 03:24
not much, you?
Gersho
@Gersho
Sep 28 2017 03:25
:wave:
Eric Miller
@ericmiller777
Sep 28 2017 03:27
still nothing....
but i hear all other sounds
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:27
Not too much, just working a bit in my PL-SQL, got an exam tomorrow
Got an 80% at my PHP one, so pretty happy
Kyle Holm
@thekholm80
Sep 28 2017 03:28
good job!
i don't think i could get 80% on a PHP exam that only had the question "what is PHP?"
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:29
@thekholm80 thank you !
CamperBot
@camperbot
Sep 28 2017 03:29
nahuelovejero sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1490 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:30
Well, it was hard as fuck, I didn't sleep the night before studying
is not simple, because you had to do a whole system in PAPER
Kyle Holm
@thekholm80
Sep 28 2017 03:30
sounds hard
glad you're rocking it though
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:31
He asked for transactions, parametrized queries and pagination , all with simple PHP
yeah, I study hard... this is one of my last subject to get my degree :D
I'm in a "internship" also
Kyle Holm
@thekholm80
Sep 28 2017 03:32
then you're all done?
oh, an internship - that's new
Eric Miller
@ericmiller777
Sep 28 2017 03:33
works with my headset
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:33
yup, if I get this 3 months, I have 5 subject left, a project (30% done) and a thesis (80% done) , so I'm working hard to get all right and end all of this in decemebr
but if all else fails, I can still get finals at start of the next year
I think is called like that over there
We got a Project Leader who teach us new technologies, and we develop an app that was requested
Kyle Holm
@thekholm80
Sep 28 2017 03:34
very cool
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:35
We are learning ABP
Works with .NET and Angular, pretty surprising
Eric Miller
@ericmiller777
Sep 28 2017 03:35
okay
Gersho
@Gersho
Sep 28 2017 03:35

is not simple, because you had to do a whole system in PAPER

next challenge will be stone engraved

Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:35
We learn like bussisnes stuff, working the application inlayers, how to do propper commits/pull request, and dependency injection
Eric Miller
@ericmiller777
Sep 28 2017 03:35
my audio was set to surround sound on my speakers
that are not surround sound
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:37
@Gersho its kinda stupid tbh, but forces you to study everything , sometimes is shit to not have the autocompletion
specially when the professors sometimes says "I wrote what you have in your paper, if that doesn't compile, its wrong"
some people failed a test because silly errors, my brother was one of them
Gersho
@Gersho
Sep 28 2017 03:38
that's a special way of teaching
i don't autocomplete much, but i need the coloring or i'll miss a ; (){} somewhere
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:39
well, all the carrer has been like that
sometime was frustrating, all debug is in your mind lol
Gersho
@Gersho
Sep 28 2017 03:40
My markdown project refractoring so far:
-refactor on the left, break something on the right
-fix the right break the middle
-fix the middle break the left
and round and round and round :D
Eric Miller
@ericmiller777
Sep 28 2017 03:41
:(
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 03:53
lol, but that feel when nothing breaks is exciting
Gersho
@Gersho
Sep 28 2017 04:28
ok i managed to get it back and running, probably some bugs left but it is time to take a break
https://codepen.io/Gersho/pen/EwZQaE?editors=0110
heroiczero
@heroiczero
Sep 28 2017 04:30
@Gersho it looks good to me :+1: :star2:
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 04:30
works fine, need to be together
Long Nguyen
@longnt80
Sep 28 2017 04:32
@Gersho nice, I like the Demo button
Gersho
@Gersho
Sep 28 2017 04:38
oh cool,got some nice reviews while preparing a snack, it will have a taste of victory :P
thanks @heroiczero @NahuelOvejero @longnt80
CamperBot
@camperbot
Sep 28 2017 04:38
gersho sends brownie points to @heroiczero and @nahuelovejero and @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 810 | @nahuelovejero |http://www.freecodecamp.com/nahuelovejero
:cookie: 559 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 1785 | @heroiczero |http://www.freecodecamp.com/heroiczero
heroiczero
@heroiczero
Sep 28 2017 04:50
@thekholm80 @Manish-Giri @DarrenfJ For those long time Community members that helped but never get recognition here is a :cookie: for you TY
CamperBot
@camperbot
Sep 28 2017 04:50
heroiczero sends brownie points to @thekholm80 and @manish-giri and @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1491 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 6589 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 2059 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Sep 28 2017 05:28
thanks @heroiczero :D
CamperBot
@camperbot
Sep 28 2017 05:28
darrenfj sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1786 | @heroiczero |http://www.freecodecamp.com/heroiczero
Darren
@DarrenfJ
Sep 28 2017 05:28
and same with me... brownies to those that hang here until people show up to be helped...
thanks @Manish-Giri @thekholm80 @Gersho @NahuelOvejero @ericmiller777 @ravikishorethella
CamperBot
@camperbot
Sep 28 2017 05:30
darrenfj sends brownie points to @manish-giri and @thekholm80 and @gersho and @nahuelovejero and @ericmiller777 and @ravikishorethella :sparkles: :thumbsup: :sparkles:
:cookie: 480 | @gersho |http://www.freecodecamp.com/gersho
:star2: 1492 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 811 | @nahuelovejero |http://www.freecodecamp.com/nahuelovejero
:star2: 1039 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
:star2: 6590 | @manish-giri |http://www.freecodecamp.com/manish-giri
:cookie: 303 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
Manish Giri
@Manish-Giri
Sep 28 2017 05:34
@heroiczero @DarrenfJ @thekholm80 you guys are awesome, as always, ty
CamperBot
@camperbot
Sep 28 2017 05:34
manish-giri sends brownie points to @heroiczero and @darrenfj and @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1787 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2060 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 1493 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Albert Cardona II
@daddycardona
Sep 28 2017 06:39
hey guys :)
CraZy biRd
@Preeetrockz
Sep 28 2017 06:51
hellloooooooooo :D:D
Albert Cardona II
@daddycardona
Sep 28 2017 06:57
how are you doing :)
@Preeetrockz
Gersho
@Gersho
Sep 28 2017 07:06
:wave: @daddycardona not doing much, took a "break" 2 hours ago, it never ended
Albert Cardona II
@daddycardona
Sep 28 2017 07:14
lol
@Gersho
I am trying to do this sum of all primes lol
Gersho
@Gersho
Sep 28 2017 07:17
oh yeah i remember that one, had trouble with it because i suck at maths
Gersho
@Gersho
Sep 28 2017 07:24
well i'm off to bed, good luck to you !
Albert Cardona II
@daddycardona
Sep 28 2017 07:50
good night and so do i suck at math and the funny thing it says to cheat lol
EpicTriffid
@EpicTriffid
Sep 28 2017 09:07
@EpicTriffid
Hello all. It's been a while since I last posted. Been trying to get through these algorithms by myself. Little stuck now though on this one: https://www.freecodecamp.org/challenges/smallest-common-multiple
Without telling me how, where should I start my thinking?
Ene Catalin
@EneCatalin
Sep 28 2017 09:27
@Preeetrockz oh this chat room is sorta kinda dead
me and bird spoke with the higher ups but no dice
cat*
CraZy biRd
@Preeetrockz
Sep 28 2017 09:37
@EneCatalin :D :P
Pethaf
@Pethaf
Sep 28 2017 10:48
@EneCatalin Do you know cat?
@EpicTriffid First hint.
smallestCommonMultiple(a,b) = a*b/gcd(a,b)
Second hint, smallestCommonMultiple(a,b,c) = smallestCommonMultiple((smallestCommonMultiple(a,b),c)
Ene Catalin
@EneCatalin
Sep 28 2017 10:56
does ostrich know cat ?
no
all ostrich knows is that emus suck
Pethaf
@Pethaf
Sep 28 2017 10:58
Ok.
Ene Catalin
@EneCatalin
Sep 28 2017 10:58
why ?
Pethaf
@Pethaf
Sep 28 2017 10:58
So we are just all a bunch of strangers flowing around randomly encountering each other.
Sounds cool.
I think I will go randomly encounter one of my cats.
Altin Rrahmani
@DevKosov
Sep 28 2017 11:05
the ostrich!?
Ene Catalin
@EneCatalin
Sep 28 2017 11:07
huh ?
Altin Rrahmani
@DevKosov
Sep 28 2017 11:08
sup bro
Ene Catalin
@EneCatalin
Sep 28 2017 11:09
not much
hating java
Altin Rrahmani
@DevKosov
Sep 28 2017 11:09
haha
Altin Rrahmani
@DevKosov
Sep 28 2017 11:14
what you been up to these days still coding?
Ene Catalin
@EneCatalin
Sep 28 2017 11:16
eh, a bit, I need to do that more
you ?
Altin Rrahmani
@DevKosov
Sep 28 2017 11:19
i am trying
took a summer break i feel like i am a nub in coding now
Ene Catalin
@EneCatalin
Sep 28 2017 11:20
I want to go into android fml
btw pretty sure udacity is giving out some sort of scholarships atm
Altin Rrahmani
@DevKosov
Sep 28 2017 11:21
damn you should try
Ene Catalin
@EneCatalin
Sep 28 2017 11:21
already applied
Altin Rrahmani
@DevKosov
Sep 28 2017 11:22
i hope you get it
Ene Catalin
@EneCatalin
Sep 28 2017 11:22
it could be wasted on me
android is hard af
java is not JS, for some reason java is considered scarier
on the plus side it's actually OOP
Altin Rrahmani
@DevKosov
Sep 28 2017 11:23
lol
nothing is impossible
Ene Catalin
@EneCatalin
Sep 28 2017 11:23
man, android IS hard
like legit hard af
Altin Rrahmani
@DevKosov
Sep 28 2017 11:23
na man everything is hard for the first time
Ene Catalin
@EneCatalin
Sep 28 2017 11:23
try it if you have doubts
Altin Rrahmani
@DevKosov
Sep 28 2017 11:24
i dont have any doubts that it is hard but you'll learn it man
Amani Jones
@AmaniJones
Sep 28 2017 11:55
can anyone help me im on: Storing Values with the Assignment Operator and i dont get what im doing wrong
var a = 7;
var b = var a;
Ken Haduch
@khaduch
Sep 28 2017 11:59
@AmaniJones - you do not want to use var b = var a; if you are trying to assign, only use var b = a; - no var keyword on the right hand side.
Altin Rrahmani
@DevKosov
Sep 28 2017 11:59
@AmaniJones you have already declared the var a you have given it the value 7 now you should give var b the value of var a you don't have to delcare a var within a var
@khaduch thanks
CamperBot
@camperbot
Sep 28 2017 12:00
devkosov sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3320 | @khaduch |http://www.freecodecamp.com/khaduch
Altin Rrahmani
@DevKosov
Sep 28 2017 12:00
my english is fading...
Ken Haduch
@khaduch
Sep 28 2017 12:02
@AmaniJones - I just took a look at the exercise and have to make a correction to my comment - below the line (where you are supposed to make changes) you should not declare var anything - the variables are already defined above the line, you only need to use the variable names below the line without any var keywords at all... You might want to reset your code to get the initial declaration and then re-add your assignments below the line where it says to make changes.
@DevKosov - :+1: - keep up the good work!
Amani Jones
@AmaniJones
Sep 28 2017 12:20
Thanks @khaduch and @DevKosov
CamperBot
@camperbot
Sep 28 2017 12:20
amanijones sends brownie points to @khaduch and @devkosov :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @devkosov |http://www.freecodecamp.com/devkosov
:star2: 3321 | @khaduch |http://www.freecodecamp.com/khaduch
nicootto
@nicootto
Sep 28 2017 12:32
Hi, does anyone know why console.log "is not a function" inside a try-catch ?
korzo
@korzo
Sep 28 2017 12:33
@nicootto it means, that variable is not an object
@nicootto Wait, you got "not a function" after calling console.log ?
Ken Haduch
@khaduch
Sep 28 2017 12:37
@nicootto - what does your code look like?
@nicootto - I just googled and found a stackoverflow note for a similar problem - the solution offered was to put a semicolon after the console.log statement? here is the note for further reference in case it helps... there are a couple other scenarios that people in the thread there give, so maybe one of those will help you if the semicolon doesn't?
Krystal Lai
@klai38
Sep 28 2017 13:12
Hi all, I have just started looking into recursion articles on FCC to help with my understanding. And I am doing an exercise now, but it doesnt seem to be working. Essentially given an array I have to add all the numbers within using recursion
Can someone please help
var sum = function (array) {
var total = 0;
if (array.length === 1) {
return [0];
} else {
array.shift();
var modifiedArray = sum(array);
total = total + modifiedArray[0];
}
return total
}
Tiago Correia
@tiagocorreiaalmeida
Sep 28 2017 13:15
@klai38 exercise name?
Krystal Lai
@klai38
Sep 28 2017 13:15
No this is just additional practise for me to understand recursion more
I'm just a little stuck and want to make sure I understand
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 13:20
@klai38 the total = total + modifiedArray is wrong
oh wait, no
you alter the array before call it
it's good
rscales02
@rscales02
Sep 28 2017 13:27
Can somone explain to me why "1 555-555-5555" does not get a match with /^1/?
Krystal Lai
@klai38
Sep 28 2017 13:33
@NahuelOvejero :)
I dont know why it's returning NaN
Randell Dawson
@RandellDawson
Sep 28 2017 13:33
@rscales02 Can you share the rest of your code?
var str = "1 555-555-5555"
console.log(/^1/.test(str));  // results in true
Krystal Lai
@klai38
Sep 28 2017 13:33
I suspect it's something gone wrong at my recursive call, and console.log confirms this. But I dont really know how to fix it
korzo
@korzo
Sep 28 2017 13:35
@klai38 What is the goal?
sum all members of array?
Krystal Lai
@klai38
Sep 28 2017 13:36
Yep! @korzo
@korzo But with recurson
recursion *
korzo
@korzo
Sep 28 2017 13:39
@klai38 var modifiedArray = sum(array);
modifiedArray is number
so this part is bad
total = total + modifiedArray[0];
Krystal Lai
@klai38
Sep 28 2017 13:40
I thought modified Array returned an array
Because when the function is called back again it stores [0] in modified array
korzo
@korzo
Sep 28 2017 13:41
@klai38 You should return number
@klai38 If array.length === 1 return array[0]
If not, remove element from array add it to sum(array) and return
@klai38
return array[0] + sum(array.slice(1))
Krystal Lai
@klai38
Sep 28 2017 13:45
hmm, can you maybe explain a little more
@korzo
Please
korzo
@korzo
Sep 28 2017 13:47

@klai38 lets say you have array [1,2,3]

On first call you have [1,2,3]
Sou you take 1 and call sum([2,3])

On second call call you have [2,3]

so you remove 2 and call sum([3])

Krystal Lai
@klai38
Sep 28 2017 13:48
yep! @korzo
rscales02
@rscales02
Sep 28 2017 13:48
@randelldawson any idea why none of the online regex editors return that as a match?
korzo
@korzo
Sep 28 2017 13:48
@klai38 last call returns 3
call before returns
2 + 3
and first call returns
1 + (2 + 3)
Krystal Lai
@klai38
Sep 28 2017 13:49
ya @korzo
But arent those values still in arrays
when theyre resolving
Krystal Lai
@klai38
Sep 28 2017 13:54
@korzo
korzo
@korzo
Sep 28 2017 13:55
@klai38 nope, because you return first element of array (number), not array
@klai38 return array[0] + sum(array.slice(1))
@klai38 So function always returns first element of array + next call, if array.length is more than 1
Krystal Lai
@klai38
Sep 28 2017 13:57
OK thank you! Ill work through it :) @korzo
CamperBot
@camperbot
Sep 28 2017 13:57
:cookie: 552 | @korzo |http://www.freecodecamp.com/korzo
klai38 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
korzo
@korzo
Sep 28 2017 13:57
@klai38 Here is whole function
var sum = function (array) {
  if (array.length === 1) {
    return array[0];    
  }
  return array[0] + sum(array.slice(1));
}
rscales02
@rscales02
Sep 28 2017 13:59
@korzo any chance you could take a look at this and help me understand why there are no matches?
https://regex101.com/r/RnLz1a/3
Krystal Lai
@klai38
Sep 28 2017 14:01
What I thought it would look like is
Given [1,2,3] as an argument
when it's called within again it would become
[2,3]
[3]
modified Array is then equal to [0]
total = 0 + 0
total = 0 + 3 (3 being the first element in the array)
total = 3+ 2
total = 5+1
@korzo
korzo
@korzo
Sep 28 2017 14:02
@klai38
or simplified
var sum = function (array) {
  if (array.length === 1) {
    return array[0];    
  }

    var first = array.shift();
    var rest = sum(array);

    console.log('Returning ' + first + ' + ' + rest);
    return first + rest;

}
Krystal Lai
@klai38
Sep 28 2017 14:04
Hmm! OK that makes sense thank you!
I know
mine is wrong, but Im still failing to see where its gone wrong
yours makes sense though, thank you for that!
@korzo
korzo
@korzo
Sep 28 2017 14:06
@klai38 Your was wrong, because you shift element out of array without adding it to total
Krystal Lai
@klai38
Sep 28 2017 14:07
Hnmm OK thank you!
@korzo
really appreciate it
korzo
@korzo
Sep 28 2017 14:11
@rscales02 Sorry, I have no idea.
I struggled with it last time when we talked about it
My regex-fu is bad yet :(
rscales02
@rscales02
Sep 28 2017 14:12
@korzo all gravy baby, thanks anyway
CamperBot
@camperbot
Sep 28 2017 14:12
rscales02 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 553 | @korzo |http://www.freecodecamp.com/korzo
Albert Cardona II
@daddycardona
Sep 28 2017 14:14
hey yall
regex is hard
but since I am not doing that I don't care lol
Nahuel Ovejero
@NahuelOvejero
Sep 28 2017 14:15
regex is a pain, but as long you know the basic, you should be fine for most task that need regex
korzo
@korzo
Sep 28 2017 14:17
@rscales02 You have " at the start
Albert Cardona II
@daddycardona
Sep 28 2017 14:17
so I am on smallest common multiple and am I seeing this correctly. I need to get first the numbers between and included in the array and then look for the smallest common multiple
rscales02
@rscales02
Sep 28 2017 14:18
always the small things lol
korzo
@korzo
Sep 28 2017 14:19
@rscales02 Otherwise it works. also add multiline flag
rscales02
@rscales02
Sep 28 2017 14:22
that makes it better! thanks! @korzo
CamperBot
@camperbot
Sep 28 2017 14:22
rscales02 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
api offline
Kyle Holm
@thekholm80
Sep 28 2017 14:47
@heroiczero @DarrenfJ @Manish-Giri thanks
CamperBot
@camperbot
Sep 28 2017 14:47
thekholm80 sends brownie points to @heroiczero and @darrenfj and @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 1788 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6592 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 2061 | @darrenfj |http://www.freecodecamp.com/darrenfj
Ken Haduch
@khaduch
Sep 28 2017 14:50
@daddycardona - hi Albert - my one tip about the smallest common multiple is that the number you generate has to be a multiple of the bigger of the two numbers. But yes, get the array that fills the range between the two parameters.
rscales02
@rscales02
Sep 28 2017 14:50
var collection = {
    "2548": {
      "album": "Slippery When Wet",
      "artist": "Bon Jovi",
      "tracks": [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    "2468": {
      "album": "1999",
      "artist": "Prince",
      "tracks": [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
}

 return collectionCopy["2468"];
should return the object under "2468" correct? I am still returning the entire collectionCopy
Albert Cardona II
@daddycardona
Sep 28 2017 14:51
@khaduch man this one is going to confuse the hell of me but thanks lol
CamperBot
@camperbot
Sep 28 2017 14:51
daddycardona sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3322 | @khaduch |http://www.freecodecamp.com/khaduch
rscales02
@rscales02
Sep 28 2017 14:51
@daddycardona I just finished that one earlier this week, I still dont understand how I did it!
Albert Cardona II
@daddycardona
Sep 28 2017 14:51
LMAO
Ken Haduch
@khaduch
Sep 28 2017 14:52
@daddycardona - it does take a while to wrap your head around that one, for sure... but it's a "fun" exercise.
Albert Cardona II
@daddycardona
Sep 28 2017 14:52
my son could probably do it in minutes he gets this stuff very easy for him. Math is his strong points. He was literally looking up vectors at 14 to code in lua
for roblox lol
the one before it literally said to cheat in the hints lol
Ken Haduch
@khaduch
Sep 28 2017 14:54
@rscales02 - if I remember that challenge correctly, they want you to return the entire collection object? You have to modify specific entries (one specific entry) and I think that the test results make sure that you didn't change anything but the one they wanted you to change?
rscales02
@rscales02
Sep 28 2017 14:55
@khaduch true, but I am shit when it comes to objects and am trying to figure out how to access what it is calling for
I was thinking that return should just bring back the one part, not all of it. This test proves my theory wrong I guess, but I don't know why
Albert Cardona II
@daddycardona
Sep 28 2017 14:56
return collection['2468'] maybe I don't know that one lol @rscales02
Ken Haduch
@khaduch
Sep 28 2017 14:57
@rscales02 - okay, that challenge is one of the "stumpers" that I used to see a lot of people get hung up on. It does require that you return the entire collection. Getting a little deeper into Objects with it!
rscales02
@rscales02
Sep 28 2017 14:58
@daddycardona I tried that... same result though
Albert Cardona II
@daddycardona
Sep 28 2017 14:59
oh well lol I am not at your level yet I am a pupil to you teacher lol
Ken Haduch
@khaduch
Sep 28 2017 14:59
@rscales02 - can you post your code so far? There has to be some function updateRecords that has code in it to access the desired record object, make the requested modifications, and then return the collection. I don't know if you've posted what you have so far?
rscales02
@rscales02
Sep 28 2017 15:01
function updateRecords(id, prop, value) {


  return collectionCopy.id;
}
still on how do I access the object with "id" lol
I know there are many steps to do beyond that, but first step is gaining access...
Albert Cardona II
@daddycardona
Sep 28 2017 15:02
why do you have collectionCopy, I don't get that part lol
rscales02
@rscales02
Sep 28 2017 15:03

// Setup
var collection = {
    "2548": {
      "album": "Slippery When Wet",
      "artist": "Bon Jovi",
      "tracks": [ 
        "Let It Rock", 
        "You Give Love a Bad Name" 
      ]
    },
    "2468": {
      "album": "1999",
      "artist": "Prince",
      "tracks": [ 
        "1999", 
        "Little Red Corvette" 
      ]
    },
    "1245": {
      "artist": "Robert Palmer",
      "tracks": [ ]
    },
    "5439": {
      "album": "ABBA Gold"
    }
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));

// Only change code below this line
function updateRecords(id, prop, value) {

  console.log(collectionCopy[id]);
  return collectionCopy;
}

// Alter values below to test your code
updateRecords(5439, "artist", "ABBA");
curiously, when I console log collectionCopy it pulls exactly what I was looking for... go figure!
Ken Haduch
@khaduch
Sep 28 2017 15:06
@rscales02 - the collectionCopy is just a step within your code to make a copy of the collection so that the test code can restore it later. You don't want to work with that copy, but with collection itself. Now, you can see that collection is an object and it has nested objects within it, right? So there is a "key" value that is used to access those objects, that is passed into the function as the id parameter. id is a variable within the function, and if you go back to the lessons on accessing objects using a variable "Accessing Objects Properties with Variables", they cover how to access the properties of an object using bracket notation. So you want to use that in this case.
@rscales02 - instead of collectionCopy[id] you want to use collection[id] -- that is using the variable and bracket notation to reference the correct nested object in collection.
rscales02
@rscales02
Sep 28 2017 15:08
got it, thanks @khaduch
CamperBot
@camperbot
Sep 28 2017 15:08
rscales02 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3323 | @khaduch |http://www.freecodecamp.com/khaduch
Albert Cardona II
@daddycardona
Sep 28 2017 15:09
so I got the fact because of the hints to sort an array from highest to lowest lol and now I am stump with the rest of it lol
Ken Haduch
@khaduch
Sep 28 2017 15:09
@rscales02 - good - so you want to make sure to work with collection[id] throughout the function to accomplish the action that follows their specific algorithm.
rscales02
@rscales02
Sep 28 2017 15:11
@daddycardona do you know that lcm(a,b) = a*b/greatest common denominator(a,b)?
Albert Cardona II
@daddycardona
Sep 28 2017 15:12
I know that but what I don't know is that you give me two numbers and on paper i can find it but coding it takes a little longer for me to understand
rscales02
@rscales02
Sep 28 2017 15:12
That is how I felt lol
I made a second function to check for GCD
and looped through my array keeping a running total
Albert Cardona II
@daddycardona
Sep 28 2017 15:15
sounds great but it says that 1,5 lcm == 60 so I have to figure out how to do that lol
if this is so vital why doesn't javascript already have a pre built function like pi lmao
well I am about to make something to eat and play some video games I will get back to this later
Kyle Holm
@thekholm80
Sep 28 2017 15:18
yay video games
rscales02
@rscales02
Sep 28 2017 15:19
Best thing to learn with coding is when to say "fuck it" for the day!
Ken Haduch
@khaduch
Sep 28 2017 15:31
It definitely pays to get away from the computer for a while and sometimes keeping a problem in the back of your mind all of a sudden you get some inspiration and come back and it's a piece of cake!
Darren
@DarrenfJ
Sep 28 2017 15:35
morning fCC
@rscales02 i agree ;)
Kyle Holm
@thekholm80
Sep 28 2017 15:36
@DarrenfJ :wave:
Darren
@DarrenfJ
Sep 28 2017 15:37
@thekholm80 buddy! :D
quickspeedy
@quickspeedy
Sep 28 2017 15:42
I am struggling with the flex box. I am trying to get the button to be underneath the quote. I have been reviewing flex box model and couldn't find anything that will solve it. Here is the link to my codepen: https://codepen.io/quickspeedy/pen/ZXLKXx
rscales02
@rscales02
Sep 28 2017 15:54
@khaduch that one didn't prove to be too much of a challenge once I figured my access (and not to mess with collectionCopy) thanks for the direction!
CamperBot
@camperbot
Sep 28 2017 15:54
rscales02 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
api offline
quickspeedy
@quickspeedy
Sep 28 2017 16:12
Nvm I found the solution.
Ken Haduch
@khaduch
Sep 28 2017 16:32
@DarrenfJ - good morning (or good afternoon, since it's been an hour since you posted.)
@rscales02 - good - you're welcome!
rscales02
@rscales02
Sep 28 2017 17:06
arr.map(function(item){return item % 3 ===0 ? "dude" : item})
The way I think I understand that is it should test all numbers in arr to see if they are divisible by 3 and replace that item with "dude" right?
Stephen James
@sjames1958gm
Sep 28 2017 17:28
@rscales02 Yes. Well, a new array is returned with the numbers divisible by 3 replaced by "dude"
rscales02
@rscales02
Sep 28 2017 17:29
so without setting that equal to anything nothing happens?
piteto
@piteto
Sep 28 2017 17:37
@rscales02 yeah, .map() doesn't modify the array in place. It needs to be the return value of a function or assigned to a variable.
Pethaf
@Pethaf
Sep 28 2017 17:44
@quickspeedy Wrap the button and the qoute in a div each. Wrap them both in a div that has the following css display: flex; flex-direction column give the quote div the following css flex-order: 1 and the button div the following css flex-order: 0
Gersho
@Gersho
Sep 28 2017 18:14
Hello everyone !
Kyle Holm
@thekholm80
Sep 28 2017 18:22
@Gersho :wave:
piteto
@piteto
Sep 28 2017 18:25
:sparkles: :wave: :sparkles:
Gersho
@Gersho
Sep 28 2017 18:25
sparkling
i'm quite happy, i managed to get rid of the function binding i had in my react
but i couldn't find an alternative to dangerouslySetInnerHTML :(
Kyle Holm
@thekholm80
Sep 28 2017 18:28
I couldn't find a way to do the markdown previewer without using dangerouslySetInnerHTML
piteto
@piteto
Sep 28 2017 18:29
I've seen that question asked a few times here - need to stop procrastinating and finish my Simon + Calculator so I can try it out
Gersho
@Gersho
Sep 28 2017 18:29
you spend too much time sharing your smarts piteto :P
but i haven't finished front end actually either, i'm still missing the portfolio
piteto
@piteto
Sep 28 2017 18:33
lol, my portfolio is going to be very basic. I skipped it, but wondering...why it's at the beginning since we'll have to keep updating it after we finish it
Gersho
@Gersho
Sep 28 2017 18:33
because it's html/css i guess
but i think i'll do one with placeholders to submit it, and another real one
Moisés Man
@moigithub
Sep 28 2017 18:41
any1 know a web with psd to html challenges ?
i tried 30days 30sites.. BUT.. it requires u to think ur own design..
... and that part of my brain is missing
Tiago Correia
@tiagocorreiaalmeida
Sep 28 2017 19:29
@moigithub there's alot of websites with psd files
you can download and pass them to code is that what you are looking for?
if so I can send you a link or two
Eddie Cervello
@eddiecervello
Sep 28 2017 19:35
is there a way of making the following css simpler by nesting each id?
button#btn1:active {
    background-color: purple;
}
button#btn2:hover {
    background-color: green;
}
button#btn3:focus {
    background-color: orange;
}
Eddie Cervello
@eddiecervello
Sep 28 2017 19:37

well I guess there's this too;
``` #btn1:active {
background: purple;
}

btn2:hover {

background: green;
}

btn3:focus {

background: orange;
}```

piteto
@piteto
Sep 28 2017 19:42
@eddiecervello No, that's about as simple as you can do it without a CSS preprocessor or javascript
Eddie Cervello
@eddiecervello
Sep 28 2017 19:46
cheers
Moisés Man
@moigithub
Sep 28 2017 19:51
@tiagocorreiaalmeida thx :)
CamperBot
@camperbot
Sep 28 2017 19:51
moigithub sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 368 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
piteto
@piteto
Sep 28 2017 19:51
@moigithub Have you tried browsing through dribbble or checking out wordpress theme sites?
Moisés Man
@moigithub
Sep 28 2017 19:51
@piteto nope
not really PSDs, but lots of great designs that could be fun challenges to recreate in HTML
Moisés Man
@moigithub
Sep 28 2017 19:52
ok :) ty @piteto
CamperBot
@camperbot
Sep 28 2017 19:52
moigithub sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 161 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 28 2017 19:53
There used to be a cool blog that challenged people to create different designs....I'll see if I can find it
Moisés Man
@moigithub
Sep 28 2017 19:53
...some1 reviewed my CV, told my JS skill was pretty good but my html/css needed more work :)
piteto
@piteto
Sep 28 2017 19:53
ouch :) better prove them wrong
Gersho
@Gersho
Sep 28 2017 19:56
you got someone to look at your CV, that's great
Moisés Man
@moigithub
Sep 28 2017 19:57
... after 2 years trying.. probably not soo great :P
They have five volumes with different concepts to try out
Gersho
@Gersho
Sep 28 2017 19:59
well, i live in France, where having an arabic sounding name means recruiters throw away your CV without reading it, so any step is a good step ^^
Tiago Correia
@tiagocorreiaalmeida
Sep 28 2017 20:09
dont know if you take udemy courses @moigithub but there's a good advanced css course coming in the next few weeks and will cover sass aswell and its gonna be all about building projects
Stephen James
@sjames1958gm
Sep 28 2017 20:14
@piteto thanks for that
CamperBot
@camperbot
Sep 28 2017 20:14
sjames1958gm sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 162 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 28 2017 20:19
No problem!