본문 바로가기 메뉴 바로가기

Studying programming

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Studying programming

검색하기 폼
  • Jimin's Programming (194)
    • Algorithms (54)
    • JavaScript (16)
    • Vue.js (3)
    • Node.js (3)
    • React.js (7)
    • React Native (0)
    • Spring Boot (13)
    • JAVA (58)
    • C++ (17)
    • Programming (19)
    • Computer basics (4)
  • 방명록

javascript Type Conversion (1)
Type Conversion in Javascript (number, string)

Javascript는 type을 쓰지 않으니 원치않는 결과를 가질 때가 있는데 이럴때 아주 간단하게 형변환을 하는 방법이 있다. number + string type "" 은 number to string type conversion string * 1 은 string to number conversion Example code let arr = [1, 2, 3]; console.log(typeof arr); //datatype: object console.log(typeof arr[1]); //datatype: number let changeToString = (arr + "").split(","); //number + "": changed to string console.log(changeToStri..

JavaScript 2020. 9. 15. 16:47
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • math.abs
  • algorithm
  • rest parameter
  • 프로그래머스 알고리즘
  • hackerrank javascript
  • 프로그래머스
  • substring()
  • hackerrank solution
  • equals()
  • Javascript Algorithm
  • Object type casting
  • 프로그래머스 알고리즘문제
  • code refactoring
  • java
  • HashMap
  • hackerrank javascript solution
  • HackerRank Algorithm
  • string class in java
  • javascript
  • math.max
  • ... in Javascript
  • 알고리즘
  • C++
  • easy algorithm
  • compareTo()
  • spring boot application
  • Collection Framework
  • easy javascript algorithm
  • repeat()
  • hackerrank
more
«   2025/06   »
일 월 화 수 목 금 토
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
29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바