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
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
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
8 votes
1 answer
4k views

JavaScript string to Unicode (Hex)

This set of questions are related to a project I've published for converting characters, or strings, to Hex based Unicode; eg... ...
S0AndS0's user avatar
  • 978
2 votes
1 answer
84 views

Receive an array input and output a string

I have some code which is working, but I would be interested if anyone could review it and tell me if there is a more efficient way of achieving my goal. I receive input from a data source as an ...
Malcolm Whild's user avatar
4 votes
2 answers
899 views

JavaScript number obfuscater

I got inspired to do this after seeing this repo containing a bunch of weird syntactical quirks in JS, namely this example called "It's a fail!". The example was essentially the following: You would ...
Geza Kerecsenyi's user avatar
17 votes
4 answers
10k views

Cropping a message using array splits

I am trying to write a simple function to crop a given message to a specific length but at the same time not to cut the words in between and no trailing spaces in the end. Example: Input String: ...
beNerd's user avatar
  • 271
6 votes
2 answers
374 views

Random quote rotator

On my website, I created like this banner that rotates quotes from an array I made. ...
Black Jesus's user avatar
2 votes
2 answers
866 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 ...
Treycos's user avatar
  • 340
2 votes
0 answers
47 views

Multilang sentence to N-gram

Task: Transform sentence to n-gram and remove all punctuation Tests: Input: ngram('Name, + other ~ name!', 1) Result: ['Name', 'other', 'name'] Input: ngram('Name, + other ~ name!', 2) ...
Stepan Vanzuriak's user avatar
3 votes
1 answer
5k views

Codewars "Consecutive strings" kata

The challenge description is as follows: You are given an array strarr of strings and an integer k. Your task is to return the ...
Phrancis's user avatar
  • 20.5k
5 votes
2 answers
724 views

Finding substrings within arrays

I need to find the substrings within my array. If I have an array: ["abc", "abcd", "abcde", "xyz"], my method should return the array members: ...
Mr.7's user avatar
  • 233
2 votes
2 answers
114 views

Implementing a Sort for an Array

Yesterday, I gave an interview after a long time, and I was asked a question which I couldn't solve on the spot. I had to implement a sort function for a Array of strings in JavaScript, with the ...
Devdatta Tengshe's user avatar
4 votes
3 answers
16k views

Reverse string in JavaScript without using reverse()

I have to reverse a string in JavaScript and cannot use the built in reverse() function. It does not seem efficient to have to create two arrays but is there a ...
Andy's user avatar
  • 583
1 vote
1 answer
78 views

Concat strings from Object or Array

How would you merge these two functions into a single more generic function? ...
jdsninja's user avatar
  • 177
26 votes
2 answers
133k views

Extract numbers from a string-Javascript

Consider the following string in javascript: var string="border-radius:90px 20px 30px 40px"; I want to extract the 4 numbers from that string and store them in ...
cssGEEK's user avatar
  • 947

15 30 50 per page