0

I have to use includes or indexof in place of in, does it effect the application. Below is the code

if (replacementKey in this.replacementParts){
--conditional statememnts
}
jitender
  • 10,238
  • 1
  • 18
  • 44
Ram
  • 39
  • 9
  • 1
    why do you need to find index and check if it's -1.Simply use includes – jitender Jan 23 '20 at 05:31
  • 1
    You might want to look at this already asked question:https://stackoverflow.com/questions/35370222/array-prototype-includes-vs-array-prototype-indexof I hope this answers to your query. – Hope Jan 23 '20 at 05:47

0 Answers0