score:0

const data = [
  { webservice: "a" },
  { webservice: "b" },
  { webservice: "c" },
  { webservice: "b" },
  { webservice: "d" },
];

const output = data.reduce((accumulator, current) => {
  if (!accumulator.some(element => element.webservice === current.webservice)) {
    accumulator.push(current);
  }

  return accumulator;
}, []);

console.log(output);

score:3

for (var i = 0; i < length; i++ ){
  let x = i+1;
  // ...etc....
}

Related Query

More Query from same tag