hi there i am new in javascript... i have a code here that doesn't work, can someone help me out?
<script type="text/javascript">
var d=new Date();
var h=d.getHours();
if (h>22){
document.write("it is less than 10");
}
else{
document.write("it is after 10");
}
</script>
it doesn't matter if you switch the > to a < it will always output "it is after 10"... what is the deal here
Bookmarks