問題:
Given a string representation of a number, how can I convert it to number
type in TypeScript?給定數字的字符串表示形式,如何將其轉換爲 TypeScript 中的number
類型?
var numberString: string = "1234";
var numberValue: number = /* what should I do with `numberString`? */;
解決方案:
參考一: https://en.stackoom.com/question/zXk1參考二: https://stackoom.com/question/zXk1