virtual-labs-archive / computer-programming-responsive-iiith

This repository contains the responsive Computer Programming Lab IIITH
https://cse02-iiith.vlabs.ac.in
Other
1 stars 325 forks source link

Undefined variable i in area_ functions calls #425

Open GaurangTandon opened 5 years ago

GaurangTandon commented 5 years ago

For example:

area_rect: function( param, functionCall ) {
    this.area = Number(param[0]) * Number(param[1]);
    this.totalArea += this.area;
    alert( "area from function call " + String(i + 1) + functionCall + " is " + this.area );
    this.correctInputs ++;
},

here i is not defined.

GaurangTandon commented 5 years ago

Fixed https://github.com/virtual-labs/computer-programming-responsive-iiith/pull/426/commits/bc629688194ca98dd32fb82d28a1f074a4560e58

DevikaBoddu commented 5 years ago

Valid fix: @GaurangTandon