Improved JavaScript #3