Valid Parentheses

Marcos Lipic
Mar 1, 2021
Photo by David Gavi on Unsplash

Sometimes when your code doesn’t work, the problem might be as simple as haven’t invalid parentheses. Today’s Codewars challenge, which I tackle in JavaScript, addresses this very issue. Afterwards, you’ll be such a pro with parentheses, all your parentheses issues will be a thing of the past.

The kata is to write a function that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if the string is valid, and false if it’s invalid.

--

--