(i was not not getting any help) check this code and help me
<!doctype html>
<html>
<head>
<title>JS String Operations</title>
<style>
input {
padding: 10px;
width: 300px;
}
#btn {
background-color: #4535AA;
color: white;
border: 0;
border-radius: 5px;
padding: 10px 5px;
cursor: pointer;
}
</style>
</head>
<body>
</p>
<div><input type="text" id="searchData"/></div>
<br/>
<button id="btn" onclick="findme()">Find Keyword!</button>
<button id="btn" onclick="count()">Count Words</button>
<br/>
<div id="result"></div>
<script>
function findme() {
// get value from input field
let inputStr = document.getElementById(" ").value;
if(inputStr==' ') {
alert("Nothing to find");
return;
}
// change text to lowercase
inputStr = inputStr.lowercase();
let content = document.getElementById("content").innerText;
// change text to lowercase
content = content.lowercase();
// look for the inputStr in content
if(content.search("content"))
{
alert("String found");
}
else {
alert("String not found");
}
}
function count() {
let content = document.getElementById("content").innerText;
// use string function to create array of its words
let arr = content.split(" ");
let resultDiv = document.getElementById("result");
// use array property to find number of array elements
resultDiv = console.log("Number of words:" + arr.length);
}
</script>
</body>
</html>