1.

What is the purpose of the Math method toSource()?(a) Returns the string “Math”(b) Sends the source to the Math Library(c) Returns the value of the object(d) Returns an integer valueI have been asked this question in unit test.The origin of the question is Comparison of Core JavaScript versus Frameworks in portion Caching, Debugging and Animation of JavaScript

Answer»

Right option is (a) Returns the string “Math”

BEST explanation: The method Math.TOSOURCE() returns the string “Math”. But this method does not WORK with many browsers like IE. The toSource() method returns a string representing the SOURCE code of the object.



Discussion

No Comment Found

Related InterviewSolutions