Last active
September 29, 2017 21:47
-
-
Save rbren/7456682591b0147c5a1b1c8b86d70be2 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
let hn = require('@datafire/hacker_news').create(); | |
(async () => { | |
let user1 = await hn.getUser({username: 'sama'}); | |
let user2 = await hn.getUser({username: 'pg'}); | |
let [more, less] = [user1, user2].sort((a, b) => b.karma - a.karma); | |
console.log(`${more.id} has more karma (${more.karma}) than ${less.id} (${less.karma})`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment