Question about an exercise

Hello, I would like to ask if by the Basic Algorithm Scripting part in your curriculum you have described how to sort numbers in an array and if not - why. If you have described it is my fault, I am going to check it and if not - why did I have to rewrite a hundred times my code and waste 1 hour in purposeless thinking, just to see that .sort() doesn’t actually sort numbers by their values and so pass the challenge. And am I supposed to complete this challenges by myself or by using the internet. And how to know if I am doing well or not?Thank you in advance.

I highly recommend being comfortable with using Google. Searching for information is a critical software development skill.

To your question on .sort() - I’m not aware of any particular challenge in that section that requires the use of .sort(). I’d be careful with .sort() since it modifies the original array, so it should only be used when you intend to permanently change the array.

You should be able to solve every one of these challenges without .sort(). If you choose to use methods not yet covered in the curriculum, then you will need to research how those methods work.

It can certainly be frustrating to spend a lot of time on a programming task because you misunderstand how a method or function works; it happens to professional developers all the time. This is why knowing how to Google reference materiel is a critical skill for programmers.

1 Like

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