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 = [
- 20,
- ];
- const gets = this.gets || getGets(test);
- const print = this.print || console.log;
- let m = +gets()
- let km = m * 1.6
- let litersPer100 = 4.54 * 100/ km
- print(math.round(litersPer100), 'litres per 100 km')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement