If you wish to interact directly with the new window, you can do so through the reference returned by window.open(). In this case the
win variable.
If you put
in the
newWindow method, there will be a global variable named
myVarA with the value "Hello" in the scope of the new window, and you can use it as any other variable inside that window.
Of course, you can also interact with the new window from the
opener window by making the
win variable global, as it's now going out of scope right after the window was created and it's tricky to get it back, if it can be done.
You're a bit unspecific about what you want to do with the value once it's in the new window, and exactly which value you wish to pass, so I'm not sure what you want. Any extra info you can specify makes it easier to find a suitable solution

.