How do I debug code?
I'm a relative newbie, when writing code, all debugging boils down to printing the result of a function to the console and comparing it (IN A HEAD) with the expected result
And something tells me that there are more civilized ways))
Please advise any articles on this topic.
To place the code, please use CodePen or similar tool. Thanks you!