在我的javascript变量中,根据input字段中给定的输入,我将获得"abc"、"123"或"123.456"形式的值。对于所有值,类型都是string,即使输入的值是number或float。 typeof(variable)总是给string。 以下方法将在每个keydown上触发。我还使用了lodash库 convertMethod(val) {
console.log(round(val,2).toString()) //round is a lodash method which is imported alrea
isFinite(5) // true - makes sense to me, it is a number and it is finiteisFinite(Infinity) // false - makes sense for logical reasonsisFinite(documentisFi