how to debug javascript step by step code example Example: javascript web development debugging //In code: console.log(theVariable); //Then in browser: F12