How to enqueue an external Javascript file to Frontpage footer

Instead of init use wp_enqueue_scripts, which is used to enqueue styles and scripts in front-end.

Also, for backend enqueue use admin_enqueue_scripts.

tech