Following program shows you how to find the index of a particular character in a given string.
var input = prompt("Please enter a string:"); var character = prompt("Please enter a character:") ; console.log("Index of given character is: " + input.indexOf(character));
Please enter a string: hello Please enter a character: o Index of given character is: 4
Please enter a string: hello Please enter a character: r Index of given character is: -1
On By Navya
Getting 'No EntityManager with actual transaction available for current thread' exception while removing some data
How to fix Found use of deprecated [org.hibernate.id.SequenceGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead
Unable to start Spring Boot + PostgreSQL App, Getting org.postgresql.util.PSQLException: FATAL: password authentication failed for user