parseInt 和 parseFloat 实现字符串转换为数字

age = '18' 

a = parseInt(age)

b = parseFloat(age)

猜你喜欢

转载自www.cnblogs.com/my-love-is-python/p/9291432.html