JavaScript奇技淫巧
/* 进行判断赋值 */
let status = file ? "success" : "fail";
/* 变量转换 */
let myVar = "3.14159";
let str = ""+ myVar; // to string
int = ~~myVar; // to integer
bool = !!myVar, // to boolean
/* 进行判断赋值 */
let status = file ? "success" : "fail";
/* 变量转换 */
let myVar = "3.14159";
let str = ""+ myVar; // to string
int = ~~myVar; // to integer
bool = !!myVar, // to boolean