i want get the last item of an array with class names. My code looks like this
var getClassName = [];
getClassName = $(this).attr('class').split();
console.log(getClassName);
In the console i become get this answer
["classname1 classname2"]
how can i get the last class name?
Thanks