본문 바로가기

개발스터디일지

검색하기
개발스터디일지
프로필사진 autumn_k

  • 분류 전체보기 (99)
    • 항해 99 (57)
      • TIL & WIL (51)
      • CS 스터디 (6)
    • 성장일지 (18)
    • 프론트엔드 (20)
      • html (1)
      • CSS (0)
      • Javascript (10)
      • React (7)
      • TypeScript (1)
      • python (1)
    • Github (2)
    • 자료구조 (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Tags
  • 에어비엔비
  • 인스타그램
  • 리액트
  • 카카오맵
  • 네트워크
  • 프론트엔드
  • til
  • WIL
  • 실전프로젝트
  • frontend
  • 파이어베이스
  • 미니프로젝트
  • Firebase
  • Ref
  • CS
  • 클론코딩
  • 알고리즘
  • Git
  • AWS
  • CS스터디
  • 리덕스
  • 항해99
  • python
  • react
  • javascript
  • 개발자
  • 프로그래머스
  • 자바스크립트
  • 에러해결
  • DoM
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Number (1)

개발스터디일지

[javascript] 숫자메서드 (number)

.toFixed() const num = 1.23456789 const result = num.toFixed(2) console.log(result) //1.23 console.log(typeof result) //string toFixed() 괄호 안에 들어간 숫자만큼 소숫점을 잘라준다. 하지만, typeof 로 확인해보니 원래 숫자였던 num의 값이 toFixed를 거치니 문자(string)이 되었다. 이를 다시 숫자로 바꿔주는 것이 바로 아래의 parseInt 이다 parseInt() const num = 1.23456789 const result = num.toFixed(2) console.log(result) //1.23 console.log(typeof result) //string const..

프론트엔드/Javascript 2022. 4. 5. 23:03
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바