1.

How do you find the number with the highest value of x and y?(a) ceil(x,y)(b) top(x,y)(c) Math.ceil(x,y)(d) Math.max(x,y)I had been asked this question during an interview.This interesting question is from Comparison of Core JavaScript versus Frameworks topic in section Caching, Debugging and Animation of JavaScript

Answer»

Right OPTION is (d) Math.MAX(x,y)

To ELABORATE: max FUNCTION is used for comapring and finding maximum values. It is found in the math library. Math.max(x,y) is used to find the highest value of x and y.



Discussion

No Comment Found

Related InterviewSolutions