Math methods (round, floor, max)
Në shqip: Metodat e Math në JS
ShpjegimiSQ
Math.round() rrumbullakos, Math.floor() poshtë, Math.ceil() lart, Math.max()/min() gjejnë më të madhin/vogëlin, Math.abs() vlerën absolute. Math.max(...vargu) punon me spread.
EnglishEN
Math.round() rounds, Math.floor() down, Math.ceil() up, Math.max()/min() find the biggest/smallest, Math.abs() the absolute value. Math.max(...array) works with spread.
Si ta mendosh
Si butonat e kalkulatorit shkencor.
Lexoje në anglisht
Like the buttons on a scientific calculator.
Shembull kodijavascript
Math.floor(4.7); // 4
Math.ceil(4.1); // 5
Math.max(...[3, 9, 2]); // 9