7,178 questions
-6 votes
1 answer
161 views
How should I efficiently add all pairs in a key-value array to an object?
I have an object obj; and I then obtain an array arr of key-value pairs. Assuming that the key sets of obj and of arr are disjoint (i.e. no key appears in both) - how do I efficiently add all pairs in ...
1 vote
1 answer
70 views
Google Maps Custom Style Not Applying in WordPress (Elementor)
I’m working on a WordPress website using the Elementor Pro page builder, and I’m trying to integrate a custom-styled Google Map on the "Contact Us" page. What I’ve done so far: Created a ...
0 votes
0 answers
132 views
Issue with Injecting Text into WhatsApp Web Input via JavaScript Extension
I'm working on a JavaScript extension for WhatsApp Web, and I'm facing a problem I can't seem to solve. The goal of my extension is to correct and manipulate the text in the message input of WhatsApp ...
0 votes
0 answers
27 views
Storing an object key/value in an array but not in an array element [duplicate]
I found some odd things and am looking for explanations as to how and why let a = [] ; a.push({foo:"bar",bar:"foo"}] ; console.log(a) ; As expected, prints out: [[object Object] { ...
-1 votes
1 answer
67 views
Question about Javascript: Can I assign two names to the same member? [closed]
I have a set of objects, that contain references to other objects. There is always a general reference: nextObject. But sometimes, I know more about the object beside me. So I could use a member ...
-5 votes
1 answer
112 views
Javascript cannot map object with repetative values
I need to style specific elements by id using given object. Keys and values in projectSkillsMap object corresponds to ids in html file. When user clicks on element with id listed in object keys ...
0 votes
1 answer
72 views
How to retrieve the name of an Object passed as a Key to a Map?
I'm a newbie to Javascript. I wish to know how to get the key as 'personObj', 'carObj, 'workDetailsObj', 'displayFunction' and 'primitiveValue' and print those values in console? Also, how to print ...
5 votes
1 answer
270 views
What is a restricted JavaScript object?
I'm trying to use custom DOM events to communicate between the main world and the isolated world for a page in a webextension in Firefox. When trying to access an event object property, I get an ...