Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Problems regarding Javascript

$
0
0

May I ask what does this function mean? Especially for the part "arguments.length !=3" that I do not understand.

I actually would like to get a message of "Sorry" if this function returns False and "Thank you" if it returns True. What will be my coding like?

Thanks.

function reserve(date, time, no) {
  if (arguments.length !=3) {
    alert("incorrect arguments detected");
    return;
  }
  if (Math.floor(Math.random()*2) == 0) return false
  else return true;
}

Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>