Home / Questions / What will the following functions return when executed?
Explanatory Question

What will the following functions return when executed?

👁 72 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

(i) Math.max(-17, -19)

  • Output: -17 (Since -17 is greater than -19)

(ii) Math.ceil(7.8)

  • Output: 8.0 (Math.ceil returns the smallest integer greater than or equal to the argument)