What does the ^ (caret) symbol do in JavaScript?

The ^ operator is the bitwise XOR operator. To square a value, use Math.pow:

var altura2 = Math.pow($('#ddl_altura').attr("value")/100, 2);

Leave a Comment