DEV Community

Discussion on: Daily Challenge #103 - Simple Symbols

Collapse
 
erezwanderman profile image
erezwanderman

Javascript:

acceptable = str => [...str].every((x, i, a) => x == '+' || x == '=' || (a[i - 1] == '+' && a[i + 1] == '+'))