Ace the Balanced Parenthesis program with ES6 reduce helper

Sourabh Gupta
Mar 29, 2020

ES6 is an in-depth series which has many features, that makes the life of a developer much easier and one of them is array helpers. If you don’t know about ES6, I have a brief introduction article on it, have a read.

And to know about ES6 array helper methods. Follow the link.

You may have seen the Balanced Parenthesis program many times either in coding exercises or whiteboard interviews, you can ace your interview by doing that question on the whiteboard paper using reduce helper.

Below is the program to check whether the parenthesis in a string is balanced or not using reduce helper hosted by GitHub.

Reading is good but reading with implementation is great!

Suggestions and critics about the article are most welcome.

--

--

Sourabh Gupta

Full-stack Developer | UX/UI | Never ending thirst to learn.