I'm searching for how can I check if word has a same end and start. There is my code:
JavaScript:
function Check() {
var value = document.getElementById("input").value;
if (value == startsWith(endsWith()) && value == endsWith(startsWith())) {
return alert("Yes");
} else {
return alert("No");
}
}
<input id="input" style="margin:20px;" type="text"><br>
<button id="button" onclick="Check();">Check</button>
<p id="demo" style="color:white;">Answer</p>