1.

For testing we should use ________(a) document.write()(b) console.log()(c) window.alert()(d) innerHTMLThe question was posed to me in an interview.My enquiry is from Essential JavaScript and jQuery in division HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Correct option is (a) document.write()

To elaborate: For TESTING we USED document.write() in JavaScript. If we use document.write() after HTML document, it will DELETE all existing HTML. This method can only be used for testing purposes.



Discussion

No Comment Found

Related InterviewSolutions