Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js indexof string

const paragraph = 'The quick brown fox';

console.log(paragraph.indexOf('T'));
>> 0

console.log(paragraph.indexOf('h'));
>> 1

console.log(paragraph.indexOf('Th'));
>> 0

console.log(paragraph.indexOf('he'));
>> 1

console.log(paragraph.indexOf('x'));
>> 18
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #indexof #string
ADD COMMENT
Topic
Name
3+4 =