What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-17 05:33:04
javascript array includes another array
const array1= ["cheese", "dough", "sauce", "pepperoni"] const array2= ["mozzarella", "peppers", "chicken", "cheese"] const isIncluded = array1.some(value => array2.includ... Add solution -
Javascript 2021-09-09 11:55:01
javascript Compare two arrays regardless of order
// To compare arrays (or any other object): // Simple Array Example: const array1 = ['potato', 'banana', 'soup'] const array2 = ['potato', 'orange', 'soup'] array1 === array2; // Returns false due to referential equality JSON.stringify(array1) === JSON.s... Add solution -
Javascript 2021-09-06 03:19:02
how to convert array converted to string back to array javasccript
//Use array.join(separator) // const myArray = [1, 2, 3, 4, 5, 6]; console.log(a.join('/')); //output : 1/2/3/4/5/6 const myArray = ['g', 'o', 'o', 'g', 'l', 'e']; console.log(a.join('')); //output : 'google' // Source : https://www.geeksforgeeks.org/java... Add solution
Best helpers
Ranking is empty