public function addJs($js)
    {
        if (is_array($js)) {
            foreach ($js as $script) {
                $this->addJs($script);
            }

            return $this;
        }

        $this->js->push($js);

        return $this;
    }
public function addJs($js)
    {
        if (is_array($js)) {
            foreach ($js as $script) {
                $this->addJs($script);
            }

            return $this;
        }

        $this->js->push($js);

        return $this;
    }
public function addJs ( $ js ) { if ( is_array ( $ js ) ) { foreach ( $ js as $ script ) { $ this -> addJs ( $ script ) ; } return $ this ; } $ this -> js -> push ( $ js ) ; return $ this ; }
Add a javascript dependency on the view.

@param string $js

@throws AssetNotFoundException

@return $this
Add a javascript dependency on the view .