What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-21 16:14:09
js find value in array
const simpleArray = [3, 5, 7, 15]; const objectArray = [{ name: 'John' }, { name: 'Emma' }] console.log( simpleArray.find(e => e === 7) ) // expected output 7 console.log( simpleArray.find(e => e === 10) ) // expected output undefined console.log... Add solution -
Javascript 2021-11-20 23:50:18
object.keys javascript
// Object Entries returns object as Array of [key,value] Array const object1 = { a: 'somestring', b: 42 } Object.entries(object1) // Array(2) [["a", "something"], ["b", 42]] .forEach(([key, value]) => console.log(`${... Add solution -
Javascript 2021-11-16 01:55:18
strict equality
//Strict equality operator console.log(1 === 1); // expected output: true console.log('hello' === 'hello'); // expected output: true console.log('1' === 1); // expected output: false console.log(0 === false); // expected output: false //Comparing o... Add solution -
CSS 2021-11-08 17:12:10
how to get all values from object in javascript
const object1 = { a: 'somestring', b: 42, c: false }; console.log(Object.values(object1)); // expected output: Array ["somestring", 42, false] > Array ["somestring", 42, false] Object.values(obj) Add solution -
Other 2021-11-01 15:11:11
read only karma abstract
const object1 = {}; // param 1: object up to property that is read only // param 2: name of read-only property as a string // param 3: The value to assign to the read only property and its configuration Object.defineProperty(object1, 'property1', { val... Add solution
Best helpers
Ranking is empty