3rd task for javascript corrected

wrong previous commit of the 3rd task