Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getGets = (arr) => {
- let index = 0;
- return () => {
- const toReturn = arr[index];
- index += 1;
- return toReturn;
- };
- };
- // this is the test
- const test = [
- 'a',
- 1,
- ];
- const gets = this.gets || getGets(test);
- const print = this.print || console.log;
- let label = gets();
- let rank = +gets();
- if(label==='a' || label==='c'|| label==='e'|| label==='g')
- {
- if(rank % 10===0)
- {
- print('light');
- }
- else
- {
- print('dark');
- }
- }
- else if(label==='b'|| label==='d'|| label==='f'|| label==='h')
- {
- if(rank % 10===0)
- {
- print('dark')
- }
- else
- {
- print('light');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement