Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array Methods indexOf()

let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
console.log(days.indexOf('Sunday'));
// --> -1, mert nem található meg

let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
console.log(days.indexOf('Monday'));
// --> 0
Source by github.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #Methods
ADD COMMENT
Topic
Name
1+2 =