0

is document.write method used only for strings?

document.write

9th Apr 2019, 12:05 PM
george kutubidze
george kutubidze - avatar
4 Réponses
+ 4
It's used for writing to the html document. Try numbers, objects(+ their methods) and let me know the result.
9th Apr 2019, 12:32 PM
Lord Krishna
Lord Krishna - avatar
+ 2
If you mean the parameter the answer is no. Yo u can "write" anything. //Example: document.write(Date()); If you mean when is used the method, it is used for testing only. When you call document.write() the HTML content is replaced.
9th Apr 2019, 12:33 PM
Nahuel Ourthe
Nahuel Ourthe - avatar
+ 1
thank you for your best answers
9th Apr 2019, 2:29 PM
george kutubidze
george kutubidze - avatar
0
I appreciate best explanations
9th Apr 2019, 2:30 PM
george kutubidze
george kutubidze - avatar