30秒学会 PHP 片段 – flatten
Flattens an array up to the one level depth. Use array_push(), splat operator and array_values() to ...
Flattens an array up to the one level depth. Use array_push(), splat operator and array_values() to ...
Evaluates the binomial coefficient of two integers n and k. Use Number.isNaN() to check if any of th...
Converts a string to title case. Break the string into words, using a regexp, and combine them capit...
Reverses a string Use make() to create an appropriate rune slice. Use range and len() to iterate ove...
Returns true if the provided predicate function returns true for at least one element in a collectio...
Checks if the given argument is a number. Use typeof to check if a value is classified as a number p...
Assigns default values for all properties in an object that are undefined. Use Object.assign() to cr...
Makes a DELETE request to the passed URL. Use XMLHttpRequest web api to make a delete request to the...
Flattens a list. Use recursion. Use Iterable.expand() to combine elements into a single list, callin...
A hook that implements setInterval in a declarative manner. Create a custom hook that takes a callba...