public function addJs($handle = false, $src = null, $dependency = null, $footer = false)
    {
        return $this->scripts[$handle] = new Javascript($handle, $src, $dependency, $footer);
    }
public function addJs($handle = false, $src = null, $dependency = null, $footer = false)
    {
        return $this->scripts[$handle] = new Javascript($handle, $src, $dependency, $footer);
    }
public function addJs ( $ handle = false , $ src = null , $ dependency = null , $ footer = false ) { return $ this -> scripts [ $ handle ] = new Javascript ( $ handle , $ src , $ dependency , $ footer ) ; }
Javascript wrapper.

Gets or sets javascript assets

@param bool|string  $handle
@param string       $src        Asset source
@param array|string $dependency Dependencies
@param bool         $footer     Whether to show in header or footer

@return AssetElementInterface Setting returns asset array, getting returns asset HTML
Javascript wrapper .