type-of() 函数主要用来判断一个值是属于什么类型:
返回值:
>> type-of(100) "number" >> type-of(100px) "number" >> type-of("asdf") "string" >> type-of(asdf) "string" >> type-of(true) "bool" >> type-of(false) "bool" >> type-of(#fff) "color" >> type-of(blue) "color" >> type-of(1 / 2 = 1) "string"
你可以写出下面函数运行出的结果吗?
type-of(false) type-of(green) type-of(10 / 5 = 2)