Require link to read about all javascript functions

Hi ! I want to show optin prompt on only 3 pages of my website but it’s showing for all pages .
I want to use Optin function but its not working so I need a link where I can read about all JS functions I can use.
I am using NEXT JS.