JavaScript Numbers

number is a data type in JavaScript that represents numeric values.

2 June, 2024

99

99

1

Contributors

Numbers in JavaScript are used to do all kinds of calculations and represent numeric values

  • we can use numbers to do things like addition, subtraction, multiplication, and division.
we can write numbers in JavaScript without quotes " " or ' '
let  myAge = 22; //integers
let myHeight = 5.8 // decimale

There are two types of numbers

  1. floats
  2. integers

Basic math with numbers using operator ( + , - , / , * )

let addTwoNumbers = 2 + 1 //addition operator +
let subtractionNumbers = 2 - 3 //subtraction oprator -
let multiplyNumbers = 2 * 3 // Multiplication oparetor *
let divisionNumbers = 6 / 2 //Division oparetor /
let remainderNumbers = 6 /2


math using numbers and variables

let x = 12
let y = 2

let sum = x+y

consloe.log(sum)
Numbers are a fundamental part of programming, and with these basics, we can do maths or create programs etc


99

99

1

Arnob
i build web apps

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2025. Showcase Creators Inc. All rights reserved.