html Throwing Code at the Bugs - Tips

Throwing Code at the Bugs - Tips

Don't be afraid to get a little messy!

When debugging, sometimes you just need to throw a few lines of code at the bug until it cries uncle.

Here are some tips to help you in your mission to eradicate the bugs:

Tip 1: Print everything!

Use `console.log()` like it's going out of style.

Let the universe know what's going on, even if it's just a simple variable assignment.

Tip 2: Use the power of the human eye!

Avoid using fancy-pants debugging tools, they'll only confuse the bug.

Use your eyes to scan the code, it's like a game of 'spot the error'.

Tip 3: Make it worse before it gets worse!

Introduce a new bug, just for the sake of it.

This will give you a new perspective on the original bug, and you might just find the fix.

More Tips:

Or, if all else fails:

Just Call it a night.