fork download
  1. let categories = [];
  2. const activeCategories = $('._active', '.content');
  3. console.log(activeCategories);
  4.  
  5. if (activeCategories.length){
  6. for (let category of activeCategories){
  7. categories.push($(category).data('category'));
  8. }
  9. }
  10. //ОШИБКА
  11. //Uncaught TypeError: activeCategories is not iterable
Runtime error #stdin #stdout #stderr 0.03s 16856KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:2:7 ReferenceError: $ is not defined
Stack:
  @prog.js:2:7