title: Getting single quotes from input element causing problems in array
body: <p>I am creating  a quiz maker where you can create questions and answers using input elements.
  Then theirs values are getting added to an array on submit.</p>
  <p>But when someone use a single or double quote in their question,the array breaks, you can see that with the color changing:
  <a href="https://i.stack.imgur.com/6w2eU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6w2eU.png" alt="enter image description here" /></a></p>
  <p>And i get this error:
  Uncaught SyntaxError: missing ) after argument</p>
  <p>Note: I already used JSON.stringify on this array and now i am parsing it. I am using these because there some backend, and the array is actually a mongoose Schema instance property.</p>
  <hr />
  <p>I am honestly surprised that there is  no similar question already answered, since what am facingis kind of basic.</p>