Okay, it is time for another hole here at Javascript code golf! We are doing another “the shorter the better” contest and here is what it must do:
Create a small program which; given a range and a number will tell us if the number given is within the given range. The range that the program should take is a mathematical range, where square brackets are inclusive and parentheses are exclusive. For instance, [9, 10) is any number larger than or equal to 9, but strictly less than 10.
Sample inputs:
[0, 100]:9 (1, 1):10 (1, 3]:2
Remember, the point here is to get the shortest code which outputs the correct answer. As with before we aren’t counting any characters that aren’t required to make the program work and you can output it in any manner you see fit.

New Topic/Question
Reply



MultiQuote





|