🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

जब किसी arithmetic computation में अनिश्चित (indefinite) या अनंत (infinity) value आती है, तो JavaScript क्या दिखाता है?

When there is an indefinite or an infinity value during an arithmetic computation, what does JavaScript do?

A
Prints an exception error
B
Prints an overflow error
C
Displays “Infinity”
D
Prints the value as such
Explanation

जब JavaScript में किसी गणना (calculation) का परिणाम बहुत बड़ा या अनिश्चित होता है, तो वह उसे "Infinity" के रूप में दिखाता है।

Ex-

javascript
 
let x = 1 / 0; console.log(x); // Output: Infinity

In English:
When an arithmetic computation results in an indefinite or infinite value, JavaScript displays it as "Infinity".

Correct Answer: C) Displays “Infinity”

Latest Updates