This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function findPositionInArrayForLoop(uint _item, uint[] memory _array) pure internal returns (uint i) { // requirements should come before. | |
| uint[] memory tmpArray = _array; | |
| uint arrayLength = tmpArray.length; | |
| for (i = 0; i < arrayLength;) { | |
| if (tmpArray[i] != _item) { | |
| unchecked { | |
| i++; | |
| } |