Index jumping out of for-loop with recursive method calling and || operator in Javascript
I am working with tree-like structure in Javascript, I found for-loop of Javascript works unexpected way. Let me describe it: <html> <head><head> <body> <script> class Test { constructor(name, children) { this.children = []; this.test = () => { let result…