Finding numbers with odd frequency in an array Below is my Code, I want to know ways to improve it.
const findOdd = (A) =&gt; {

  newObj={};

  A.filter((cur,index) =&gt;{
    return A.indexOf(cur)===index; 
  }).forEach((cur) =&gt;{
    newObj[cur] = 0
    for(let i = 0; i&lt;A.length; i++) if(cur === A[i]) newObj[cur] +=1;
  });

  const keys = Object.keys(newObj)
  key = keys.filter(cur =&gt; newObj[cur] % 2 !== 0)

  return parseInt(key[0]);
}

Test Case :
A = [1,1,2,-2,5,2,4,4,-1,-2,5]
Output = -1
Edit : I am trying to create a list of distinct elements at first then add them to an object with key as elements and value as their frequency, then finally finding the keys with odd frequencies.
Undeclared variables You aren't declaring your newObj variable or your key variable. This will either implicitly create properties on the global object, or throw an error in strict mode. Both should be avoided. Always declare your variables (with const, or let when const isn't usable) before using them for the first time. Eg, change newObj={}; to const newObj = {};.
Algorithm complexity Your current approach is pretty computationally expensive. .indexOf will iterate through all elements of the array until it finds a match, or until it reaches the end of the array. .filter will iterate through all elements of an array. With an .indexOf inside a .filter, the computational complexity is O(n ^ 2). (For example, given an array of 30 items, you can expect to have to carry out 900 times more operations than an array with only 1 item, worst-case.) That's not very good.
Inside the forEach, you again iterate over every element of the array, resulting in another operation of O(n ^ 2) complexity.
To reduce the overall complexity of the whole findOdd function to O(n), iterate over the input array only once, and inside the loop, either create a property on the object, or increment the existing property. (See snippet below for a demo.)
Variable names You have variable names A and newObj. At a glance, these are not very informative. Better to give them names that represent what they contain so you can understand them at a glance, such as inputNumbers and occurrencesByNumber. Also, the variable named key isn't actually a key - it's an array of keys. Better to make it plural: keys.
Semicolons Sometimes you're using semicolons, sometimes you aren't. Unless you're an expert, I'd recommend using semicolons, else you may occasionally run into hard-to-understand errors due to Automatic Semicolon Insertion. I'd highly a linter (not just for semicolons, but for many ways to prompt you to correct potential bugs before they turn into errors, and to enforce a consistent code style)
Iterating over an object You collect the keys using Object.keys, then you iterate over the value at each key by accessing the property of the object: newObj[cur]. If you want to iterate over keys and values at once, you can consider using Object.entries instead.
.find or .filter? If the objective is to

then finally finding the keys with odd frequencies.

then
return parseInt(key[0])

is not the right approach, since it'll return only the first element of the array. If you want only one match to be returned, use .find above instead of .filter, so that it ends as soon as a match is found. If you want more than one match to be found, return the array of keys/entries, mapped to numbers.
Demo implementing these fixes:


const findOdd = (inputNumbers) =&gt; {
  const occurrencesByNumber = {};
  for (const number of inputNumbers) {
    occurrencesByNumber[number] = (occurrencesByNumber[number] || 0) + 1;
  }
  return Object.entries(occurrencesByNumber)
    .filter(([, occurrences]) =&gt; occurrences % 2 === 1)
    .map(([numberKey]) =&gt; Number(numberKey));
};

console.log(findOdd([1, 1, 2, -2, 5, 2, 4, 4, -1, -2, 5]));
console.log(findOdd([1, 1, 2]));
console.log(findOdd([0, 1, 2]));