Javascript #7 Numbers : #Latest #2023 #javascript #codinginhindi #advancedprogramming #tutorial

preview_player
Показать описание

In JavaScript, numbers are a primitive data type used to represent numerical values. Here are some important facts about JavaScript numbers:

JavaScript numbers can be integers or floating-point numbers (decimal numbers).
There is no separate data type for integers in JavaScript. All numbers are represented as floating-point numbers, even if they are whole numbers.
JavaScript numbers can be positive, negative, or zero.
JavaScript numbers can be created by writing a number literal, such as 5, or by assigning a value to a variable, such as var x = 5;.
JavaScript provides several arithmetic operators for working with numbers, including + (addition), - (subtraction), * (multiplication), / (division), and % (modulo, or remainder).
JavaScript has a special value called NaN, which stands for "not a number". This value is returned when a mathematical operation results in an undefined or unrepresentable value.
JavaScript also has two special values for representing positive and negative infinity: Infinity and -Infinity, respectively.

Рекомендации по теме