Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
135 views

Recursive Factorial Calculation in JavaScript

...
TAHER El Mehdi's user avatar
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 ...
wittgenstein's user avatar
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 ...
SDK's user avatar
  • 113
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: ...
fruitlessartery's user avatar
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. ...
Melvin Idema's user avatar
1 vote
1 answer
122 views

JavaScript, looping, and functional approach

Data Structure coming back from the server ...
FNMT8L9IN82's user avatar
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 ...
fire_hydrant's user avatar
13 votes
5 answers
3k views

Vue.js search functionality

In my BlogList.vue component I made a search input field: ...
meez's user avatar
  • 241
1 vote
1 answer
57 views

converting object of arrays to an array of objects in a desired format

...
Vignesh Sharma's user avatar
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 ...
DreamVision2017's user avatar
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 ...
Jelefra's user avatar
  • 133
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 ...
Wayne's user avatar
  • 45
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 ...
redOctober13's user avatar
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 ...
Gavin Hughes's user avatar
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 ...
Joseph Palomino's user avatar

15 30 50 per page