mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
381 B
381 B
date | id | title |
---|---|---|
2020-09-29 | 8809980a-615d-453f-bc63-2f890fca03b8 | TypeScript primitive types |
Syntax
Number
var num: number
num = 123
num = 123.24
num = '123' / Error
String
var str: string
str = '123'
str = 123 // Error
Boolean
var bool: boolean
bool = true
bool = false
bool = 'tralala' // Error