There should be exercises for beginners to build the actual code. Kind of like in first grade when you drill through adding and subtract through a bunch of exercises. Step by step.
Like FizzBuzz for example.
for (let n = 1; n <= 100; n++) {
let output = “”;
if (n % 3 == 0) output += “Fizz”;
if (n % 5 == 0) output += “Buzz”;
console.log(output || n);
}
It makes perfect sense when I see the code, but writing it on my own my head freezes. Sat for over 5 hours trying. The logic was there, correct code wasn’t, mainly because syntax blur, not seeing what goes where and how it’s supposed to be written.