2023 Javascript DataType _ Basic

Barry YU
Jan 7, 2023

複習

example :

const Barry ={

gender: ’female’ ,

hobby:’null’

}

console.log( barry.hobby)

console.log(ellen.birthday)

>null

>undefined

if your print is not exist ~

New : check date type

Typeof

let barryage = 39

typeof barryage

> number

let age = ‘ 39 ‘

typeof age

> string

How to In String to + Var

  1. use ( + )
  2. Template Literal 使用反引號 `

--

--