Commonly Used JavaScript Number Objects

Site: Philippine Science High School - MC - Knowledge Hub
Course: SY25.CS3.Web Development
Book: Commonly Used JavaScript Number Objects
Printed by: , Guest user
Date: Thursday, 7 August 2025, 9:50 AM

1. Introduction

         After completing this module, you are expected to use some of the Number Objects to manipulate data

          In programming, numerical values are considered “primitive” because they have no intrinsic properties. Imagine an integer whose only value is the numerical value that it represents. They are unlike strings and arrays who have other values and aside from the values that they represent. An example is the length property that is built-in for both string and array data types and the toUpperCase() method built-in for the string data type. Numbers have no such properties built-in for them. Programmers have to create separate functions or declare them as objects in order to achieve this.

          But in JavaScript, numbers are treated as objects, called the Number() object, thus allowing numerical data types such as integers and floats to have properties and methods. This module will discuss the different properties and methods available for the Number() object.

2. Number Properties


          These are values intrinsic to the Number() object.



  Number Methods




3. Summary and References


Summary

  • The Number object in JavaScript allows programmers to treat primitive values as objects that have their own properties and methods. 

References

JavaScript - The Number Object. (n.d.). RxJS, ggplot2, Python Data Persistence, Caffe2, PyBrain, Python Data Access, H2O, Colab, Theano, Flutter, KNime, Mean.js, Weka, Solidity’ https:// www.tutorialspoint.com/javascript/javascript_number_object.htm

Number. (2020, December 22). Number. MDN Web Docs. https://developer.mozilla.org/en-US/docs/Web/ JavaScript/Reference/Global_Objects/Number

JavaScript Number() Function. (n.d.). W3Schools Online Web Tutorials. https://www.w3schools.com/jsref/ jsref_number.asp 

JavaScript Set Date Methods. (n.d.). W3Schools Online We Web Tutorials. https://www.w3schools.com/js/ js_date_methods_set.asp