So for the last one and half a month, I've been trying to learn JavaScript to do something better than an outdoor job in the future, however the matter gets more and more depressing as the things go. For this purpose, I've bought a course on Udemy and have been following it. While I learnt HTML and CSS through the same way and really enjoyed learning them (albeit I've been lacking practice for the last few weeks), I can't really understand JavaScript and get frustrated every time I'm trying to do something on my own.
Honestly, I don't like coding JavaScript really. If this was an ideal world, I'd just be content with what I know about CSS and HTML and probably do some designs to make a living. But this isn't an ideal world and I really grew tired of this. I don't want to abandon coding either because however much I hate it, it gives me a better deal than what I can find outside.
And like this, I'm pretty confused and am feeling miserable right now.
Videos
I cannot get JavaScript for the life of me. I've done 9,000 tutorials--codecademy, freecodecamp, Lynda, and more, but when I sit down to write JS, I can't even write a basic addition function without screwing it up.
I'm a senior in computer science, I can write Kernel modules, I can handle assembly, HTML/CSS/PHP are a piece of cake.
I've spent over twenty hours on JS, and I just can't understand it for crap. I keep trying to code my own things and I just fall over and over.
Any ideas?
I find it hard to believe that you find PHP a piece of cake but can't make an addition function in JavaScript, given that you can literally write the exact same code to make it work:
function add($a, $b) {
return $a + $b;
}
Of course, that's not to say that the two are very similar (and you shouldn't name variables like that in js), but the core syntax at a beginner level does have many similarities. After that it's just about learning to program in a general sense, and getting used the syntax of one language vs the other is less of a problem.
Anyway, it's hard to give any useful hints because you're not giving us anything to go on (other than claims that seem unlikely at best). Give some specific questions, some specific problems that you don't know how to solve. Since you claim you know php, show how you would solve the problem in php and where you're tripping up in javascript by comparison.
What's there to understand? A function in JS is exactly the same as one in PHP. You're not making any sense.
I know this is gonna end up more of a vent than anything else but I'm so lost. I'm currently in week 2 of a fullstack bootcamp. It's an interesting setup because my employer is sending me and paying for everything, and then once I finish I can transition to software developer at the company. It's a really sweet opportunity, and meant for people from non-traditional backgrounds to get into tech. Well, I knew I had to prepare myself for the fast pace and normally I'm good with it and knew this was going to be a challenge for me, but I'm so lost and just feel like I'm falling behind every day.
My instructors are pretty good and helpful, but I feel like I have to ask for help every step of the way so I'm not actually retaining anything. I can do a lot of the basic stuff, but once I get to the harder problems I spend hours on something that should be so simple. I've started looking at outside resources but just can't seem to put what I'm reading/watching into practice. It seems like everyone else is getting this stuff (idk if that's true or just me being insecure and comparing to others haha).
I've been struggling with functions ever since we started learning them and now we're getting into nested arrays and forEach and map and I don't even know where to start. I understand the point of functions and looping and what they are used for. When it's being explained I understand what is happening. But actually creating my own I just can't solve. For example, a questions like these:
Create a function named boats that takes in our array of boats, and returns item name and its index number in a formatted string.
Create a function named addAlphabetically that takes in our array of boats and a new boat type and returns an array of boats with that new item, sorted alphabetically.
By looking up on substack or other resources I feel like I'm just going deeper down a rabbit hole every time.
I know this a great opportunity that very few people get so I really don't want to mess it up. I also know spending 10-12 hours on my computer trying to figure out three questions is going to burn me out so I don't know what to do. I guess my question is- does anyone have any ways/resources that really helped them build functions?