Valid Parentheses

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.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

HTML flashcards

1929. Concatenation of Array

Javascript Interview Series Part One

Breaking Down the Fetch API

Introduction to Application Frameworks, JavaScript…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marcos Lipic

Marcos Lipic

More from Medium


Week 7 : The Final week

Short Blog 7- Public Art in Toronto (Safe Hands)

Beaming Score