While it may appear to be a simple question, my attempts to find relevant results have been fruitless due to Google search being case insensitive.
Consider the following code snippet:
items[5] = "5\,5"
totalAmount: number = 5
totalAmount = totalAmount + Number(items[5].replace( "\\,", "."));
My IDE is indicating that I cannot apply operands to type 'number' and 'Number'. My efforts to convert a string into a number only led me to the aforementioned solution, which unfortunately does not solve my issue. How can I successfully convert a string into a numerical variable?