I want add javascript in page template

i want add javascript in page template

Please add more details.

https://www.w3schools.com/js/js_whereto.asp