"use strict";

getReplies(1)
.then(function (replies) {
  return replies.filter(reply => !reply.isAbuse);
})
.then(function (filteredReplies) {
  console.log(filteredReplies);
})
"use strict";

getReplies(1)
.then(function (replies) {
  return replies.filter(reply => !reply.isAbuse);
})
.then(function (filteredReplies) {
  console.log(filteredReplies);
})
.catch(function (error) {
  console.error(error);
})
Use cath to work with an error
Use cath to work with an error
