How can I add Javascript to a page or post

You can make use of a plugin ‘Simple Custom CSS and JS’, which will allow you to edit your custom Javascript directly in the WordPress interface.

You will need to be a site administrator of the website to enable and use this plugin.

  1. Log in
  2. Click Plugins
  3. Search for ‘Simple Custom CSS and JS
  4. Click Activate

More information can be found here https://en-gb.wordpress.org/plugins/custom-css-js/