Here are some examples. The link describes how the code behaves, but feel free to "view source" to see the code.

This link opens three windows because it uses three different names.

This link opens one window because it uses only one name.

This link puts URL2 (Wellesley's home page) in the window called "main" and puts the object in the previously created variable w2.

This link puts URL3 (Google home page) in the window called "main", but it does it by modifying the location of the window in w2 as opposed to using window.open. Consequently, this will only work when the window is already open and stored in w2.

This link closes the window in variable w2. It won't work if you didn't use the code that stores the window in variable w2.