The size of str1 is guaranteed to be greater than that of str2. We are required to find the smallest substring in str1 that contains all the characters contained in str2.
https://www.tutorialspoint.com/min-window-substring-in-javascript#:~:text=The%20size%20of%20str1%20is,the%20characters%20contained%20in%20str2.&text=const%20output%20%3D%20'cdefg'%3B,contains%20all%20characters%20of%20str2.
this is old JS code can anyone write in new ES6 ?