All Questions
18 questions
2
votes
0
answers
83
views
Javascript basic search engine recipes
I have made a search engine for recipes. Requirements for this JS Project are as follow:
Create a function called searchRecipes that takes all recipes and an ...
2
votes
1
answer
77
views
Helper functions to get, set and remove from Firefox browser storage. Also, to get, push and remove from lists stored in the database
I am making a plugin for Firefox, this is (more or less) my first time working with JavaScript. Is this a reasonable design for working with both values and lists in a database?
...
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 ...
2
votes
1
answer
102
views
Suggestion for improving this code to be more readable and easy for beginners? [closed]
I'm a JavaScript beginner trying to learn by doing. Here I have a table with different values: I have used two for loops. Is there an easier way to achieve this? For example having just one for loop, ...
3
votes
2
answers
234
views
Array of objects to array
What would be the "correct" way of transforming an array of objects into an object that contains an array?
Suppose I have this array that contains objects:
...
4
votes
1
answer
98
views
Outputting flavor text depending on inputted strings
I have this program that takes two strings from the user, stores them in mixArray, then "mixes" them with mixItUp() and outputs ...
4
votes
1
answer
259
views
Inserting Elements Into a Sorted Array
Very new to JS (wrote my "Hello World" around 3 days ago), but not to programming in general. My documentation is inspired by the approach I followed for Python (since I haven't learned JS ...
2
votes
1
answer
1k
views
Codewars: Pick peaks
Pick peaks
Wrote my "hello world" on Thursday, so definitely a beginner. I know some Python, so not a novice to programming in general.
Question
For example, the array ...
2
votes
1
answer
127
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 ...
6
votes
2
answers
373
views
Random quote rotator
On my website, I created like this banner that rotates quotes from an array I made.
...
1
vote
1
answer
839
views
JavaScript Determine if Array has Almost Increasing Sequence
A coding challenge on a website says to determine if an array would have an increasing sequence if one element were removed from that array.
Here is the function:
...
2
votes
2
answers
2k
views
Determine if Array has an Increasing Sequence
I wrote a function in JavaScript that expects an array of integers (negative or positive) and determines if that array has an increasing sequence.
For the sake of better time performance I made the ...
2
votes
2
answers
864
views
Sorting a JavaScript array with a Regex
I'm using SharePoint 2013 JSOM. My variable this.templates contains a collection of templates with many different names. The only way to iterate through this ...
3
votes
1
answer
81
views
Packet Assembler
I found a challenge on /r/dailyprogrammer that I figured seemed fun to solve: a packet assembler. I solved it, but the feedback on that subreddit is lacking, which is why I turn to you. Each input ...
2
votes
3
answers
84
views
Improving a function from using 1-D arrays to 2-D arrays as argument
The problem:
I have a function that writes an array it takes as argument to a div, in a single line.
Example:
writeToOutput([1,2,3]) outputs
...