Need help with the Basic Algorithm Scripting Module (Javascript)

I’m having a hard time understanding the Basic Algorithm Scripting module on the “Javascript Algorithms and Data Structures” course. I just want to know how I should go about thinking about the material and if there is any specific point in the lesson that I should look back to help me understand the material. I feel like I’m not confident in initialize the functions and working with array’s, and I don’t want to rely on the hints to heavily

Welcome to the community Binny!

Well, regarding that, every lesson is designed to help you hone your problem solving skills and concept understanding. Also, it is important to do research about some processes you never seen before in order to grasp it.

For example, if you want to be fit, you must go to the gym and exercise every day. In order to be proficient in a skill, you must practice. Otherwise, you won’t see the results.

Hope it helps. Good luck!

1 Like

Hi @Binny !

Welcome to the forum!

My advice would be to start by solving the problem without code first.

Write down the steps you would take to solve the problem without worrying about the code.

Then slowly go through each of those steps and translate that into code.
That is where google and documentation come in.

For example, one of the problems is to reverse a string.

First think about how you would solve that as a human and not as a computer with code.

Well, you would first start at the end of the word, grab the last letter, and place it at the beginning of the new reversed word.
Then you grab the second to last letter and place it at the end of the new reversed word.

You keep repeating the process until you run out of letters and have successfully reversed the word.

Then you take our algorithm we just wrote and slowly convert that into code.

If you get stuck, then try searching through documentation for methods to help you or come to the forum for help.
If you present us with your written algorithm and the code you have tried so far, then we can help you troubleshoot from there.

Hope that helps!

1 Like

If you are a beginner then this isn’t surprising and probably expected. Working on the algorithms will help you gain confidence. Yes, you will have to go back through previous lessons to refresh your memory or use the googles to find out how to do things. This is a very normal part of programming. Trust me, even the professionals are constantly googling because no one can remember everything.