These are chat archives for FreeCodeCamp/Help

17th
Oct 2017
zootechdrum
@zootechdrum
Oct 17 2017 03:33
Hello
Baha
@hijazi
Oct 17 2017 04:05
Hi, in this challenge: https://www.freecodecamp.org/challenges/exact-change I think there's a mistake in the test case before the last one, or I don't understand the challenge right
it says checkCashRegister(19.50, 20.00, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1.00], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return "Insufficient Funds".
heroiczero
@heroiczero
Oct 17 2017 04:06
@sjames1958gm @AdelMahjoub @DarrenfJ @Manish-Giri @GitHub-Henry @daddycardona @thekholm80 TY for the helping the Help :)
CamperBot
@camperbot
Oct 17 2017 04:06
heroiczero sends brownie points to @sjames1958gm and @adelmahjoub and @darrenfj and @manish-giri and @github-henry and @daddycardona and @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 2143 | @darrenfj |http://www.freecodecamp.com/darrenfj
:cookie: 394 | @github-henry |http://www.freecodecamp.com/github-henry
:cookie: 589 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
:star2: 1513 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 6659 | @manish-giri |http://www.freecodecamp.com/manish-giri
:cookie: 394 | @daddycardona |http://www.freecodecamp.com/daddycardona
:star2: 8567 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
heroiczero
@heroiczero
Oct 17 2017 04:06
@hijazi could i see your code?
Baha
@hijazi
Oct 17 2017 04:06
although I see the cash has 1 dollar, and it should return 0.5, so how is it possible it should return insufficient funds
heroiczero
@heroiczero
Oct 17 2017 04:07
@hijazi it is because you do not have 50 cents in the Cash Drawer you only have a dollar bill
Baha
@hijazi
Oct 17 2017 04:07
that's reasonable @heroiczero
I understand the challenge better now, thanks @heroiczero
CamperBot
@camperbot
Oct 17 2017 04:08
:star2: 1892 | @heroiczero |http://www.freecodecamp.com/heroiczero
hijazi sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
Henry
@GitHub-Henry
Oct 17 2017 06:00
@heroiczero hello, and thank you for the brownies
CamperBot
@camperbot
Oct 17 2017 06:00
github-henry sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1893 | @heroiczero |http://www.freecodecamp.com/heroiczero
Manish Giri
@Manish-Giri
Oct 17 2017 06:22
@heroiczero @DarrenfJ ty, as always :smile:
CamperBot
@camperbot
Oct 17 2017 06:22
manish-giri sends brownie points to @heroiczero and @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1894 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2144 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Oct 17 2017 16:12
my usual kudos and thanks back to all the regulars...
thanks @Manish-Giri @heroiczero @GitHub-Henry @sjames1958gm @daddycardona @thekholm80 @AdelMahjoub
CamperBot
@camperbot
Oct 17 2017 16:13
darrenfj sends brownie points to @manish-giri and @heroiczero and @github-henry and @sjames1958gm and @daddycardona and @thekholm80 and @adelmahjoub :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @github-henry |http://www.freecodecamp.com/github-henry
:cookie: 591 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
:star2: 1514 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 6660 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 1895 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 8569 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:cookie: 395 | @daddycardona |http://www.freecodecamp.com/daddycardona
Ahmad Abdolsaheb
@ahmadabdolsaheb
Oct 17 2017 16:20

anyone working on the night life coordination app?

Stephen James
@sjames1958gm
Oct 17 2017 16:40
@DarrenfJ :+1: thanks
CamperBot
@camperbot
Oct 17 2017 16:40
sjames1958gm sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2145 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Oct 17 2017 16:52
@DarrenfJ @heroiczero ty guys
CamperBot
@camperbot
Oct 17 2017 16:52
thekholm80 sends brownie points to @darrenfj and @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1896 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2146 | @darrenfj |http://www.freecodecamp.com/darrenfj
Mike
@MikeJSchorah
Oct 17 2017 17:12
When building a website for someone, is it better to build it all at once or a page a day?
alpox
@alpox
Oct 17 2017 17:37
@MikeJSchorah All at once is almost always a bad approach because you need structure when working otherwise you miss things easily.
One should always structure the work process before going to actually do it
Mike
@MikeJSchorah
Oct 17 2017 17:38
@alpox At first, I thought a page a day so I could nip any design changes that they had in the bud and so I could let them figure out the content as we go along.
Now, I'm thinking that it's better to do the website all at once since they never know what content they want and I have to make it up anyway. And since the longer that time goes on, the more changes and re-changes that they want to make (the less time that they have, the less changes that they can think of)
alpox
@alpox
Oct 17 2017 17:57
@MikeJSchorah Thats going in the direction of agile development. Still, don't do everything at once. You don't have to split things into exactly day pots, but go sure to have structure in your work and don't try to do everything the same time.
That said, do first what you know they want in a structured way, then get feedback from the customer, implement it, and get feedback again - do that so long until they are happy.
Mike
@MikeJSchorah
Oct 17 2017 18:00
@alpox I was thinking that I also might not want the lag, too, that comes with doing a page a day. I don't want anything to get lost in the pipeline.
Albert Cardona II
@daddycardona
Oct 17 2017 18:05
what up everyone
I finally had a chance to truly think about the binary challenge and got it right in my first try very simple. I was busy most of the week and was struglling with it at first then I just added some stuff and boom done sir done :)
Henry
@GitHub-Henry
Oct 17 2017 18:07
@DarrenfJ hello & ty for the brownies
CamperBot
@camperbot
Oct 17 2017 18:07
github-henry sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2147 | @darrenfj |http://www.freecodecamp.com/darrenfj
Henry
@GitHub-Henry
Oct 17 2017 18:08
@daddycardona congrats
Albert Cardona II
@daddycardona
Oct 17 2017 18:11
@alpox my suggestion for this is to try to see what you want to do with each page. I created a website that was like a landing page for their website very simple one so it was easy to design. However, if it is a bigger site and is desired to have multiple pages start with the header for all the pages because it is usually the same for each page and a copy and paste with one thing to fix like the active button for that section. Like [contact]= active so it looks like it is pressed for each section that is suppose to be higlighted. So I work from what is going to be the same on every page usually header and footer and design layout, then I worry about the content. ;) thank @GitHub-Henry
CamperBot
@camperbot
Oct 17 2017 18:11
daddycardona sends brownie points to @alpox and @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 1366 | @alpox |http://www.freecodecamp.com/alpox
Ken Haduch
@khaduch
Oct 17 2017 18:13
@daddycardona - you're getting this stuff now! that's good - just keep going with your coding work, you'll keep improving!
Albert Cardona II
@daddycardona
Oct 17 2017 18:13
Not as much as I would like too especially math concepts LOL
and thanks @khaduch
CamperBot
@camperbot
Oct 17 2017 18:13
daddycardona sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3374 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 17 2017 18:14
@daddycardona - the more problems you solve the better your approach to solving them will get, you just have to get in the groove...
Albert Cardona II
@daddycardona
Oct 17 2017 18:16
my thing how is this truly helping me especially when I look up how to solve them sometimes it is like WTH did they just do that I couldn't even understand. LOL I hate the fact that there are so many ways to program something but not just the different ways the different syntax. Like all these new methods that I am starting to understand but blow by my mind when someone else uses them lol
Ken Haduch
@khaduch
Oct 17 2017 18:21
@daddycardona - there are many ways to solve the problems, I am also amazed at some of the approaches that people use, and I've been coding in various languages for a long time! I'm' even more amazed at some of the higher-order functions like .reduce() and how powerful it is, especially when you become aware of different ways to use it. You just have to keep building on what you're learning - the most important thing, I think, is to get things working in some way. An example is that I always think of using for loops to do array manipulations, and that was how I did my first pass of a lot of the algorithms. After getting the idea of how to use .reduce() I went back and redid them - it was a good way for me to approach it.
Albert Cardona II
@daddycardona
Oct 17 2017 18:22
I actually have been doing that with not that much luck lol
kiran JD
@kiranjd
Oct 17 2017 18:31

I have this code which title cases the given string

function titleCase(str) {
var res = [];
str=str.toLowerCase().split(" ");
for(var i=0;i<str.length;i++)
res[i]=str[i].charAt(0).toUpperCase()+ str[i].slice(1);

return res.join(' ');
}

titleCase("I'm a little tea pot");
I want to know what this snippet does
. . . + str[i].slice(1);

korzo
@korzo
Oct 17 2017 18:37
@kiranjd it will return word without first letter
Joshua Arnett
@josha5
Oct 17 2017 18:37
@sjames1958gm Just re read what you wrote yesterday I'm making progress now haha. Was at a point yesterday where if you asked me my name I probably would have had to stop and think about it. Thanks for the help!
CamperBot
@camperbot
Oct 17 2017 18:37
josha5 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8570 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 17 2017 18:37
@josha5 lol - glad progress is being made ! :)
korzo
@korzo
Oct 17 2017 18:38
@kiranjd as str[i] is current word
Stephen James
@sjames1958gm
Oct 17 2017 18:39
@kiranjd It concatenate the remainder of the string (after the first letter) to whatever is before the +
  • a for loop without {}, while it works in this case is not recommended
kiran JD
@kiranjd
Oct 17 2017 18:39
@sjames1958gm @korzo Okay Thanks
korzo
@korzo
Oct 17 2017 18:40
@kiranjd For "little", str[i].slice(1) returns "ittle"
kiran JD
@kiranjd
Oct 17 2017 18:40
@korzo yeah got it
Albert Cardona II
@daddycardona
Oct 17 2017 18:49
time for the true stuff lol
Kyle Holm
@thekholm80
Oct 17 2017 18:49
@daddycardona you can do it!
Albert Cardona II
@daddycardona
Oct 17 2017 18:52
thank you @thekholm80 aka Rob Schneider
CamperBot
@camperbot
Oct 17 2017 18:52
daddycardona sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1515 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Oct 17 2017 18:52
rip his **ing head off!
i should watch that again
Albert Cardona II
@daddycardona
Oct 17 2017 18:57
LOL
Mike
@MikeJSchorah
Oct 17 2017 19:25
@alpox thanks
CamperBot
@camperbot
Oct 17 2017 19:25
:star2: 1367 | @alpox |http://www.freecodecamp.com/alpox
mikejschorah sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
alpox
@alpox
Oct 17 2017 20:26
@MikeJSchorah also take @daddycardona s advice which was probably wrongly directed to me, which should go to you though
@MikeJSchorah he gives you a good insight on what i meant with structure your work
Tiago Correia
@tiagocorreiaalmeida
Oct 17 2017 21:05
heyl @alpox how are you ?
alpox
@alpox
Oct 17 2017 21:18
@tiagocorreiaalmeida :wave: im fine, and you? :)
Tiago Correia
@tiagocorreiaalmeida
Oct 17 2017 21:21
good good :D
alpox
@alpox
Oct 17 2017 21:27
@tiagocorreiaalmeida thats one good too much. Whats wrong, mate? :D
Tiago Correia
@tiagocorreiaalmeida
Oct 17 2017 21:59
ahaha nothing, anyway was trying to figure out something allready asked around lets see if you can be the hero I need :D
I got a form with 3 submit buttons all of them got different formactions, one of the buttons I need to asure that an input is not empty and if it is I need to prevent the form submit but running into some issues in this case nothing stoping the submit :D
alpox
@alpox
Oct 17 2017 22:10
@tiagocorreiaalmeida add an eventlistener function to the submit button, return false in the case of bad validation and true otherwise
For further stuff i can answer tomorrow :D im going to sleep
Just tell me over night if something comes up
Tiago Correia
@tiagocorreiaalmeida
Oct 17 2017 22:14
I tried button click prevent defaults doesnt stops nothing at all its like the code isnt even there hehe, yeah we talk tomorrow if I dont find a solution