+ 2

Sololearn or encode

I am learning js in sololearn, but when opened js in encode it was different i. e to print something we us documents. Write in sololearn and in encode we us log,,, now wich is write

24th Sep 2017, 12:37 AM
Rohan K M
Rohan K M - avatar
1 ответ
+ 5
Both is write But document.write() is used for to write text inside <html> (equal to document.documentElement.innerHTML+="text") But console.log() just for write to console console.log() is Mostly used to test something little
24th Sep 2017, 3:31 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar