Hello,
I found this code in a web page for calculating the BMI (Body mass index), which value is: Weight/Height * Height, the result on the web page is obviously wrong so looking at the code I´ve found this operator.
I supose they wanted to calculate the square of the height but this is not happening.
The web page is: http://www.loreal-paris.es/articulos/calcular-indice-masa-corporal.aspx
<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>