@rameezkhank557
If you didn’t understand the explanation, it’s just that there’s too much to explain.
Update bas to the latest version and ask the agent to do this.
function valuesInBNotInA(A, B) {
// Use the filter method to create a new array with values from B that are not in A
const result = B.filter(value => !A.includes(value));
return result;
}
// Example lists A and B
const listA = [1, 2, 3, 4];
const listB = [3, 4, 5, 6];
// Call the function to get the values in B not in A
const valuesNotInA = valuesInBNotInA(listA, listB);
console.log(valuesNotInA); // Output: [5, 6]