Added var in JS code, and added js convert to CSV code from the input.