What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-02 11:10:11
react hooks delete item from array
import React, { useState } from "react"; import ReactDOM from "react-dom"; import "./styles.css"; const App = () => { const defaultList = [ { name: "ItemOne" }, { name: "ItemTwo" }, { na... Add solution -
Javascript 2022-02-28 07:35:02
javascript array clear
let aray = [1,2,3,4,5,6,7,8,9,10]; //as with most coding there are several ways you can do anything //see whichever works best for your scenario //set the array to equal a blank array array = []; //set the array's length to 0 array.length = 0; //using... Add solution -
Javascript 2022-02-24 19:40:09
javascript hashmap
let contacts = new Map() contacts.set('Jessie', {phone: "213-555-1234", address: "123 N 1st Ave"}) contacts.has('Jessie') // true contacts.get('Hilary') // undefined contacts.set('Hilary', {phone: "617-555-4321", address: &qu... Add solution