Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Implement a groupByOwners function that: Accepts an associative array

function groupByOwners(array $files) : array
{
    $result = [];

    foreach($files as $file => $owner) {
        $result[$owner][] = $file;
    }

    return $result;
}
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #Implement #groupByOwners #function #Accepts #associative #array
ADD COMMENT
Topic
Name
9+4 =