No, as I understand it, Java Script is run in your browser and your browser have engine to run java script.
Only thing that connection speed can affect is request/response cycle; download of files sent from server…. (html, css, js files…)
Hope this explanation helps?
solved Does internet speed afect browser JavaScript?