Category: 03. Data Types
-
Javascript Math
In JavaScript, Math is a built-in object. It has both properties and methods for mathematical functions and constants. Math operates with the Number type, but never with BigInt. Unlike other global objects, Math is not considered a constructor. The methods and properties of Math are fixed. You can call them by applying Math as an object without creating it. So, you refer to constant pi as Math.PI. Hence,…
-
JavaScript Numbers
Two types of numbers can be highlighted in modern JavaScript: Regular and bigInt. Regular ones are stored in the format of 64-bit IEEE-754. It is also known as “double-precision floating-point numbers”. Developers use these numbers most in their practice. BigInt numbers are used for representing integers of arbitrary length. We only use them in a…
-
JavaScript Methods of Primitives
In JavaScript, it is possible to work with primitives (numbers, strings, and more), as if they were objects. But, of course, there are notable differences between objects and primitives. So, primitive is a primitive type value. Seven types of primitives exist, among them are: number, bigint, symbol, string, boolean, null and undefined. An object can store multiple values as properties. You can create an object using {}. For example: Other kinds…