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
Post a Comment