Here's my html code:
if(document.getElementById("txtArea").value = "मैं ये क्यों करू"){
document.getElementById("hidden").innerHTML = "Correct answer!";
}
<h2>Translate this english paragraph to hindi</h2>
<h3>Why should I do this?</h3>
<textarea id="txtArea" placeholder="Write the correct hindi translation here"></textarea>
<h1 id="hidden" style="color:green"></h1>
Actually I am trying to get the value that user had inputted in my textarea. And check whether it(value entered by user) is right or not. How will do it?