Csaba Kissi
Csaba Kissi

@csaba_kissi

13 Tweets 2 reads Jan 31, 2023
10 most useful Math methods in Javascript. 👇
1. Math.abs()
Returns the absolute value of a number.
2. Math.ceil()
Rounds a number up to the nearest integer.
3. Math.floor()
Rounds a number down to the nearest integer.
4. Math.max()
Returns the largest of zero or more numbers.
5. Math.min()
Returns the smallest of zero or more numbers.
6. Math.round()
Rounds a number to the nearest integer.
7. Math.random()
Returns a random number between 0 (inclusive) and 1 (exclusive).
8. Math.sqrt()
Returns the square root of a number.
9. Math.pow()
Returns the base to the exponent power.
10. Math.trunc()
Removes the decimal part of a number, leaving the integer part.
If you like this post, you can bookmark and tag it by replying with @SaveToBookmarks #javascript
You can view your bookmarks on savetobookmarks.com
That's all, guys.
If you found this list useful, consider:
✅ Follow @csaba_kissi for more content like this
🔔 Enable notifications 👀
🔄 Retweeting the first tweet.
Thanks for your support, guys! 🙏🤝

Loading suggestions...