So I’m on the basic algorithm scripting section of javascript and as this section has no real instructions to the problem like previous challenges am I supposed to be able to figure this stuff out by now? I’m struggling with these and have basically been looking up the answers and hints and trying to understand how it works but haven’t been able to solve any but maybe one of them by myself so far. Is this normal that this section feels so difficult?
Instead of just trying to write code to solve these algorithm challenges, you need to try to write out the algorithm (on paper or typed out in a word processor) first. This means writing out the step-by-step process you think your solution would need to follow to correctly solve the problem. Before writing any code, you look at the test cases and what values they should return and walk through your steps to validate your algorithm would do that.
After all of that, you are now ready to try writing some actual code. 95% of the Basic Algorithm section challenges can be solved with methods/syntax you learned in the Basic JavaScript section. This means you may have to review a few things in those sections and/or use a search engine to discover what syntax/methods you would need to use to fulfill the requirements of your algorithm.
If you get stuck, instead of looking at the solutions immediately, click the Ask a Question button which will populate a new forum topic with any code you have written and either tell us what you are having trouble understanding (if the instructions are not clear to you) or show us your current written algorithm and let us confirm you are on the right track, or if you have the right algorithm and are struggling with a certain section of code syntax or logic, tell us what you are expecting a certain part of your solution to do which it is not. We will then attempt to guide you to a solution you can call your own.
As a last resort or after you have solved the challenge, take a look a the solution(s) to see other ways of solving the problem.
Working through algorithm problems is probably the hardest thing to master. It takes lots of practice working on other algorithm problems. Over time with enough practice, you will start to recognize patterns in problems and be able to quickly recognize a general approach. The key here is that it takes lots of practice. Some users already have some programming background with another languages, so they make work through them faster than others. Most people do struggle through the first half of the Basic Algorithm section and then get more comfortable as they progress through more of them.