pop characters till 0 - th index
while ( idx >= 0 ) { if ( st . length == 0 ) { return false ; } let c = st [ st . length - 1 ] ; st . pop ( ) ; if ( c != S2 [ idx ] ) { return false ; } idx -- ; } } }