Google uses a Googlebot spider for Smartphones to crawl your mobile website. You can see the types of Googlebots crawling you website in Google Search Console in the setting section. If your website is mobile responsive, there are high chances that Googlebot for Smartphone has the highest crawl percentage. Other Googlebots include for Desktop, Image, Ads, Video etc.
If Googlebot for smartphone crawls your website and finds that Javascripts are blocking it, then it will not index it. If your mobile pages are not indexed then this will affect your mobile search rankings.
In its Technical Webmaster Guidelines, Google says that disallowing crawling of JavaScript can lead to suboptimal rankings.
Mobile Page Speed
You should also reduce JavaScript in your mobile site since too much JS slows down page load speed. Unlike desktop browsers, mobile browsers are not good at rendering heavy pages and executing JavaScript faster.
For example, if you check page load speed of a page with too many Google Adsense ads, you will notice that the speed on desktop and mobile vary by a great percentage because of JS.
We did a page load speed test and found that the same responsive page with 5 Adsense ads had a mobile page load speed score of 28% and desktop score of 89%.
Google clearly states that page speed is used as a ranking factor for mobile searches.
Those cool features build by CSS or JS that you see in your desktop site may actually not load at all in mobile sites due to browser incompatibility. Keep it simple.