let num: number = 10
let flag: boolean = true
let str: string = 'yingximu'
let un: undefined = undefined
let nu: null = null
let strs: string[] = ['ying', 'xi']
let nums: number[] = new Array(1, 2)
function sum(num1: number, num2: number): number {
return num1 + num2
}
const fun = (num1: number, num2: number) => num1 + num2
let person: {
name: string
age: number
sayHi: () => void
}
person = {
name: 'yingximu',
age: 18,
sayHi: () => {
console.log('function')
},
}