confirm(메시지 문자열)
boolean값을 입력받고 싶을때const input = confirm ('OO하시겠습니까?') alert(input)
*prompt()와 비슷
prompt(): 문자열을 입력받고 싶을때
confirm(): 불 값을 입력받고 싶을때
문자열자르기
const 한글 = '가,나,다,라,마,바,사,아'.split(',') console.log(한글)
'가','나','다','라','마','바','사','아'
문자열 자료형으로 변환하기
string(자료)string(true)
"true"
불 자료형이 문자열 자료형으로 변환됨
문자열 자료형으로 변환하기2
빈문자열 더하기+ ""
500 + ""
"500"
Vs code에서 터미널 열기 / 닫기
command + J