JavaScript is a client side programming language, this means that it only operates within the client (ie. your web browser). You cannot “send” a variable from one computer to another due to this fact. If you are interested in server-side programming languages PHP is very accessible and is of similar syntax to JS. But as to your original question, that is not possible and I’d advise you break your problem down more to figure out what you really need to do.
solved Can you send a variable to another computer so I can access it?