I am having below code, this code opens new tab instead i want to replace existing page/tab. I do not know what are parameters i need to add in the below code
let newTab = window.open();
newTab.location.href = 'http://www.google.com';
the problem this opens the page in new window, instead it should replace the existing page. i am not supposed use it below code, instead i want to have same action in the above code
window.open('http://www.google.com', '_self')
Any help?