1. 给定一个只包括 '('')''{''}''['']' 的字符串 s ,判断字符串是否有效。
    2. 有效字符串需满足:
    3. 左括号必须用相同类型的右括号闭合。
    4. 左括号必须以正确的顺序闭合。
    /**
     * @param {string} s
     * @return {boolean}
     */
    var isValid = function (s) {
      let stuck = [];
      for (let key of s) {
        switch (key) {
          case '{':
          case '(':
          case '[':
            stuck.push(key);
            break;
          case '}': if (stuck.pop() !== '{') return false; break;
          case ')':if (stuck.pop() !== '(') return false;break;
          case ']': if (stuck.pop() !== '[') return false; break;
        }
      }
      return !stuck.length;
    };