I simply added a class called “home” in landing page then just check this class as

        if (document.querySelector('.home') !== null) {         
             // the conditions comes here
        }

By toihid