Questions tagged [ecmascript-6]
ECMAScript 6 reached feature complete status in 2014. The features vary widely from completely new objects and patterns to syntax changes to new methods on existing objects.
664 questions
10 votes
3 answers
2k views
A Rubik's Cube game in Python
I implemented this Rubik's Cube game in Python, using Canvas and Context2d for user interaction. This was mainly an exercise in &...
1 vote
1 answer
106 views
Axios wrapper used with API requests
I have created Axios wrapper following SOLID principles. Is there any feedback on improving it's structure in a more cleaner and better way? axiosconfig.ts ...
6 votes
1 answer
158 views
Support Captain Picker in Vanilla JavaScript
I have been tinkering about a program that would pick the support "captain" of the day on workdays with the following rules: Program should only pick a captain on weekdays (Mon. to Fri.). ...
2 votes
3 answers
231 views
Efficiently tagging first and last of each object matching condition
How can I make the code more readable and more efficient? (provided code is O(n²) time, but intuition says it can be pre-processed and done in O(n) time) Description it tags the first and last of ...
2 votes
1 answer
104 views
Combining multiple regexps using the `|` operator and grouping the regexps by their flags
I've implemented a function that creates a multiple regular expressions predicate. The idea behind the predicate is combining regular expressions using the disjunction operator ...
1 vote
1 answer
87 views
A Chrome extension for analytics debugging: code to render the popup
I made an extension and got it to the point where it does what I want how I want. At this point, I have a little capacity to work on code refactoring, readability and such. And I would love some ...
4 votes
2 answers
475 views
Detecting when a user stops typing
I wanted to detect when a user stops typing. I encountered this answer from SO (Not the selected answer, but the second one which seem to be better): https://stackoverflow.com/a/5926782/17746636 But I ...
4 votes
2 answers
214 views
Abundant number implementation
I have implementted a simple JavaScript function to find the list of abundant numbers and print them on the screen. an abundant number is a number for which the sum of its proper divisors is greater ...