💡JavaScript Solution w/ Detailed Comments
javascript\nvar minWindowSlidingWindow = function (s, t) {\n\t// `right` is -1 since every loop, we start by expanding the right boundary\n\t// setting this to 
``` javascript\nvar minWindowSlidingWindow = function (s, t) {\n\t// `right` is -1 since every loop, we start by expanding the right boundary\n\t// setting this to -1 ensures that we will check the first char on the first time\n    let min = "", left = 0, right = -1;\n    let map = {};\n\t\n\t// this creates a map for the characters we need to include in the substring\n\t// we store the character and its count since it can be repeated\n\t// for example: "BAAC"\n    t.split(\'\').forEach(element => {\n        if (map[element]==null) map[element] = 1;\n        else map[element] = map[element] + 1;\n    });\n\t\n\t// sets how many different characters we still have\n\t// for example: given the input "BAAC", we still have 3 different characters need to check\n    let count = Object.keys(map).length;\n\n    while (right <= s.length) {\n\t\t// found a valid substring\n        if (count == 0) {\n\t\t\n\t\t\t// try to shift left boudary to the right, this means the very left character will be removed\n\t\t\t// because of this, we need to check whats the affect by removing that character, \n            let current = s[left];\n\t\t\t\n\t\t\t// if this chacter is in our map, it means we ll need to find another one in the future\n            if (map[current] != null) map[current]++;\n\t\t\t\n\t\t\t// * we must have the condition `>0` because for case like "BBBA...", count for B could be negative\n            if (map[current] > 0) count++;    \n\t\t\t\n            let temp = s.substring(left, right+1)\n            if (min == "") min = temp;\n            else min = min.length<temp.length?min:temp;\n\t\t\t\n            left++;\n        } else {\n            right++;\n            let current = s[right];\n\t\t\t\n\t\t\t// decrease the count for this character\n            if (map[current] != null) map[current]--;\n\t\t\t\n            if (map[current] == 0) count--;\n        }\n    }\n    return min;\n}\n```
['JavaScript']