Improved JavaScript #6