Skip to content

Instantly share code, notes, and snippets.

@mchangrh
Last active July 15, 2021 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mchangrh/b4f807cd55343f204ed7964ee161334a to your computer and use it in GitHub Desktop.
Save mchangrh/b4f807cd55343f204ed7964ee161334a to your computer and use it in GitHub Desktop.
string array deepEquals
const es6deepequals = (a: string[] ,b: string[]): boolean => {
let result = true;
b.forEach((e) => {
if (!a.includes(e)) result = false;
});
return result;
};
function deepStringEqual(a: string[] ,b: string[]): boolean {
let result = true;
b.forEach((e) => {
if (!a.includes(e)) result = false;
});
return result;
};
const es6deepequals = (a,b) => {
let result = true;
b.forEach((e) => {
if (!a.includes(e)) result = false;
});
return result;
};
function deepStringEqual(a,b) {
let result = true;
b.forEach((e) => {
if (!a.includes(e)) result = false;
});
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment