You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var checkSyn = function checkSyn (str){ //Checks a string for open and closed braces, brackets, and parenthesis. However does not check for semi-colon.
var symbols = {'{':'}','[':']', '(':')'};
if(~str.length){
return true;
}else{
var start = str[0];
var end = str[str.length-1];
for(var k in symbols){
if(start === k && end === symbols[k] || end === k && start === symbols[k]){
return checkSyn(str.slice(1,(str.length-1)));
}else{
if(start === k && str[1] === symbols[k]){
return checkSyn(str.slice(2));
}else if(end === k && str[str.length -1] === symbols[k]){