How can I debug JavaScript code using the browser’s developer console?

Can anyone please tell me how can I debug JavaScript code using the browser’s developer console.