有没有什么技巧可以在不使用任何函数和方法的情况下在javascript中将字符串转换为整数?
var s = "5"
console.log(typeof(s)) // out put is string
console.log(typeof(parseInt(s))) // i want out put which is number with out using parseInt() or other functions for optimizing code.Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激。提前致谢。
javascript ×1