when i run my html file with the script on the browser console.log does nothing. document.write works fine. In the broswer console console.log is working so I am confused. Thanks for your help for such a newbie question
console.log() never writes to a page as it’s mostly used for testing and debugging purposes so what you’re experiencing is normal. When using document.write() you have to deal with html formatting so console.log() or alert() is easier and quicker.