Multiple choice technology databases

What is the correct JavaScript syntax for opening a new window called "p2"

  1. p2=window.open("http://www.tcs.com");

  2. p2=window.new("http://www.tcs.com");

  3. p2=window.create("http://www.tcs.com");

  4. p2=window.add("http://www.tcs.com");

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

window.open() is the correct JavaScript method to open a new browser window. Options B, C, and D use non-existent methods (window.new, window.create, window.add). The window.open() method can take a URL as parameter and returns a reference to the new window, which can be stored in a variable for later manipulation.