30秒学会 JavaScript 片段 – sortCharactersInString
Alphabetically sorts the characters in a string. Use the spread operator (…), Array.prototype.sort...
Alphabetically sorts the characters in a string. Use the spread operator (…), Array.prototype.sort...
Returns true if the given string is an absolute URL, false otherwise. Use a regular expression to te...
Returns True if the given string is a palindrome, False otherwise. Use s.lower() and re.sub() to con...
Compare two strings and returns true if both strings are anagram, false otherwise. Use count_chars()...
Converts a string to kebab case. Use range and strings.Fields() to iterate over the words in the str...
Reverses a string. Use String.split(”) and Iterable.reversed to reverse the order of the runes in t...
Checks if a string is lower case. Convert the given string to lower case, using String.toLowerCase()...
Converts a string to kebab case. Use Regex.Matches() with an appropriate regular expression to break...
Take a number and return specified currency formatting. Use Intl.NumberFormat to enable country / cu...
Converts a string to a URL-friendly slug. Uses preg_replace() to replace invalid chars with dashes, ...