I'm having an issue with this basic conditional statement..
When the var equals 9 then the script works but once hits 10 and above it refers to "running low" which is only for the number 5 and below...please help..
Thank you.
<script type="text/javascript">
var inventory = "9";
if( inventory == "Sold Out" ){
document.write("<b>Sold Out</b>");
}else if( inventory >= "6" ){
document.write("<b>more than 5</b>");
}else if( inventory <= "5" ){
document.write("<b>running low</b>");
}else{
document.write("<b>error</b>");
}
</script>