If you use the JS ES6 syntax to declare a function "this" is no longer the calling element. You have to use:
var b = $("li").each( (index, element) => meow2.push( $(element.currentTarget).attr("age")) );
2.1m questions
2.1m answers
60 comments
57.0k users