How to call a javascript only for specific page/template. I don't want to add common.js in home page?

I am completely new to PHP and slim framework. I’m using twig template engine, and in include folder I have a footerscript.twig file I want to add a common.js file in all page except the home page.
Screenshot from 2018-01-16 15-03-43