If the character is + , add sum of top two elements from the stack
else if ( ops [ i ] == " " ) { var a = pts [ pts . length - 1 ] ; pts . pop ( ) ; var b = pts [ pts . length - 1 ] ; pts . push ( a ) ; ans += ( a + b ) ; pts . push ( a + b ) ; }