30秒学会 JavaScript 片段 – without
Filters out the elements of an array, that have one of the specified values. Use Array.prototype.fil...
Filters out the elements of an array, that have one of the specified values. Use Array.prototype.fil...
Truncates a string up to a specified length. Use len() to determine if the length is greater than l....
Returns the distinct values in a list. Use List.toSet() to get the distinct values in the list, Set....
Converts the given value to a string. Use fmt.Sprintf() with the “%v” format specifier to convert th...
Capitalizes the first letter of a string. Use string.ToCharArray() to convert the string to an array...
Returns an array with n elements removed from the beginning. Use Array.prototype.slice() to create a...
Returns a string with whitespaces compacted. Use String.replaceAll() with a regular expression to re...
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...
Rotates the array (in left direction) by the number of shifts. Given the $shift index, merge the arr...
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...