DreamsCoder.com

We Code your Dreams


home > Searching Strings with indexOf and lastIndexOf using JavaScript




Searching Strings with indexOf and lastIndexOf using JavaScript



Click here for Live Demo






Searching Strings with indexOf and lastIndexOf




The string to search is:
abcdefghijklmnopqrstuvwxyzabcdefghijklm

Enter substring to search for

First occurrence located at index
Last occurrence located at index
First occurrence from index 12 located at index
Last occurrence from index 12 located at index

Label - javascript





by - Chinmay Mahajan





Are you looking for something else?


Suggested Programs




How to Detect Ad Blocker on your website using Javascript


Drawing Prism using Three.js


Canvas Rotate Scale Translate Skew using JavaScript


Change button color using javascript and keep it same on refresh


Get current Date and Time automatically using JavaSrcipt