- 1

is there any major difference btn document.write(), console.log() and return()?

21st Mar 2017, 5:18 AM
Kelvine De Danielo
Kelvine De Danielo - avatar
5 Antworten
+ 4
they're absolutely different,, document.write() is a function to display the arguments to the browser, while console.log() is to display the arguments to the console usually it used for debugging. while return, return is not function but its tell the function to spit the final value.
21st Mar 2017, 5:30 AM
Yuliana
Yuliana - avatar
+ 2
document.write write text in web page itself. console.log write s to browser console which is used by Developers for troubleshooting. Return is used to return control from function.
21st Mar 2017, 5:34 AM
Satish Gawde
0
thank you guys@Satish andYuliana....got it pretty well
21st Mar 2017, 5:43 AM
Kelvine De Danielo
Kelvine De Danielo - avatar
0
You are welcome brother. :)
21st Mar 2017, 5:44 AM
Satish Gawde
0
i'm just a beginner...@satish if it happens, i have a question to be answered by you, concerning coding....how do i find u?
21st Mar 2017, 5:55 AM
Kelvine De Danielo
Kelvine De Danielo - avatar