javascript - jQuery .pop() is not a function -


i trying make function running, anyway caught problem "uncaught typeerror: this.chart_data.pop not function"

here code

 $(data).each(function(){     console.log(this.chart_data);     console.log(this.chart_data.pop());     var end = (this.chart_data).pop();      ret.push({         name: this.name,         y: end['y'],         link: this.link,         color: chart_colours[i]     });      i++;  }); 

thank concern , help.

this line give error:

console.log(this.chart_data.pop()); 

i not sure why displaying pop method. still, need replace above line following:

 console.log($(this.chart_data).pop()); 

and use pop method while assigning:

 var end = $(this.chart_data).pop(); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -