function solution(s) {
const newArr = s.split("");
let count = 0;
if(newArr[0] === ')') return false;
for(let i = 0; i < newArr.length; i++){
if(newArr[i]==='(') {
count ++;
} else if(count >= 1 && newArr[i] === ')'){
count --;
}
}
return count === 0 ? true : false;
}