Thanks brother i already have a good understanding of js i just want to refine my skills.
I think just that. If you know a programming language that’s almost good enough to start. Knowing some basic discrete math also helps a ton (for example to know why running two loops searching for every combination of pairs take
n choose 2 work, or O(n^2). But knowing the math is not a strong prerequisite to just start.
You will want to start thinking about how much things cost in terms of runtime (and space too) in that language. For example: basic loops, nested loops, loops that don’t go through every item, array insertion at different points of the array, etc.
You should look up some DSA curriculum and see what they start out with.
A very beginnger friendly text is: Grokking Algorithms
CLRS introduction to algorithms is the standard reference text, and although very good, it might be a step up in difficulty if you’re not used to the formal style of writing and more rigorous approach to math.
Once you get more comfortable to the ideas you could check some online courses that talk about this, but be forewarned it does get hard fast.
Find some community that likes to study these and ask around (you’ll often find some for people trying to interview into a software engineer role). Discord can be great for that kind of thing.