我希望在字符串中找到以下匹配项:
1.s=‘()’->结果应为true
1.s=‘(]’->结果应为false
1.s=‘()[]{}’结果应为true
1.s=‘([])’结果应为true
1.s=‘{([])}’结果应为true
const isValid = (s) => { //how to return the value? } console.log(isValide('[]') //should be true
我希望在字符串中找到以下匹配项:
1.s=‘()’->结果应为true
1.s=‘(]’->结果应为false
1.s=‘()[]{}’结果应为true
1.s=‘([])’结果应为true
1.s=‘{([])}’结果应为true
const isValid = (s) => { //how to return the value? } console.log(isValide('[]') //should be true
暂无答案!
目前还没有任何答案,快来回答吧!