위코드.JavaScript 4.String

younghyun·2021년 12월 29일
0
  • Number 데이터 타입 + String 데이터 타입 = String 데이터 타입
    console.log (
      “The length of Pepsi is “, ‘pepsi’.length
    )
    
    console.log(
      “The length of Pepsi is “ + ‘pepsi’.length
    )
    위에는 문자열, 숫자 구분되서 출력.
    아래는 문자열로 출력
  • length : 데이터 길이 구해줌
profile
선명한 기억보다 흐릿한 메모

0개의 댓글