For a computer language, a reserved word is a word that cannot be used as an identifier, such as the name of a variable, function, or label. For other computer languages, keywords can be considered as the set of the language instructions.
Challenge
Using your language of choice, write a code in the chosen language that given a number between one and ten, 1<=n<=10
, outputs any n
reserved words (keywords) of the chosen language.
Specifics
- If the chosen language is case sensitive the outputted keywords must be also.
- If the chosen language is not case sensitive the outputted keywords can be in any case.
- If the chosen language has less than 10 keywords saying
p
, the code must output all the reserved words for anyn
betweenp
and10
. - If possible specify in the answer whether you consider operators as keywords or not.
Possible samples for Java (JDK10)
n=1 --> true
n=3 --> try new interface
n=4 --> continue this long break
Possible samples for ><>
n=1 --> >
n=3 --> > < ^
n=4 --> > < \ /
Possible samples for Brain-Flak
n=1 --> (
n=3 --> ( ) [ ]
n=9 --> ( ) [ ] { } < >
Rules
- The input and output can be given in any convenient format.
- No need to handle invalid input values, valid inputs are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- If possible, please include a link to an on-line testing environment so other people can try out your code!
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
continue this long break
I wish! That's why I'm on SE! \$\endgroup\$