Created
October 19, 2018 09:26
-
-
Save jiristepan/f6fc70ed7e191897225099e9cbcec9eb to your computer and use it in GitHub Desktop.
Chicken egg problem solved by javascript
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
let question = ['π₯','π'] | |
let answer = question.sort() | |
console.log(answer[0] + ' was first!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One-liner:
console.log(['π₯','π'].sort()[0] + ' was first!')