Can't add javascript to header in hook_footer()

Can't add javascript to header in hook_footer()