I'm a web developer. If you're new to developing I would drill the fundamentals with simple algorithms or code exercises. You should get a good handle on loops, functions, variables, arrays, objects and if JavaScript, array methods and object methods.
Some examples to start on are to reverse a string, convert temperatures from Fahrenheit to Celsius, fizzbuzz. That should get you started. I collected some 50 exercises and drilled them over and over. I still go back and revise them.
I don't want to be condescending, because we need front-end/webpage developers, but the OP asked about SW Engineering. Your examples really don't apply to SWE. SWE is a bigger job than coding, whether it is front/back/full stack. See my post above.
I was very successful at SWE, but I had some advantages. BS in Comp. Science. MS in Mathematics. I taught Mathematics, at the college level, for four years. That MS was important. I could go into a business domain, which I knew nothing about, then figure it out well enough to design/develop the SW systems needed. That ranged from Digital Signal Processing (FFT), real time controls, Scheduling algorithms (NP Hard or NP-incomplete), to predicting potato harvests around Thanksgiving, Christmas, and the Super Bowl. That last one may sound strange, but Lay's Potato Chips uses Satellite imagery to predict potato harvests, just before those events.
If you want to be just a coder, that codes to the UseCase/Specs created by someone else, then just learn languages/stacks/devTools. Then have at it. Let someone else worry about Source Control, Testing, Product Releases, etc. Eventually, you will have to learn those last things, but you can do it on somebodies dime.
To be honest, I have a hard time recommending SW Dev or SW Eng to young people. I have seen too much, in thirty years, to believe those are paths to long-term job satisfaction or job security. COTS is crap, and integrating COTS is a nightmare. Have you ever had to manage the changing dependencies? How about managing the security risks.
But here is where I say, "Smart young men should avoid the SWE, at all costs!" The tech industry has been taken over by Diversity/Inclusion/Equity (I.e DIE)
For much of my career, I spent time as an interviewer of prospective engineers. I am pretty good at sorting the chafe from the wheat. In the last 10 years, at Raytheon, I watched HR being taken over by Black Women and Gays. I gave good interviews to even the most uninformed, just to see if I could teach them something.
My favorite tactic was to ask if you can have a memory leak, in a Java application. Many would just assume the GC would take care of that. Then I ask, when would GC fail? Most times, they had no answer. Then I point out something obvious. If A references B, and B references A, would GC collect those objects? Assuming nothing else reference A or B, then the answer no. I have done this test many times. If I see a light go on in their head, then they are teachable. So they are hireable. If the light stays off, send them away.
Back to avoiding DIE industries. At Raytheon, HR was taken over by black women and gay men. DIE was heavily enforced, but they did not have sway of a Male Like ME. My job was to get the best recruits and to protect my engineering teams from getting loser engineers. I pretty much succeeded. Firing a DIE hire was nearly impossible.
My best win was with a female graduate. She had a degree in CS, with a minor in Women's Studies. She failed the basic Java GC question, and I wrote her off. The black HR woman went berserk. SHE HAS A DEGREE IN WOMEN'S STUDIES! WE NEED HER! YOU HAVE TO RECOMMEND HER! I just laughed, and said this "She is an incompetent, and I am not going to poison an engineering team, with her presence. I won.
That was all nearly five years ago. Folks like me are leaving the industry, as fast as we can. Who knows what it is like, now?