When you are designing your website, make sure that you do not use JavaScripts for your entire site design. Search engines crawl through websites to index them, thus excessive use of JavaScripts will cause crawling issues.
Another disadvantage is that JavaScripts do not work smoothly on mobile devices. You need to make sure the website is simple and easy to read for both users and search engines.