How to link Javascripts?

I’m having a trouble linking my javascript in notepad.

I want #5 to say the results of my operation is the variable z (from number 4).

Any ideas on how to do this?