change part of url
<!DOCTYPE html>
<html>
<head>
<title>
How to remove a character from
string using Javascript?
</title>
</head>
<body>
<h1 style="color: green">
GeeksforGeeks
</h1>
<b>
How to remove a character from
a string using Javascript?
</b>
<p>Original string is GeeksforGeeks</p>
<p>
New String is:
<span class="output"></span>
</p>
<button onclick="removeCharacter()">
Remove Character
</button>
<script type="text/javascript">
function removeCharacter() {
originalString = 'GeeksForGeeks';
newString = originalString.replace('G', '');
document.querySelector('.output').textContent
= newString;
}
</script>
</body>
</html>