Last active
June 3, 2018 10:36
-
-
Save WaldoJeffers/29602e99ea3a8a07c0c1a419b49fa71d 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
const toObj = (key, value) => ({ [key]: value }) // toObj('hello', 'world) === { hello: 'world' } | |
const countOne = name => toObj(name, 1) // countOne('Tatooine') === { Tatooine: 1 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment