lundi 31 juillet 2017

Javascript if statement not returning a value

I am trying to add a javascript code to display text on my website if the product price is over $35. I cannot get this if statement to return anything, can someone tell me why? This is at the bottom of an HTML file.

<script type="text/javascript">
$(function(){
    if (TRUE) {
        TRUESTATEMENT;
    }
    else{
        NOTTRUE;
    }
}
</script>

Aucun commentaire:

Enregistrer un commentaire