Please login to start chat

ICT Solutions 12 Jun 2022, 15:43:33
Category : JavaScript Tutorials

indexOf (JavaScript Array Method)

const tnwText = "Hello Dear All, I am Thet Naing Win. Welcome to TNW (Web Service & ICT Solutions)";

function tnwFun1(){
document.getElementById("demo").innerHTML = tnwText;
}

function tnwFun2(){
const tnwSearch = document.getElementById("search").value;
const result = tnwText.indexOf(tnwSearch);
document.getElementById("demo").innerHTML = "The search text is fount at " + result;
}

Comments:

No comment to show.

Available Services
Download Android Application