Same JavaScript to be fired on 3 different pages

Hi,
is there a way to say to fire a js code on 3 different pages?
I have this code

'blog': {
  init: function() {
  // JavaScript to be fired on the blog page
 ......... a lot of code ......

and I would like to say to fire the same code for other pages, like category/tumblr, category/instragram (3 different category) etc.

Is it possible without duplicate the same code for every page that needs this?

Thanks

Could you not just wrap the code in a function (or group of functions) in the global namespace or as a method of the ‘sage’ object and then just call that function/method when needed?

Use the body class filter in WordPress to add a common class for those pages.