MV Convert a string into a number

Hi,
I have a variable that contain a number (in string form), how can I convert it in a simple number so that I can do operations on it?

Ie. I have varX = "5" and varY = "5".
If I do varX + varY it turns out 55.....
So... I think I need to convert those variables into numbers...?
Hello!

Read this:
Thanks!
If needed I solved my problem with this call script (thanks to Dev_With_Coffee link):

var num = $gameVariables.value(x);
$gameVariables.setValue(x, (parseInt(num)))
Food for thought:

parseInt() is safer, but some other fun ways that would work for your example are:

Number(varX )

or simply

+varX

You can add your two variables with +varX + +varY (but don't do this, lol)

Original thread: https://forums.rpgmakerweb.com/threads/convert-a-string-into-a-number.136642/