How To Call Javascript Function In Html

how to call javascript function in html

how to call a javascript function within a function?
Is it possible to call a javascript function from an .html file while in a .js file? For example, I have this in my foo.js: $(document).ready(function() { fn(); }) And I want to call fn() which is in my index.html: