HTML    CSS    PHP    Bootstrap    JavaScript    Flash    Dev Tools      

Math Objects in JavaScript - Part 1

Current Time:   00:00 / Total Time:   00:00

Seek Bar Volume

Do you have a question or comment on this, or any tutorial Contact Support

We are always looking for input on our tutorial content. If you have a suggestion, comment, additional information on this topic that you feel should be added, drop us a line. We appreciate your input.

Title: Math Objects in JavaScript - Part 1

Category: JavaScript
Topic: Essential Training
Publish Date: 2016-04-24
Views: 189
Author: Mike King


In this tutorial we are begin our discussion on the Math Objects in JavaScript. In Part 1 of our 2 part series we begin our discussion with a presentation on the Math Object and then move into demonstrating the Math.round method in JavaScript. We demonstrate the Math.ceil method and the Math.floor methods that are used in JavaScript. Math floor rounds numbers down to the nearest whole integer and math ceil rounds number up to the nearest whole integer. We also demonstrate the use of the square root method in JavaScript. We also demonstrate how to fix the amount of decimal places that are displayed in our responses. Using the toFixed method we demonstrate how to fix the number of decimal places in a response.