All Questions
7 questions
1
vote
1
answer
140
views
Transform an array into object and set index for an unique key in javascript
I have a method that merges keys and indexes from an array into an object.
I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler.
Goal
get an array of objects ...
2
votes
2
answers
47
views
Combine data from array of objects
I got this data structure and I am checking to see which properties are true, then I am adding the key for all the properties that are true to that object on a new ...
1
vote
2
answers
767
views
Recursively find data in array of objects
On this script I look up properties in an array of objects. There is an original array of strings list to get the objects that match the ...
1
vote
1
answer
4k
views
Add / Overwrite an object in an array
I am trying to overwrite an object in an array if the title property exists, otherwise just push it to the array. I found two approaches and I wonder which one is ...
6
votes
1
answer
357
views
JavaScript: A drawing program in OOP
I made a little drawing program in OOP.
The game consists of a canvas which is basically a 2d array where the user can draw various shapes on it. There can be multiple shapes overlapped on top of each ...
3
votes
1
answer
55
views
Iterating an Array Object & Assigning the Attributes Values to those that Match the Condition
Is there any approaches to reduce the below coding snippet in Angular 2+ with few lines of code by making use of ECMA Script or by some other ways
...
1
vote
2
answers
211
views
Manipulating an ES6 static class property that is an array
I've been trying to find a way to create static properties in ES6 classes and have found a solution with the help of various Stack Overflow answers (namely this one and this one).
However, I also ...