Here’s a roundup of how you declare each different type in JavaScript:
Strings
const name = String('Flavio')
const name = 'Flavio' //string literal
Numbers
const age = Number(36)
const age = 36 //number literal
Booleans
const male = Boolean(true)
const age = true //boolean literal
Null / undefined
const someProperty = null
const someProperty = undefined
(no literal syntax)
Symbols
const aSymbol = Symbol()
(no literal syntax)
Objects
const person = Object({
name: 'Flavio'
})
const person = { //literal
name: 'Flavio'
}