Basic algorithm scripting course question

Hi guys,
So I have reached to basic algorithm part, my question is, I have like sort of an idea how to solve a challenge, but not sure how implant it or some parts are missing in my head how to solve it, question should I just use google? google can give me full answers but on the other hand I feel like if I haven’t solved alone then something is missing, but on the other hand I use google because something is missing… any advice? Thanks.

As to “looking things up”, it depends what you mean. If you mean details like, “Oh crap, what does push return?” or other details of the language, then absolutely, 100% look it up. Developers are looking up things like that all the time. 100%. MDN is a great resource for JS.

But I would avoid looking up how to do the actual algorithm.

Maybe if you could provide an example, that would help.

lets say in this challenge all I have now is that iterate between the letters,
for (let i = 0; i < str.length < i++ {} the next step that I think about is how to connect them to make it a word, and then go from there and I 'm already lost lol

So you’re trying to remember the right method to combine an array of strings into one big string?

Yeah, that is what I would call a “language detail”. You should 100% look that up if you need to. That is the kind of thing you will eventually remember because you use it so many times, but yeah, if you need to google that, then don’t hesitate.

If I were at that point and I couldn’t remember the method to use, I’d google “mdn array methods”, and look for the right method. Heck, I probably looked up that exact method a few times when I was learning.

google is a developer’s best friend.

Vaguely, I dont know exactly what I need just ideas in my head sometimes not sure what to search for.

Another question, why did you ask “array of strings” when they are not arrays.

I was just inferring what you were trying. Maybe I was wrong. But yeah, if you can’t remember language details, then google them. I do it all the time, all developers do. There’s too much to memorize.

so what do you mean by that?

If you are working on an algorithm for sorting a binary tree, don’t google “binary tree sort in JavaScript”.

You don’t want to Google ‘how to find longest word in string’. But it’s totally reasonable to Google ‘split string by spaces’.

1 Like

Sorry, I didn’t look at the exact challenge so some of my answers may have confused the OP. Fortunately Jeremy came to the rescue.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.