How does Recursion Function handle the || operator? [duplicate]
问题 This question already has answers here : How does this recursion work? (11 answers) Closed last month . function findSolution(target) { function find(current, history) { if (current == target) {debugger; return history; } else if (current > target){ debugger; return null; } else{ debugger; return find(current + 5, "(" + history + " + 5)") || find(current * 3, "(" + history + " * 3)"); } } debugger; return find(1, "1"); } console.log(findSolution(13)); During it's working after it reaches find