标签: javascript parseint
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function/
我需要Basic JavaScript指南 - 使用parseInt函数(在freecodecamp上)
答案 0 :(得分:0)
//You need to declare the function convertToInteger taking a string parameter //To declare a function, use the function key word and pass in your string parameter function convertToInteger(str){ return parseInt(str); }