How frequently does the letter "m" appear in:
Q: Redirect From one app page to another SharePoint Hosted App Currenlt I am creating SharePoint hosted App. In which I have 2 pages Default .aspx and dashboard.aspx in Pages folder.
Now I want to redirect page from Default to dashboard.aspx.
One way I know is
      window.location = window.location.href.replace('Default.aspx', 'Dashboard.aspx');
But sometimes Default.aspx might have '#' key word at last,hence doesnt work many times and also we dont know if some other key work might come in default.aspx's URL. Hence want to any URL string manipulation. 
Please provide me some  alternate solution in javascipt.

A: This windows.location.hash contains the anchor part of a URL. So
windows.location.assign(windows.location.href.replace(windows.location.hash,""));

Location Object

A: Use Relative Url to redirect to your custom pages Default Or Dashboard. This way you don't need to worry about URL hash #.
Simply use
window.location.href = "/sites/your-site/Pages/Dashboard.aspx"

This works 100% as it automatically  calculates the domain and other params to form a web Url

user
In that passage, there are 20 occurrences of the letter "m."
assistant