Make a function (named 'play') that takes a boolean (true or false) and returns the string 'y' (for true) or 'n' (for false)
Make a function that takes a number between 1 and 30 and returns 2 raised to the power of that number. (you can use ES2015 but nothing beyond that)
Make a function that takes a number n between 1 and 26 and returns the nth letter of the alphabet. For example play(1) would return 'a' and play(26) would return 'z
Make a function that produces an ASCII chessboard using # characters for the black squares and spaces for the white. The input of the function is a number giving the size of each square in characters. For example for an input of 2 the output would be "## ## ## ## \n## ## ## ## \n ## ## ## ##\n ## ## ## ##\n## ## ## ## \n## ## ## ## \n ## ## ## ##\n ## ## ## ##\n## ## ## ## \n## ## ## ## \n ## ## ## ##\n ## ## ## ##\n## ## ## ## \n## ## ## ## \n ## ## ## ##\n ## ## ## ##\n"
(note the trailing newline).
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
## ## ## ##
Make a function that receives a string containing commands (one per line) and applies them to a number (that starts as 0). The commands are add, subtract and mulltiply. So if you get the string "add 10\nsubtract 2\nmultiply 2"
the result would be 16.
Make a function that takes an array of two letter ISO country codes (eg ["GB", "US"]) and produces a unicode/emoji flag (eg ["๐ฌ๐ง","๐บ๐ธ"]). Only needs to support the ten countries in the core set: CN, DE, ES, FR, GB, IT, JP, KR, RU, US (๐ฎ๐น, ๐จ๐ณ, ๐บ๐ธ, ๐ช๐ธ, ๐ฉ๐ช, ๐ฏ๐ต, ๐ฐ๐ท, ๐ท๐บ, ๐ซ๐ท, ๐ฌ๐ง)