fixed the bad practices in the javascript

Yes please thank you.