将值转换为整数类型
输入值
转换失败时的默认值
转换后的整数
numberToInt('42'); // 42numberToInt('abc', 5); // 5 Copy
numberToInt('42'); // 42numberToInt('abc', 5); // 5
将值转换为整数类型