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")) );
1.4m articles
1.4m replys
5 comments
57.0k users