How to Remove all Question Mark From String Using JavaScript?

Hello friends, today I will tell you through this tutorial how you can easily remove all the question marks from your string content using javascript or jquery. This tutorial will try to understand you step to step. So let’s go.

extract question mark from string by javascript with demo, remove question mark (?) from string content with javascript code, easy remove all question mark from variable string value using javascript with demo

replace :- With this function you can add any symbol to the value of your variable. You can also remove any symbol. How we will remove the question mark by this function is explained to you by example below. By copying this code, you can see it very easily by running in your server.


<!DOCTYPE html> 
<title>How to Remove all Question Mark From String Using JavaScript?</title>
<h1>How to Remove all Question Mark From String Using JavaScript?</h1>
<p>New String Value is:
<span class="output"></span>
<button onclick="removeQuestionmark()">
Remove Question Mark
<script type="text/javascript">
function removeQuestionmark() {
originalString = 'Experts PHP ? is a Tutorial Website ?';
newString = originalString.replace(/\?/g, '');
document.querySelector('.output').textContent = newString;