window.location.href = 'new_url';
same as enter link

window.location.replace('new_url');
replaces the current document in the browser history with the new one.
does not create an entry in the browser history, meaning the back button will not take the user back to the original page
this behaves more like an redirect