SHARE
TWEET

Untitled

a guest Oct 28th, 2016 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function aMinerTask(input) {
  2.     let resource = new Map();
  3.     resource.set("gold", 0);
  4.     resource.set("silver", 0);
  5.     resource.set("coppr", 0);
  6.     for (let i = 1; i < input.length -1; i+=1) {
  7.         if (i % 2 === 0) {
  8.             for (var [key, value] of resource) {
  9.                 if (key === input[i]) {
  10.                     /*ToDo change Value of resource key...*/
  11.                 }
  12.             }
  13.         }
  14.     }
  15.     for (var [key, value] of resource) {
  16.         console.log(key + " -> " + value);
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top