MCPcopy Create free account
hub / github.com/codecombat/codecombat / isAnyPrecedingLevelLocked

Function isAnyPrecedingLevelLocked

app/core/utils.js:1010–1015  ·  view source on GitHub ↗
(levels, currentIndex)

Source from the content-addressed store, hash-verified

1008}
1009
1010const isAnyPrecedingLevelLocked = function (levels, currentIndex) {
1011 for (let i = 0, end = currentIndex, asc = end >= 0; asc ? i <= end : i >= end; asc ? i++ : i--) {
1012 if (isLocked(levels[i])) { return true }
1013 }
1014 return false
1015}
1016
1017const findNextLevel = function (levels, currentIndex, needsPractice) {
1018 let index = currentIndex + 1

Callers 1

findNextLevelFunction · 0.85

Calls 1

isLockedFunction · 0.85

Tested by

no test coverage detected