Yea, "+" followed by any data type coerces it into Number data type. Also, using "-" followed by the data type coerces it to the negative of the Number. Point to note is that this does'nt work with other operators like *, /, %.
Thank you for letting me know about this feature! Learnt something new today π.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
simplest way to convert a string to a number just add + in front of the string eg:
+"3"
Yea, "+" followed by any data type coerces it into Number data type. Also, using "-" followed by the data type coerces it to the negative of the Number. Point to note is that this does'nt work with other operators like *, /, %.
Thank you for letting me know about this feature! Learnt something new today π.