Update parser.js

Changed variable names, For loop in While loop and typing error.