Iterating till the entire Digit is read
let st = 0 ; while ( s [ i ] != ' ' && s [ i ] != ' ' ) { st = s [ i ] ; i = i + 1 ; } k . push ( st ) ; } } let depth = 0 , flag = 1 ; let open = 0 , close = 0 ; for ( let i2 = 0 ; i2 < k . length ; i2 ++ ) {