Update getSet.js

refactored get method