DEV Community

Discussion on: Daily Challenge #51 - Valid Curly Braces

Collapse
 
alexkhismatulin profile image
Alex Khismatulin • Edited

Elegant JS solution

areCurlyBracesMatched = s => {
  while(s.includes('{}')) s = s.replace('{}', '');
  return !s;
}
Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

I love this one.