Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-3 votes
3 answers
172 views

Concise way to validate all 5 conditions [closed]

In this code, I am validating whether one is filling the username, password, first name, last name, and gender. However, the way I am doing it is that I have separate ...
ShadowKnight700's user avatar
1 vote
1 answer
77 views

String represents a road. One character travels on the road obeying the stops - Code challenge (advent.js day 5)

This is my code to solve the 5th Adventjs challenge. In that link you can read the instructions. How can I improve it? It's a bit messy... and I'm repeating some part of the code. All must be in just ...
Sofia Chardin's user avatar
2 votes
1 answer
64 views

JS animated string builder

Today, I tried to write a simple function that would display the characters of my string one by one by iterating over a string containing the letters of the alphabet and showing the steps on the ...
Luca Natale's user avatar
0 votes
1 answer
74 views

Convert strConflictedYesReviewers data into a single object which is grouped by ownerid and make array of opportunityid

I get a dynamic string(strConflictedYesReviewers) which contains multiple user recordswhere each record is separated by semicolon and then each record represents ownerid and opportunityid separated by ...
Karim Ali's user avatar
  • 105
3 votes
1 answer
327 views

Transform textarea input into camelCase

The code below transforms the text area's input to camelCase. I am wondering if this code is considered correct to write in terms of performance and readability and if not, what are your improvements? ...
noharm's user avatar
  • 51
1 vote
2 answers
110 views

Return amount of X in a string

I wrote code that returns how many of X is inside a string. The script works fine, but i was wondering if there could be any changes to improve it. ...
antonio-erick's user avatar
1 vote
1 answer
119 views

get address parts based on requested parts

I have different format of address in an array, those format looks like this ...
Crocsx's user avatar
  • 111
2 votes
2 answers
166 views

Function to find substring in a list of strings and add them to the resulting list

I am trying to look for a substring in a list of strings. My end result is an array that contains the presence of substring first based on course.name and then ...
user2140740's user avatar
2 votes
1 answer
558 views

word frequency distribution

wordList is an array of non-empty strings ("words"). The following code I have written with the purpose of obtaining a Map, containing the unique words ...
Jada's user avatar
  • 23
2 votes
3 answers
1k views

Find the 'n' most frequent words in a text, aka word frequency

I'm doing freeCodeCamp's Coding Interview Prep to improve my JavaScript skills. This challenge is called "Word Frequency", and is based on the Rosetta Code's entry of the same name. The ...
NPN328's user avatar
  • 771
1 vote
1 answer
46 views

Convert string to object array javascript

I want to convert string to object array. Suppose I have following string. const str = "someValue,display"; I want to convert it like following. ...
ketan's user avatar
  • 113
3 votes
1 answer
111 views

garbage string remover with array or object input

This is the second time I am writing any practical JavaScript so it is pretty likely that I have messed something up. I am beginner, so just need a piece of advice before sharing the code: Do I need ...
Book Of Flames's user avatar
2 votes
3 answers
122 views

Check if array of strings have the same substring

I have a list of files that conform to a template like this: XXX_{project}_{variation}---XXX.html and ...
Renaud is Not Bill Gates's user avatar
1 vote
3 answers
171 views

Run-length coder

I have this code, which counts only adjacent letters in a string and returns the count of each letter. ...
uday8486's user avatar
  • 111
2 votes
2 answers
453 views

Numeronym generation

Problem statement I need to generate numeronyms from a string, let's say qwerty as follows: qwerty q1erty q2rty q3ty q4y Code ...
Vinay Sharma's user avatar

15 30 50 per page
1
2 3 4 5
15