All Questions
17 questions
3
votes
1
answer
135
views
1
vote
1
answer
147
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 ...
1
vote
2
answers
214
views
Simplify a function which performs manipulation of data in Javascript
Upon suggestion in the original question within Stack Overflow, I'm bringing my question here.
We have created a function that will convert the data into the desired format, but it has a lot of code ...
11
votes
4
answers
3k
views
Restructuring JSON to create a new JSON where properties are grouped according to similar values
I have a JSON structure in the following example format:
...
0
votes
2
answers
95
views
Functional Programming Style in Javascript Picking a Random Item from an Array
I'm trying to understand the Functional Programming Paradigm (or style) implemented with Javascript. There are a few things I have difficulties with. The naming conventions, and dependency injections. ...
1
vote
1
answer
122
views
JavaScript, looping, and functional approach
Data Structure coming back from the server
...
6
votes
3
answers
1k
views
Finding even or odd numbers
I'm looking for critiques to see what I could have done better or different ways I could approach writing a script for finding even or odd numbers. I am new to programming with JavaScript, and ...
13
votes
5
answers
3k
views
Vue.js search functionality
In my BlogList.vue component I made a search input field:
...
1
vote
1
answer
57
views
0
votes
3
answers
299
views
Finding nth lowest value without any Math max or min methods
So I decided to make a more efficient solution to a Google interview question where they ask you to either find the lowest or second lowest value in an array without using the max or min methods. I ...
2
votes
1
answer
138
views
Manipulating arrays to extract unique objects and count occurrences
The data describes cycling activities (key1) and chunks of them (key2). In total there are around 1,000 ...
2
votes
3
answers
82
views
Collecting a list of documents from a factory for an AngularJS controller
With this controller I'm injecting myFactory and using Array.push() to add the array ...
5
votes
3
answers
130
views
Aggregate summary counts for an array of error objects
I'm doing some refactoring of someone else's code, and just want a second opinion, because of course I think my work makes it better, but some validation (or correction) would be helpful.
Starting ...
10
votes
2
answers
700
views
Array duplicate removal for duplicates exceeding `N`-number
I recently encountered a front-end interview coding challenge question that required one to create a function which returned an array that excluded numbers that occurred more than ...
1
vote
2
answers
618
views
Finding the difference between two different arrays using JS and FP
I'm trying to practice functional programing using JavaScript. These pure functions just work together to find the difference between two arrays. I know that this might be an impractical example of ...