문제 링크 : Find the Longest Balanced Substring of a Binary String
/**
* @param {string} s
* @return {number}
*/
var findTheLongestBalancedSubstring = function(s) {
if(!s.includes('0')) {
return 0
}else {
let result = 0
let substr = ''
while(true) {
substr = '0' + substr + '1'
if(s.includes(substr)) {
result = substr.length
}else {
return result
}
}
}
};