These are chat archives for FreeCodeCamp/HelpFrontEnd

1st
Jul 2018
Lorrie Pearson
@Lorrie01
Jul 01 2018 01:10
Screen Shot 2018-06-30 at 9.08.14 PM.png
Screen Shot 2018-06-30 at 9.08.03 PM.png
Screen Shot 2018-06-30 at 9.07.51 PM.png

I'm really stuck on this challenge:
Debugging: Use Caution When Reinitializing Variables Inside a Loop
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/debugging/use-caution-when-reinitializing-variables-inside-a-loop/

I'm at a loss. please help

Antonio Cunanan
@kimonio
Jul 01 2018 01:16
@Lorrie01 Make sure the row variable is being reset. If you open the developer tools and look at the console, you will see what is happening with the row variable with the way its currently set up.
Lorrie Pearson
@Lorrie01
Jul 01 2018 01:16
Thanks @kimonio
Antonio Cunanan
@kimonio
Jul 01 2018 01:16
Screen Shot 2018-06-30 at 8.16.34 PM.png
glitz20
@glitz20
Jul 01 2018 02:53
any familiar with axios in react?
Ryan Williams
@Ryanwfile
Jul 01 2018 03:12

For the responsive projects -> survey, one of the tasks is Inside the form element, I am required to enter my name in a field with id="name"
I have tried a lot of variations of

 <form id = "survey-form">
     <label id="name-label" for= "name">Name: <input id="name" type ="text" placeholder ="name"></input></label>
</form>

and none of them pass the id="name" test, I've also tried to put id on a div container for this input field and that also doesn't work, what am I doing incorrectly? Thank you very much for any help.

Stephen
@stephepush
Jul 01 2018 04:46
Anyone who knows whats going on in the ES6 section of challenges still up? I need help with Using Getters and setters to Control Access to an Object...
Stephen
@stephepush
Jul 01 2018 04:56

@Ryanwfile, if you haven’t figured out the solution, I’ll give you the page the solution to your answer is located:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input

@Ryanwfile it’s quite simple, and i dont wanna spoil it for ya :)
@newtothat, it is “ok” to embed videos from youtube, but if the video has any form of copyright license, its ethically best to ask permission to embed that video. To avoid that, you can search for creative common videos from youtube, which are free for everyone to use.
Ryan Williams
@Ryanwfile
Jul 01 2018 05:50
@stephepush Thank you for the help, I got it now
include*engine
@newtothat
Jul 01 2018 17:42
how do you know if you have finished a course?? Recently im strugling with that.It's not only with coding but about learning in general.How do youknow when you should move on and start new course.say for example you are learning math or a language like english french or japanese or any other thing.
just tell me about your learning experience please.How do you decide by your own if you should start new subject or course?
I know how this questions sounds but im struging with repeating the same thig over and over.And i don't see any progress
Johnny
@JohnnyBizzel
Jul 01 2018 19:50
@newtothat You never stop learning at anything. It all depends what level you want to be at.
I start learning new things when I am getting bored or have reached a level I am happy at.
Bjorn van de Peut
@bjorno43
Jul 01 2018 20:28
@newtothat You should first ask yourself what you're expecting from yourself. A big mistake most beginner developers make is that they believe they should be able to code everything by head. And that's simply not true. You should be able to have a general idea about how to solve an issue. If someone asks you to make a calculator, you should have a general idea on how to do that and what you're going to need to realize it. But no one expects you to just sit down with an IDE in front of you and code it all out just like that. That might be expected from a veteran developer with years and years of experience, but not a beginner. So the question isn't if you've learned enough. The question is if you feel comfortable enough to move on to something new. Eventually you'll start developing real world applications. And you'll notice that you'll be struggling a lot with those as you keep running into issues that no one taught you how to solve. That's frustrating and gives you the feeling that you're not ready. But it's exactly those issues and your resolve in finding solutions that will teach you the most. And that's what's called "gaining experience". The more you have it, the easier it becomes.
That's also why we have a selection of project ideas that you can try when you feel like it. Because they give you that experience :)
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 20:43
hi peeps! need help with my penguin.... on click i want his left wing to go up ie 3times and end back down....but his wing is (broken)...haha it stays up...i want to go back down after rotation is complete... https://codepen.io/flyfishingbarbara/pen/BVVBew thnks!
not really 'rotation' but when 'animation' is done...thnx
Moisés Man
@moigithub
Jul 01 2018 20:52
@flyfishingbarbara because u changed the class... to fix.. after animations ends.. (after 3s x3) set it back to the previous class
u could use a setTimeout for this
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 20:58
@moigithub ok, ill have to do some research on that cuz havnt done that before...thnx
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:11
@flyfishingbarbara You might be interested in doing research on callback functions. These are functions that are "called" when something is done. Like setTimeOut() for example. That's a function that runs after the time has passed. So basicly JS starts the timer and says: Call me back when you're finished so I can run the code inside you.
The same idea would work with an animation for example. Call me back when the animation is finished so I can remove the class again
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 21:19
@bjorno43 thnx...ok so i got the 'wing' to go back down - i had to change the transform property. but now the 'click' only works when the page is reloaded....do i still use the 'setTimeOut() method to ie 'reset' the page...??
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:23
@flyfishingbarbara I think that's the best solution. I'm not formilliar with Vue so I have no idea how it exactly works. But your animation is pure CSS so you don't have a reliable callback on animation finished. Therefor a timeout with the number of seconds that the animation takes would be the best solution to remove the CSS class again
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 21:30
@bjorno43 ok, thanks again...will check it out...have a good one... oh just curious...where r u located...??
include*engine
@newtothat
Jul 01 2018 21:34
@JohnnyBizzel and @bjorno43 thank you guys
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:37
@flyfishingbarbara I'm from the Netherlands
If you hover your mouse on the profile picture next to a message, you can usually see where someone is from 🙂
include*engine
@newtothat
Jul 01 2018 21:42
@bjorno43 your explanation was clear.But it sounds like im not the only one who feels that way? I mean was it your own experience? you told me
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 21:42
@bjorno43 yah, i saw that after posting...thnx again and cheer from san diego...
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:44
@flyfishingbarbara You're welcome :) Greetings back from the other side of the world :D
include*engine
@newtothat
Jul 01 2018 21:45
there is a girl Pamela Fox she taught on khan academy she says that creativity is not that you always create totally new things from scratch .sometimes it is just working with something that already has been created
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:45
@newtothat Well obviously it was my own experience yes. But I've met and dealt with countless of developers through the years and most of them share it
include*engine
@newtothat
Jul 01 2018 21:47
i see beside fcc's projects is it ok to do your own .Something that you wish would exist?
@bjorno43 ??
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:50
It's even encouraged to do that! Trying things out of the box is the most effective way of learning! There's only so much we can think of within our Curriculum. Working on something you're actually interested in will give you a lot of motivation and excitement about becoming a developer. So yes, please do! @newtothat
include*engine
@newtothat
Jul 01 2018 21:51
I'm not sure because many developers who sell courses they kinda think that someone has to teach you.I thought if you once learned how to do and understand how things work it is ok to create what you want
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:54
It's always encouraged to try developing stuff you want to develop! Only when you're actually doing a bootcamp or follow classes / courses with a certain time limit you shouldn't. Because it will distract you. But when learning on your own pace, it's definitely a good choice to try something yourself
Helio Goncalves
@srlhyo
Jul 01 2018 21:56
hi @bjorno43
I am glad you are here!
include*engine
@newtothat
Jul 01 2018 21:56
the truth is i never met a web developer in life like in real or in person.I can talk only with them in the net.
Helio Goncalves
@srlhyo
Jul 01 2018 21:57
I have been digging into JSON but I am still a bit lost in the meaning
I understand JSON is a file format that works with data
is that right?
Bjorn van de Peut
@bjorno43
Jul 01 2018 21:59
I started programming one day because I was asked to develop a chatsystem for some people. I never wrote a single line of code, but I was definitely interested in it! However, I was impatient. I didn't want to learn all the basics first. So I simply dove right into it. Trying to create a chatsystem with zero programming knowledge. Believe me I've struggled! But because I was working on something I liked, I kept going! It kept me interested. And everytime I made a little progress on that chatsystem, I was thrilled! Sure it took me at least a year before I finally had a working chatsystem. But I learned so much from that, that actually learning how to code was a breeze after it
Helio Goncalves
@srlhyo
Jul 01 2018 22:00
ahah
I believe it! ahahh
very inspiring story :)
@bjorno43 do you happen to know about JSON?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:01
@srlhyo JSON is a lightweight data-interchange format. In a way, you could see it as an array. They're very closely related. That's why it's very easy to convert a JSON string to an array or back
include*engine
@newtothat
Jul 01 2018 22:03
@bjorno43 that's interesting but for meit was hard when i wanted something like facebook at first.I decided to start by small.it was so hard .it is still hard lol
i did not have background in computers at all.i could not even use a computer
i thought you might like it devs
Aditya
@ezioda004
Jul 01 2018 22:04
@bjorno43 You mean "Objects" instead of "Array" right? :P
Helio Goncalves
@srlhyo
Jul 01 2018 22:04
@bjorno43 but can I create my JSON file, or not?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:04
@ezioda004 I'm trying to keep it understandable for now :P
I mean, yes, of course I mean objects. But in programming, pretty much anything can be an object. So that's not helping in explaining :P
@srlhyo Sure you can create your own JSON file
Aditya
@ezioda004
Jul 01 2018 22:08

@bjorno43 Why array then? The syntax is more similar to Object rather than Array. I didnt mean in that Array is Object context though.

var obj = { name: "John"}; //obj syntax
console.log(JSON.stringify(obj)); // {"name":"John"}

Syntax of both is same except keys of JSON need to be in string too.

Helio Goncalves
@srlhyo
Jul 01 2018 22:09
I got it. Now, is it AJAX a JSON file hosted online?
Helio Goncalves
@srlhyo
Jul 01 2018 22:09
and it can only be extracted by communicating with tthe server?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:10
@ezioda004 I picked the array as an example cuz of the key => value concept. That was all
Aditya
@ezioda004
Jul 01 2018 22:12
@srlhyo AJAX is just a technique of how you make asynchronous requests. JSON is the formal in which data is transferred.
@bjorno43 Ohhh, I see. I thought some different context, my bad.
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:12
@srlhyo No. Ajax can be used with JSON, but it doesn't have to. Ajax simply sends data to a server and waits for the response. That response can be JSON, but could just as easy be plain text or some other form of data. Ajax doesn't even have to send data. It might as well just request it without sending anything
Helio Goncalves
@srlhyo
Jul 01 2018 22:14
oh! say, I got JSON file and now I can use AJAX to send it to a server. Is that right?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:14
I use Ajax to load different content into a container DIV for example. I hate unnessesary page refreshes
Helio Goncalves
@srlhyo
Jul 01 2018 22:17
right...
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:17
@srlhyo Ye that's possible. But your server needs to do something with it of course. I mean, I can give my server a rock for example, but if I don't tell my server what to do with that rock, it just complete ignores it
Helio Goncalves
@srlhyo
Jul 01 2018 22:17
aahah
right
wow!
is there any good tutorials or any other great sources online that gives plenty of examples?
I have came across a couple but they are all really confuse for me
:(
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:18
There are plenty of ajax tutorials online, but I honestly don't have any specific good ones in mind
Helio Goncalves
@srlhyo
Jul 01 2018 22:19
ye...
ajax I think there are but not so much of JSON
why would you want to create a JSON file?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:19
It also depends on if you're using a library of pure JS with Ajax. As pure JS is a bitch when it comes to Ajax, lol
Helio Goncalves
@srlhyo
Jul 01 2018 22:19
can you give me some real examples?
perhaps examples of when you create a JSON yourself...
at the moment I would avoid Jquery
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:20
Hmm, JWT might be a good example of using a JSON file
Helio Goncalves
@srlhyo
Jul 01 2018 22:21
JWT?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:21
JSON Web Token. Mostly used for authentication (allowing users to login)
But as @ezioda004 mentioned before, JSON is easily converted into an object in pretty much any language. So it makes it easy to transfer data from one language to another and work with it.
Helio Goncalves
@srlhyo
Jul 01 2018 22:23
basically if you want to use a lot of repeating data it might be a good idea to create a json file and then access it as needed
true!
I am getting there.
ahaah
just wanted to practice using json but had no idea where to start.
I think I am getting there. Say. I want to build come cards. I am going to use similar data for them so it's good to create separate file to keep code clean and organized.
Am I right about it?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:26
I would start by making a simple form. Use JS to catch the form submit and convert the form data into a JSON string. Then mess around with that. Turn it into an object and see what you can do with that. Try sending it to a server side language and convert it into an object there to see what you can do with it
Ye that's also a good idea. Basicly you create a blank card. Like a template. Then use JSON to fill in the data on the card
Helio Goncalves
@srlhyo
Jul 01 2018 22:28
wow
you example is also great.
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 22:33
@bjorno43 oh hey, since it looks like you are with FCC...where can I get the links to the videos for the legacy advance front end projects...ie like the pomodoro clock, the simon game, the tic tac toe and the calc...?? ...thnx in advance...
...so i get the 'user stories' fulfilled...
Jesse
@ki4jgt
Jul 01 2018 22:36
What's the best way to display collapsible JSON in an HTML document?
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:37
@flyfishingbarbara I'm just a Moderator here on Gitter. I honestly don't know much about what's going on outside of it (we have thousends of ppl working on FCC). But I think @mstellaluna will be able to answer that question. She's around quite often so she'll see this message soon enough and get back to you :)
Barbara Pentoney
@flyfishingbarbara
Jul 01 2018 22:38
@bjorno43 thnks. will do....
@mstellaluna hi there...where can I get the links to the videos for the legacy advance front end projects...ie like the pomodoro clock, the simon game, the tic tac toe and the calc...?? ...thnx in advance...
...so i get the 'user stories' fulfilled...
@bjorno43 ok...she'll see a couple messages...thanks!
Bjorn van de Peut
@bjorno43
Jul 01 2018 22:41
@flyfishingbarbara You're welcome :)
mstellaluna
@mstellaluna
Jul 01 2018 22:58
what did i do?
@flyfishingbarbara there weren't any videos, there were just the sample projects
Bjorn van de Peut
@bjorno43
Jul 01 2018 23:02
@mstellaluna Whaha you didn't do anything. I just thought you might be able to answer that question, that's all
mstellaluna
@mstellaluna
Jul 01 2018 23:02
@bjorno43 there weren't videos, there were just sample projects
Bjorn van de Peut
@bjorno43
Jul 01 2018 23:03
Ah ok
mstellaluna
@mstellaluna
Jul 01 2018 23:03
on YT people posted them coding the projects but there were no videos
i don't remember any tbh