Edd Mann Developer

Implementing the Shunting Yard algorithm in JavaScript

Following on from my recent post on implementing a small RPN parser using JavaScript, we can expand on this by handling infix expressions. This can be achieved by initially parsing the expression into its postfix (RPN) counterpart, highlighting another use case where a stack based approach works well.

Small RPN Implementation in JavaScript

This morning I decided to quickly write up a small reverse polish notation evaluator in JavaScript. Evaluation of these expressions highlights the perfect use case for a stack based approach.