Math, asked by sg7718687, 6 months ago

predict the out put math.floor (-0.48);​

Answers

Answered by mad210203
1

Refer the attached image for the output.

Explanation:

Program:

//Assigning -0.48 to one variable

a=-0.48;

//Applying math floor function

b=Math.floor(a);

//Priting the output

console.log(b);

Output:

-1

Refer the attached image.

Reason:

  • The Math.floor() is a type of function available in javascript which returns the largest integer. It will be less than or equal to the given number.
  • This function takes only one argument.
  • Syntax is Math.floor(variable or number);
  • This function is available in java script.
  • Java script basically is a high-level language, just-in-time compiled, and multi-paradigm language.
Attachments:
Similar questions