Created
March 18, 2018 03:32
-
-
Save lwhorton/126471c4e299d0800c25dd5872ddb5f6 to your computer and use it in GitHub Desktop.
why-clojure#5.clj
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
| // optimizing this code: | |
| function unusedFunction(note) { | |
| alert(note['text']); | |
| } | |
| function displayNoteTitle(note) { | |
| alert(note['title']); | |
| } | |
| var flowerNote = {}; | |
| flowerNote['title'] = "Flowers"; | |
| displayNoteTitle(flowerNote); | |
| // rollup turns it into | |
| function displayNoteTitle(note) { | |
| alert(note['title']); | |
| } | |
| var flowerNote = {}; | |
| flowerNote['title'] = "Flowers"; | |
| displayNoteTitle(flowerNote); | |
| // and Google Closure Compiler turns it into | |
| alert("Flowers"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment