window.open can open new tab or window as per given dimesions
window.open("www.google.com", "", "width=100,height=100");
window.open is used to create new window or new tab with width 100 and height 100 with url : google.com
and window.location.href is used to redirect to the new page .
window.location.href ="https://www.google.com";
above code will redirect to google.com in same window