Like
Install diff as a package?
Copied
npm i @bit/bit.utils.array.diff
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
diff (
firstArray:
[]
,secondArray:
) : []
[]
Computes the difference between two array references.
Example
Arguments
firstArray:
[]
secondArray:
[]
Returns
[]
returns an array representing the difference between the two arrays
Test Summary
#array/diff() should return an empty array as both arrays are equal | Pass |
#array/diff() should return the difference between the two arrays (1, 5, 6) | Pass |