Rk MahbubforQoDesignqodesign.hashnode.netยทMar 27, 2023Push associative array into array in JavaScriptlet myArray = []; function insert(key, value) { let obj = {}; obj[key] = value; myArray.push(obj); } insert("name", "John"); insert("age", 30); insert("city", "New York"); console.log(myArray); In this example, we declare an empty array cal...JavaScriptjsAdd a thoughtful commentNo comments yetBe the first to start the conversation.