Please login to start chat

ICT Solutions 12 Jun 2022, 15:46:40
Category : JavaScript Tutorials

lastIndexOf (JavaScript Array Method)

const tnwText = "Hello, welcome to TNW (Web Service & ICT Solutions)";

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

function tnwFun2(){
let tnwSearch = document.getElementById("search").value;
let result = tnwText.lastIndexOf(tnwSearch);
document.getElementById("demo").innerHTML = "The search text is found at : " + result;
}

Comments:

No comment to show.

Available Services
Download Android Application