function(e){if("string"!=typeof e)return!1;if(""===e)return!0;if(e.length%2!=0)return!1;let t=e.split(""),r=[t[0]],i={"(":")","[":"]","{":"}"};for(let e=1;e<t.length;e++)t[e]===i[r[r.length-1]]?r.pop():r.push(t[e]);return 0===r.length}

result

true