Update index.js

corrected variable reference.