Created
January 8, 2019 19:48
-
-
Save seemcat/30eef1e44ecf861b04bc041c5faf997d to your computer and use it in GitHub Desktop.
c0d3 solved in JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const solution = (num1, num2, func) => { | |
setTimeout(() => { | |
func(); | |
setTimeout(() => func(), num2); | |
}, num1); | |
}; | |
// Test by checking to see if console.log's | |
// are being printed out accordingly. | |
const testFunc = () => console.log("hello"); | |
console.log('test: ', solution(200, 1000, testFunc)); | |
module.exports = { | |
solution, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment