Driver code
let symbols = " " ; let operators = " " ; let S = [ ] ; let j = 0 ; for ( let i = 0 ; i < symbols . length ; i ++ ) { S . push ( symbols [ i ] ) ; if ( j < operators . length ) S . push ( operators [ j ++ ] ) ; }