Update index.js

change order to match write-up