public function constructJavaScript($variables)
    {
        return $this->constructNamespace() . collect($variables)->map(function ($value, $name) {
            return $this->initializeVariable($name, $value);
        })->implode('');
    }
public function constructJavaScript($variables)
    {
        return $this->constructNamespace() . collect($variables)->map(function ($value, $name) {
            return $this->initializeVariable($name, $value);
        })->implode('');
    }
public function constructJavaScript ( $ variables ) { return $ this -> constructNamespace ( ) . collect ( $ variables ) -> map ( function ( $ value , $ name ) { return $ this -> initializeVariable ( $ name , $ value ) ; } ) -> implode ( '' ) ; }
Translate the array of PHP variables to a JavaScript syntax.

@param  array $variables
@return array
Translate the array of PHP variables to a JavaScript syntax .