Newbie here trying to use external javascript

Newbie here trying to use external javascript

So I was using CDN to use javascript through JQuery in the html, but for organization's sake, I would like to have my javascript externally, but I can't get it to recognize the JQuery anymore when its on an external file. Can anybody let me know how to use CDN for Jquery and have Jquery/javascript in an external file? Thanks!