What am I doing the JavaScript Basic for?

Hi there!
I recently started the JavaScript Algorithms and Data Structures Basic course and it’s going ok, I guess. The only issue I have (I really struggled to put it into a short title), and by any means this isn’t supposed to sound annoyed or arrogant or anything, is, that it reminds me a bit of school. I get this feeling of not being sure, what I am doing it for.
I understand that I have to learn the basics to do the fancy stuff, but maybe some of you can relate to this feeling, that I knew so well in school, where you just don’t see the use in real life (like I never knew what the heck I would need algebra or abstract stuff like that for in the real world) - like why do I need to know, how to let JavaScript tell me, what the first or last or 3rd to last letter of a first or last name is?
Can anyone understand my “problem”?
Might sound a bit stupid, but it’s mainly about staying motivated I guess. I struggle a lot, if I don’t see results or the function fast and I find this basic section quiet … abstract, even if I manage to somehow solve the tasks - compared to HTML and CSS where you see directly what you do, with JavaScript so far I’m asking myself the whole time what should have happened, or something like that.
If I’d know, what it’s for, besides learning the basics, and if all these weird little basic snippets will make a lot more sense later, I think it would be easier for me… hopefully :thinking:
Well anywho, I’d be super happy about some inspirational pep talk :smiley:
Thanks in advance!

JavaScript is for making websites do things, which HTML and CSS are for controlling how a website looks.

But the logic of manipulating a whole website is complex, so we start you off with more foundational steps that will help you do more complex things later.

I think everyone feels like you do.

Not just in learning Programming.

It can take time to understand why you needed to know something.
Hind sight is great, but when your learning you dont have any.
You cant even see the light at the end of the tunnel.

It can be very demotivating to try to learn something you dont see value in learning.
During these times I like to think of it as,
“I dont know why I’m learning this YET. But later, I will be grateful I took the time to go through it”

It can be a delayed reward.
I personally, hate learning XD
But I love the feeling I get when I’ve been stuck on something and I managed to get past it.
The eureka moments are incredible

For motivation I like to look back to how I was when I began learning,
before I even knew what a HTML tag was or where to put an attribute.

Compare where you are now to where you were at the beginning.

I think that is exactly why the updated version of the JS section will be project-based and more like how the new responsive web design section is.

There is theory and practice, the trick is to balance them. The current JS curriculum is algorithm based which tends to get abstract. It does teach the core language features but it can get hard to see “the forest for the trees”.

Sure you can use JS as a general programming language and teaching it as such is fine, but the real use of JS is on the web (sites/apps) so making that the driving force when teaching it makes a lot of sense.

You still have to learn the language and some of that has to be taught the way it is now. But overall, you can learn JS by applying it to what it was made for, the web.

I love this question! It is a very very common one, and it can be frustrating to feel “there’s no real reason for me to be learning how to <do this mundane task>, so why am I wasting my time on it?”

Back when, my wife and I were homeschool parents. And many of the folks I knew hated math, because when they’d been learning it in high school or whenever, they saw no point to it. For me, though, the process was the point. Learning to reason out solutions, learning to think critically, learning to try things and being willing to be wrong before you find the right way… These were valuable lessons.

They’re why, as a homeschool dad, I did teach my sons math. And grammar. And logic. And philosophy. And…

I do agree, the likelihood of your employer ever asking you to find the last letter of someone’s middle name is right up there with winning the lottery twice in a row, but is the issue “will they ask me,” or is the issue “how might I reason this out?”

A common fiddly bit is the whole “reverse a string” exercise. It is silly, it is tiny, it is pointless. But a few months back, I wrote a three-thousand word article about doing just that - in much the way Bach wrote inventions based off of a simple melody that grow in complexity but remain that simple melody, I wrote a few iterations of reverse a string that still remained a reversal of a string, but that became a far different, far more advanced technique. The melody stayed the same, but how I played it changed entirely.

It is not always about solving the problem in front of you. More often than not, it is about learning the critical thinking skills to solve the next thirty years of problems.

If you are looking for a more concrete explanation about “find the last letter of the name”: because much of the power of programming lies in manipulating data in bulk, and being able to sort through strings abstractly is key to that. Obviously you can just look at the word “Smith” and see that the last letter is S. But someday you may have a website that collects data from thousands of people, and you may want to code something that responds to them automatically with relevant personal information. Or maybe you want to look up every time the phrase “The next night” is used in a novel and see if there’s a pattern. Maybe you want to run a statistical analysis with data gathered from a web survey, but you need to fix the 8000 times people typed in numbers (“eighty-three”) instead of writing 83. You can do all that very quickly once you understand strings and RegEx. But you have to try it out on a few basic examples first.

What is it that you really want to learn?

Sometimes it can help to skip ahead and try something, like https://www.freecodecamp.org/learn/front-end-development-libraries/ for example. This uses JS but maybe more directly to build websites. I think it will be more relevant and eventually you might get to a point where you don’t understand something that you actually want to understand and need to dig a little deeper.

It’s like doing Machine Learning first, then learning the math behind it. When you learn math first (in school) you wonder why you would ever need it. But if you learn the practical first (Machine Learning) you will better understand how the maths click into place and see the use of it.

Gotta be careful. Skipping ahead too much can be really frustrating when you don’t know enough, or you could learn really bad anti patterns that hurt your understanding and slow down your learning.

Thank you so much everyone! :slightly_smiling_face: I would like to reply to eveything individually, there are so many good pints, but I’m a bit short on time for that.
It was so freaking helpful to read through your thoughts and it was exactly what I needed.
In theory I know I somehow need to get through the basics first, in order to get to the point, where I can do more advanced stuff. It’s like if you want to run a marathon but never ran before, you don’t start with running 10km every day, you have to start way smaller and walk probably a lot. But sometimes what you know in theory is not what your brain - or precicely: my brain - wants to do. So knowing I’m not the only one with these thoughts and reading that it leads to something practical was very helpful and very motivating!

Learning JavaScript basics provides you with a strong foundation for various purposes in the realm of web development and beyond. Here are some reasons why you might be learning JavaScript basics:

  1. Web Development: JavaScript is a fundamental language for web development. By learning JavaScript basics, you can enhance the interactivity and functionality of your websites. You’ll be able to add dynamic content, handle user interactions, validate form inputs, and create engaging user experiences.
  2. Front-End Development: JavaScript is primarily used on the front end to make web pages interactive. Understanding JavaScript basics allows you to manipulate the DOM, dynamically update content, respond to user events, and create visually appealing effects. It complements your HTML and CSS skills, enabling you to build robust and interactive web applications.
  3. Back-End Development: Although JavaScript is known for its role on the front end, it is also used on the back end through frameworks like Node.js. By learning JavaScript basics, you can extend your skills to develop server-side applications, build APIs, handle database operations, and create real-time applications.
  4. Career Advancement: JavaScript is one of the most widely used programming languages, and having a solid understanding of JavaScript basics can significantly enhance your career prospects. It opens up opportunities for front-end development, back-end development, full-stack development, and even mobile app development using frameworks like React Native or Ionic.

Once you start working on projects, you’ll get it.

The importance of the basics in learning anything cannot be overemphasized and skipping it could prove detrimental latter. One thing you can do is to try your JavaScript skills with real projects, try building an interactive landing page with HTML CSS and JavaScript or something else, use YouTube and try and understand why finding the last letter in a string is useful in actually building stuff. The FCC’s JavaScript curriculum is just like you said and one thing I wished I did when learning JavaScript was to build projects because when I was learning React it was quite difficult for me to grasp due to the fact that I understand the JavaScript but I don’t really know how to use it. Learning vanilla JavaScript (just plain JavaScript in building webpages without any framework or library) before react is quite helpful and I very much recommend it I believe that if you fully understand it, you can learn any JavaScript framework or library. In react we use destructuring to pass state as props from parent to child and if you didn’t understand destructuring in JavaScript it would be quite difficult to understand what’s going on. Believe me learning the basics is quite important and it would go a long way in making you a good developer but from what I’ve seen so far FCC doesn’t quite do anything besides teaching you the basics (my personal opinion tho especially in the JavaScript section) , you would find real life projects to apply those basics and improve your skills. I don’t know if what I’ve said was helpful to you or if I’ve given you any solution but keep on trying take a break sometimes go for a walk and come back to your code editor