Record Collection - Free Code Camp

  Рет қаралды 20,661

Useful Programmer

Useful Programmer

Күн бұрын

This is a basic JavaScript tutorial where we write a function that allows us to alter the data in our imaginary record collection.
In this tutorial, we take on a fairly big task. Considering all that we've learned in the past related to JSON objects and algorithms, this is more intermediate challenge.
In this JavaScript tutorial, we write a function that adds to a JSON object based on the existing data and the different parameters we pass in.
This takes everything we've learned from pushing to an array, to using dot notation to access different elements of a JSON object.

Пікірлер: 131
@paco2244
@paco2244 4 жыл бұрын
Bro when you said how it's a big jump and a little unforgiving made me feel so much better by being thrown off by it lol.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Awesome. You're getting good Keith. Keep up the hard work.
@philmendez5660
@philmendez5660 3 жыл бұрын
same
@TheEmpireAnimations
@TheEmpireAnimations 3 жыл бұрын
Read my mind
@tacticalcheetodust
@tacticalcheetodust 3 жыл бұрын
same
@TioUngaro
@TioUngaro Жыл бұрын
Best tutorial video with step by step explanations! note: "collection" = "records" when you code in 22! Thanks
@antoniosimonetti2109
@antoniosimonetti2109 2 жыл бұрын
The fact that you said "it's a big jump" in the first seconds of the video makes me feel a bit better. You are right, I understand that's real programming but idk, I feel i was not already yet to do stuff like this and feel very stupid. Maybe they could add more hints that guides you in this exercise. Anyway thx for the video man, very helpful
@insurgentamine9220
@insurgentamine9220 Жыл бұрын
now they made it more complex after the update
@yaweyiah0
@yaweyiah0 4 жыл бұрын
the bar for programming has been set so high that I feel like crap anytime I can't pass a challenge. thanks for your videos man
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for saying this Nana. I feel exactly like you do. My idea here is that I can share these videos while I'm still at a beginner level. Learning to write programs is monumentally difficult and I hope this helps early stage people get to where I am now. Keep up the great work.
@erichamm7198
@erichamm7198 4 жыл бұрын
This blew me out of the water. I thought I was getting pretty good but I couldn't get this exercise down. Having you walk through it helped me process it.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
This is a big step. But taking it will be a significant step in your overall abilities to use JavaScript for useful purposes.
@branlynmorales8951
@branlynmorales8951 2 жыл бұрын
Hi man, how is your study going? Did you get the job already?
@erichamm7198
@erichamm7198 2 жыл бұрын
@@branlynmorales8951 I did. I'm doing work troubleshooting C# of all things but learning Javascript was the first step.
@branlynmorales9344
@branlynmorales9344 2 жыл бұрын
@@erichamm7198 awesome. For me it's been some hard. Most times I think I will never get a job because everyone is doing the same and it will make it harder to land the first job. Also No Code worries me, I don't know if It's worth to keep doing it. I only know pretty basic html, css and new on JS.
@Lordmaryo
@Lordmaryo Жыл бұрын
@@branlynmorales9344 hows it going for you now
@Taruney
@Taruney 4 жыл бұрын
great video man. I seriously feel so lost when going through big jumps in difficulties like this. your videos really help, keep going man
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Excellent Tarun. Thanks for the kind comment. Comments like yours inspire me to keep it up. When you feel lost, that means you're making progress. Keep powering through!
@TechSnazzy
@TechSnazzy 4 жыл бұрын
Wow, this is definitely a tough one. Thanks for the video. I'm sure I will be watching it multiple times to learn this.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
This is a tough one. Thank you for watching Sean.
@PhilWilkinsonMusic
@PhilWilkinsonMusic 2 жыл бұрын
They changed this lesson a little but you helped me so much to get through it, thanks! It's so hard to understand the requirements in the lessons when you haven't fully grasped how functions, objects, and arrays etc work together, also figuring out what's related to what. Big learning curve but fun!
@anythingidc8075
@anythingidc8075 3 жыл бұрын
Learning About Nested Arrays and then taking a BIGASS Jump to this challange and me not completing made me feel like pure shit.Thanks!
@zken1856
@zken1856 3 жыл бұрын
This one was a real nightmare but thanks to the other students I got it correct here is the correct answer to pass again they have changed the lesson from when Mr. Ian started it. function updateRecords(object, id, prop, value) { if(prop!=="tracks" && value!=='') { object[id][prop] = value; } else if(prop==="tracks" && object[id][prop]===undefined) { object[id][prop] = []; object[id][prop].push(value); } else if(prop==="tracks" && value!=='') { object[id][prop].push(value); } else if(value==='') { delete object[id][prop]; } return object; }
@santiagoaristi216
@santiagoaristi216 2 жыл бұрын
I was stuck and watching this video definitely made me understand it a little better. But, I will watch again and again until I get a better understanding of the logic. Very well explained! Update: Watched it a second time and now I'm starting to get a clearer picture. Not stopping!! Thank you!
@thomasmullaney3472
@thomasmullaney3472 3 жыл бұрын
Thanks for the walk-through. They don't have too many resources to get through this problem, and I'd much rather see someone walk through putting everything together, than jumping around the past 15 questions.
@lofi_Insomnia_
@lofi_Insomnia_ 4 жыл бұрын
This one is so hard I can't wrap my head around it! Thanks so much for the video
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Do you feel like you've understood it? This is a very useful exercise. If you dig in deep and understand this, you'll find it useful to understand.
@Cert_Study
@Cert_Study 3 жыл бұрын
this problem had me questioning what I've been doing learning to be a developer lol
@toyal10
@toyal10 2 жыл бұрын
The jump in difficulty took me hours to solve but i felt so happy when i did. Nice to watch others solution
@armanterrell7215
@armanterrell7215 3 жыл бұрын
Thank you for posting this video because this particular tutorial really threw me off!!!!
@aaaamontenegro
@aaaamontenegro 2 жыл бұрын
Thank you for your help! i somehown knew that this was a like a more real real programming problem, and i still have problems with the idea of using just value for example, i guess we can do it because it was listed before hand in the update records part, i am not sure. But seeing you use the JSON.stringify() and console.log has changed EVERYTHING FOR ME. Thank you again
@v3rbala
@v3rbala 4 жыл бұрын
Really appreciate you walking through this! Keep it up!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thanks for the kind words. I appreciate it.
@georgylistopad3976
@georgylistopad3976 Жыл бұрын
Hi Man , i just wanna say greatful thank you to this and other videos, sometimes it's difficult and when i'm stuck on smth like this, i can get help from your videos , cause i'm learning it solo alone tho, i wish you all the best and peace!
@chachacha1289
@chachacha1289 3 жыл бұрын
Thank you for this video. Though, the most difficult thing, and the key to solve this kind of problem, in my opinion, is to be able to guess what are the conditions we need to reach our goal. In this challenge, they give us the conditions, and it's already enough complicated., but the most interesting thing should be to get used to find the conditions for such kind of problem. (for example here one of them was: if( prop != tracks && value != "")
@muradqumizakis8428
@muradqumizakis8428 4 жыл бұрын
is it bad that for most of the challenges i have to resort to watching your videos or the video provided? seems like i can never figure it out on my own and always need the extra help. you've been very helpful by the way!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
It’s not bad. That is a good way to learn. Stay consistent and keep up the hard work Murad. Thank you for watching.
@spicyshizz2850
@spicyshizz2850 2 жыл бұрын
stuck like this rn
@kieranmandy9987
@kieranmandy9987 4 жыл бұрын
The answer provided on free code camp is pretty hopeless. Far beyond what most people going through this course are going to end up with and uses concepts not covered in the course by this point. Thanks for explaining a more beginner friendly method!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
This exercise is a challenging jump in complexity. Being able to break through the complexity and understand this solution is a true sign that you are improving Kieran.
@hatuey718
@hatuey718 4 жыл бұрын
Best video for this challenge thus far--nicely done.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you George
@Meko_J
@Meko_J 4 жыл бұрын
So I’m new to js. What I don’t get is how did it know that Id was the numbers and prop is artist or album and value is the artist name or album. I’m having a hard time understanding how the object knew the arguments were those specific things ... if that makes sense . Please help me understand.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
The function has the parameters in a specific order. We write the function so that it can access the object. function functionName(param1, param2, obj) { doSomething(obj[param1]); doSomething(obj[param2]); } objExample = { exampleKey1: exampleValue1, exampleKey2: exampleValue2, } This is a tricky one. If you've got the answer, but don't understand it exactly, it's not crazy to move on. You will learn this sort of stuff over and over again. On one hand, it's great to take your time and learn these concepts in great depth. On the other hand, it's good to avoid frustration by moving on and coming back to the subject later. Hope this helps! Keep up the learning. Thank you for the comment.
@SamsonSanusi
@SamsonSanusi 10 ай бұрын
Thank you so much for the tutorial. I had little challenge in executing my code. Only change code below this line function updateRecords(records, id, prop, value){ if (prop !="tracks" && value!=""){ records[id][prop]=(value); } else if (prop === "tracks" && records [id][prop] === undefined){ records [id][prop] =[value]; }else if (value === ""){ delete records[id][prop] } else if (prop=== "tracks"){ records [id][prop].push(value); } return records; } console.log(updateRecords, 5439, 'tracks', 'ABBA');
@SamsonSanusi
@SamsonSanusi 10 ай бұрын
It was really a big jump. I had been battling with this particular task for two day and i was tired to continue my learning. I love your tutorial
@dandy90
@dandy90 2 жыл бұрын
I don't get where "tracks" come from when he creates the array from " else if (prop === "tracks" && collection[id][prop] === undefined) { collection[id][prop] = [ ]; => "tracks" : [ ] } How????
@rika7291
@rika7291 4 жыл бұрын
this is so so so helpful.... Thank you so much!!!! appreciate your efforts on your videos.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching Rika.
@prince-k6586
@prince-k6586 Жыл бұрын
Great video. Why are we using records[id] as the selector when the current object name is recordCollection. thanks
@UsefulProgrammer
@UsefulProgrammer Жыл бұрын
Hummm… hard to recall from the comment section. If it worked in the video, there is probably a logical path to answer your question.
@aashishkharel7355
@aashishkharel7355 3 жыл бұрын
I did that challenge after watching this video. Thanks a lot bro.
@ponderporium3043
@ponderporium3043 Жыл бұрын
Hey how does your cursor provide you with which symbols are which, theres a little suggestion box on your cursor. EX: when your cursor hovers over the parameters it lets you know it is a parameter. is this an extention tool if so how do i turn it on?
@gabemegrelishvili5972
@gabemegrelishvili5972 4 жыл бұрын
12:50 the reason for that problem is because the 40th line end needed semicolon. if that would've been fixed, the code was done.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Ha! Thanks for the info.
@jayk2749
@jayk2749 2 жыл бұрын
I tried it using the semicolon and it still didn't pass.. Everything passed except for "After updateRecords(recordCollection, 1245, "tracks", "Addicted to Love"), tracks should have the string Addicted to Love as the last element."
@jayturkdagerk3380
@jayturkdagerk3380 3 жыл бұрын
I'm just a beginner but from my perspective I don't understand the reason for " prop != "tracks" ". from what I comprehend it seems redundant. Some feed back on this would be greatly appreciated. Thanks!
@jee_jenish6166
@jee_jenish6166 Жыл бұрын
How do i know whether i should use bracket notation or dot notation?
@guineaprof3459
@guineaprof3459 2 жыл бұрын
Thx I feel so lost doing this ! Any tips?
@atifnasimkhan9790
@atifnasimkhan9790 4 жыл бұрын
thanks for this video. I tried a lot of solutions but didn't work any. i learned from your video and used the same code as you explained in this video but there was a constant error that 5439 is not set. so I changed my function updateRecords(collection, id, prop, value) and passed the challenge.
@delissa6819
@delissa6819 4 жыл бұрын
Omg! Thank you for posting this! I couldn't figure out why it wouldn't pass!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Awesome.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Nice work Atif. Thank you for commenting and watching.
@moemia902
@moemia902 4 жыл бұрын
I can't seem to wrap my head around this or understand it at all. I feel my mind is numb after watching this 4 times and just ended up copying the whole thing just to pass the test without actually understanding it :// Any chance you have a video that explains this with metaphoric examples? THANKS
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Hummmmm.... That's a good idea, but did you go through the algorithms section?
@moemia902
@moemia902 4 жыл бұрын
Useful Programmer yeah been through the algorithms but can’t see any real world for this?
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Algorithms drive the world now. This is very real world.
@serenitybeats1677
@serenitybeats1677 4 жыл бұрын
Gosh I feel so dumb coding can be so confusing for me. I’m going to junior year of highschool and I’m thinking of majoring in computer science so I’ve been learning JavaScript on FCC
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
That's awesome that you're starting so early. I'm happy for you. We all feel dumb when learning to code.
@branlynmorales8951
@branlynmorales8951 2 жыл бұрын
Nice video, I was so lost.
@Clasped003
@Clasped003 3 жыл бұрын
Hi, i have a question. I am still working on this and got a lot similar to what you did. However, why is it that when you reference the object in the function you use the object name and not the variable parameter name but then you use the parameter names for the bracketed parts? Edit: i just realized the updated version i have has object as a parameter also for the function, which includes the objwct, that is why i am asking. Its not in this version you have filmed but any help on why that is would be great!
@sandeshkhatri6846
@sandeshkhatri6846 4 жыл бұрын
this is the most well explained video and i catch everything but got 1 question. in that delete statement. else if(value === ""){ -----> we got the value of tracks delete collection[id][prop]; -----> we havent target the value to delete specific one how will it delete tracks
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Sorry, I don't understand the question. Thank you for watching Sandesh.
@mohamedelhabibhedibi3757
@mohamedelhabibhedibi3757 2 жыл бұрын
At the time I'm watching this FCC have changed the code so inseatd of using the collection you must replace it with records hope that helps :)
@kimsy520
@kimsy520 4 жыл бұрын
This is a huge help. Thank you!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for the kind words
@amwostan6505
@amwostan6505 2 жыл бұрын
Thanks for this. It was exactly what I needed to get me going with this challenge.
@branlynmorales8951
@branlynmorales8951 2 жыл бұрын
Hi man, how is your study going? Did you get the job already?
@thomasjwilson7559
@thomasjwilson7559 4 жыл бұрын
hey, thank you so much!! i was really getting upset trying to solve this problem, lol.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you Thomas. Keep up the great work.
@bmac-cz6rk
@bmac-cz6rk 4 жыл бұрын
Everything else in the JS section was fine for me until I got to this lesson. Then I spent the 2nd half of my Monday trying to solve it, dreamed about the problem, woke up with an idea of how to solve it, which didn't work, then spent another few hours trying to solve this. Now I've finally resorted to asking for help. Glad I found this video!
@anamikagurung1560
@anamikagurung1560 4 жыл бұрын
Thankyou . I am really grateful for this video.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching Anamika.
@sandeshkhatri6846
@sandeshkhatri6846 4 жыл бұрын
same here :)
@scottisitt
@scottisitt 4 жыл бұрын
Really big thanks, man!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching Scott.
@sumitsinha995
@sumitsinha995 4 жыл бұрын
hey sir in last statement you should use 1245 in upadaterecords ,then the test will pass Thank you sir very helpful@@sumit
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Excellent.
@joecater894
@joecater894 2 жыл бұрын
im noticing some of these problems in codecamp.. the system fails to recognise as correct, even when my ans === solution. Quite a few I've had to skip over for that reason. Cheers for solution to this one.. this one is tough!
@aaronargottelopez3488
@aaronargottelopez3488 5 жыл бұрын
Thanks!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
You are welcome. Thank you for the kind words.
@CODWZ2
@CODWZ2 3 жыл бұрын
Hey man, I'm pretty unsure because of this video, could you please make it one more time with, couse it was an update at the freecodecamp and its make me crazy.. anyway thaks for doing all of these stuff for us. You are a geniuos
@OfficialJCUB
@OfficialJCUB 3 жыл бұрын
just replace collection with object and it should solve your problem
@RelaxingMusic-dp9nv
@RelaxingMusic-dp9nv 4 жыл бұрын
I am Knew and your videos are great an educational
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching.
@burnlastsunday
@burnlastsunday 4 жыл бұрын
I'm lost. The answer given in FCC is 4 short lines that never mention any songs or artists by name yet it passed. I'm beyond puzzled.
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Stick with it Burn. This struggle you’re feeling is a sign of purposeful practice. This is good. You are getting better. Keep it up.
@burnlastsunday
@burnlastsunday 4 жыл бұрын
@@UsefulProgrammer Yeah thanks. I guess I'm just getting used to how FCC does things. I'm doing OK considering two months ago I had never even heard of HTML or CSS. I'm starting late in life but hopefully this will bear fruit. I see now that taking info on from as many different sources as possible is the way to go... Learning is active, not passively having my hand held thru each exercise. It's good...my brain has been oatmeal for far too long.
@kudoreha8745
@kudoreha8745 Жыл бұрын
Hey man. I'm working on this exact one, and I still don't even understand it after going through this video with you, as I pause it and type. Yet, I still have 1 error, and I'm very certain I typed everything you did, step by step. I seriously need the help. Because this is insane compared to everything else. Can I contact you?
@emilpearce
@emilpearce 3 жыл бұрын
Great video! You've helped me a lot. SUBSCRIBED.
@MrWardo2009
@MrWardo2009 3 жыл бұрын
Thanks for the video!
@ShimmerBodyCream
@ShimmerBodyCream 2 жыл бұрын
thank you
@rohil3023
@rohil3023 4 жыл бұрын
Thank you!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching Rohil.
@conorfarrell8415
@conorfarrell8415 4 жыл бұрын
so helpful!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Your kind words are much appreciated Conor. Thank you for watching.
@larisaadolfokrupniakov3241
@larisaadolfokrupniakov3241 3 жыл бұрын
THANK YOU
@KevinTempelx
@KevinTempelx 4 жыл бұрын
Ty!
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Thank you for watching!
@nathanielcrooks6284
@nathanielcrooks6284 3 жыл бұрын
yo thanks man
@nomad8095
@nomad8095 3 жыл бұрын
what threw me off was the whole [prop][id] thing, i really can't put a finger on it.
@ashsjodin3487
@ashsjodin3487 2 жыл бұрын
...it's all about order....
@r9241
@r9241 2 жыл бұрын
you should update this.
@adnjoo
@adnjoo 3 жыл бұрын
so hard!
@3.0Hafiz
@3.0Hafiz 4 жыл бұрын
sir do u have facebook
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Yes. Here is the link to the facebook page: www.usefulprogrammer.org/facebook
@ramirorenteria7333
@ramirorenteria7333 2 жыл бұрын
Completely lost.....
@Eltopshottah
@Eltopshottah 4 жыл бұрын
This section is AIDS nice video though
@UsefulProgrammer
@UsefulProgrammer 4 жыл бұрын
Learn to love it. Thanks for the kind words.
Iterate with JavaScript While Loops - Free Code Camp
4:55
Useful Programmer
Рет қаралды 4,7 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 54 МЛН
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 41 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 126 МЛН
Counting Cards - Free Code Camp
8:39
Useful Programmer
Рет қаралды 10 М.
No, Einstein Didn’t Solve the Biggest Problem in Physics
8:04
Sabine Hossenfelder
Рет қаралды 173 М.
Understanding Recursion: A JavaScript Example
14:59
All Things JavaScript, LLC
Рет қаралды 31 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 560 М.
How to Learn to Code FAST (Do This or Keep Struggling)
11:00
Andy Sterkowitz
Рет қаралды 706 М.
ES6 - Create Strings using Template Literals - Free Code Camp
10:27
Useful Programmer
Рет қаралды 8 М.
Recursion in Programming - Full Course
1:51:36
freeCodeCamp.org
Рет қаралды 948 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 54 МЛН