IndexOf() method returns the position of the first occurrence of a value in a string.
Example:
let str = "I love the taste of sugar in the morning"
let noun = str.indexOf("sugar")
console.log(noun);
// Output of 20
IndexOf() method returns the position of the first occurrence of a value in a string.
Example:
let str = "I love the taste of sugar in the morning"
let noun = str.indexOf("sugar")
console.log(noun);
// Output of 20
For further actions, you may consider blocking this person and/or reporting abuse
Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.
sharathchandark -
Vyacheslav Borodin -
Dhruvang Gajjar -
Cloud Native Engineer -
Top comments (0)