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

I have some JavaScript code:

<script type="text/javascript">
$(document).ready(function(){
  $('#calcular').click(function() {
    var altura2 = ((($('#ddl_altura').attr("value"))/100)^2);
    var peso = $('#ddl_peso').attr("value");
    var resultado = Math.round(parseFloat(peso / altura2)*100)/100;
    if (resultado > 0) {
      $('#resultado').html(resultado);
      $('#imc').show();
    };
  });
});
</script>

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

Answer

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

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