Section 12: Numbers, Dates, Intl and Timers

Jayden·2021년 3월 28일

JavaScript Studying

목록 보기
11/11
  1. Converting and Checking Numbers



  2. Math and Rounding

sqrt is square root( 제곱근)

1부터 6까지 랜덤

Math.trunc(23.3) 결과 23
소수점 없앰
Math.round(23.3) 결과 23
Math.round(23.9) '' 24

Math.ceil(23.3) '' 24
소수점이 존재하면 무조건 올림

Math.floor(23.3) 무조건 내림
also type coercion

So basically floor and trunc, both cut off the decimal part when we are dealing with positive numbers.

However, for negative numbers, it doesn't work this way.

Math.trunc(-23.3)); -> -23

Math.floor(-23.3)); -> -24

  1. The Remainder Operator

  2. Working with BigInt

  1. Creating Dates


  2. Adding Dates to "Bankist" App

  1. Operations With Dates
    15min

  2. Internationalizing Dates (Intl)
    17min

  3. Internationalizing Numbers (Intl)
    19min

  4. Timers: setTimeout and setInterval
    14min

  5. Implementing a Countdown Timer

profile
G'day mate!

0개의 댓글