Flowchart (ISO 5807)
Source code
JavaScript
function indexOf(arr, key) {
for (let i = 0; i < arr.length; i++) {
if (arr[i] === key) {
return i;
}
}
return -1;
}The editor opens with this code — change it and the chart redraws.
- Language
- JavaScript
- Constructs
- loop + return index
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG