What is the β+" effect in the following?
var result = jQuery.trim(this.html2val(this.getValueJelement()[0].innerHTML)); result = +result.replace(/[^\d\.-]/g, '');
This is essentially a hidden way of forcing the right operand to a numerical value. For instance.
> +"42" 42
It converts the operand to a number. In other words, this is basically the same as saying result = parseFloat(result).
result = parseFloat(result)
+ais the fastest way to convert ato number.
+a
a