0
document.write writes directly to the page, overwriting all existing HTML.
Console.log writes to the console, does not display or affect the page
Use the search bar next time, Here are some similar discussions:
https://www.sololearn.com/discuss/1316935/?ref=app
https://www.sololearn.com/discuss/41600/?ref=app
https://www.sololearn.com/discuss/1144308/?ref=app
https://www.sololearn.com/discuss/519585/?ref=app
https://www.sololearn.com/discuss/271843/?ref=app
https://www.sololearn.com/discuss/2615520/?ref=app
https://www.sololearn.com/discuss/2887847/?ref=app
https://www.sololearn.com/discuss/1914381/?ref=app
https://www.sololearn.com/discuss/1024412/?ref=app
https://www.sololearn.com/discuss/25652/?ref=app
https://www.sololearn.com/discuss/262481/?ref=app
https://www.sololearn.com/discuss/843065/?ref=app
https://www.sololearn.com/discuss/1392847/?ref=app
https://www.sololearn.com/discuss/2740946/?ref=app
https://www.sololearn.com/discuss/2097089/?ref=app
https://www.sololearn.com/discuss/1316935/?ref=app