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,081
  • 3
  • 23
  • 56

1 Answers1

0
var buttonValueAttribute = $(this).attr('value');
hackerrdave
  • 5,946
  • 1
  • 23
  • 28