filmov
tv
JavaScript program to Square Root of Different Data Types

Показать описание
const number1 = 2.25;
const number2 = -4;
const number3 = 'hello';
Output
The square root of 2.25 is 1.5
The square root of -4 is NaN
The square root of hello is NaN
If a negative number is passed, NaN is returned.
If a string is passed, NaN is returned.
const number2 = -4;
const number3 = 'hello';
Output
The square root of 2.25 is 1.5
The square root of -4 is NaN
The square root of hello is NaN
If a negative number is passed, NaN is returned.
If a string is passed, NaN is returned.