public function removeJs($handle = null)
    {
        if (is_null($handle)) {
            return $this->scripts = [];
        }

        if (is_bool($handle)) {
            foreach ($this->scripts as $i => $javaScript) {
                if ($javaScript->isFooter() === $handle) {
                    unset($this->scripts[$i]);
                }
            }

            return;
        }

        unset($this->scripts[$handle]);
    }
public function removeJs($handle = null)
    {
        if (is_null($handle)) {
            return $this->scripts = [];
        }

        if (is_bool($handle)) {
            foreach ($this->scripts as $i => $javaScript) {
                if ($javaScript->isFooter() === $handle) {
                    unset($this->scripts[$i]);
                }
            }

            return;
        }

        unset($this->scripts[$handle]);
    }
public function removeJs ( $ handle = null ) { if ( is_null ( $ handle ) ) { return $ this -> scripts = [ ] ; } if ( is_bool ( $ handle ) ) { foreach ( $ this -> scripts as $ i => $ javaScript ) { if ( $ javaScript -> isFooter ( ) === $ handle ) { unset ( $ this -> scripts [ $ i ] ) ; } } return ; } unset ( $ this -> scripts [ $ handle ] ) ; }
Remove a javascript asset, or all.

@param string|null $handle Remove all if `NULL`, section if `TRUE` or `FALSE`, asset if `string`

@return mixed Empty array or void
Remove a javascript asset or all .