0

Is it possible to use button attribute as a variable name of an array in JavaScript? I tried to do it as follows but it returns syntax error.

var $(this).attr("value") = [];

Is there any way to do this?

isuru
  • 3,385
  • 4
  • 27
  • 62

1 Answers1

0
var buttonValueAttribute = $(this).attr('value');
hackerrdave
  • 6,486
  • 1
  • 25
  • 29