How do i save the Javascript?

When im going to make a document of javascript On the Windows Notepad I cant open the Javascript, it opens for I to edit it.
What should I do about it?