Created
January 11, 2018 04:24
-
-
Save hrdtbs/f7ccbd95c8b791c211634c19c6edb969 to your computer and use it in GitHub Desktop.
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 obj = {key1: "value1", key2: "value2"} | |
const {[Object.keys(obj).pop()]:lastVal} = obj | |
console.log(lastVal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment