Last active
August 26, 2019 16:56
-
-
Save afontcu/b3e74ea4079a7868e5e9b5ba85e6ef33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function assert (actual) { | |
return { | |
equals (expected) { | |
if (actual !== expected) { | |
throw new Error(`${actual} is not equal to ${expected}`) | |
} | |
console.log(`${actual} equals ${expected}`) | |
} | |
} | |
} | |
// assert(add('0,1,2,3')).equals(6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment