public static function js(array $array, $params = array(
        'attributes' => array(),
        'secure' => null
    ))
    {
        Arr::mergeWithDefaultParams($params);

        if (!$params['secure']) {
            try {
                $params['secure'] = Utils::isHTTPS();
            } catch (Exception $e) {

            }
        }

        $out = "\n";

        foreach($array as $key => $item){
            if(is_array($item)){
                $out .= Html::script($item[0], $item[1], $item[2])."\n";
            } else {
                $out .= Html::script($item, $params['attributes'] ?: [], $params['secure'])."\n";
            }
        }


        return $out;
    }
public static function js(array $array, $params = array(
        'attributes' => array(),
        'secure' => null
    ))
    {
        Arr::mergeWithDefaultParams($params);

        if (!$params['secure']) {
            try {
                $params['secure'] = Utils::isHTTPS();
            } catch (Exception $e) {

            }
        }

        $out = "\n";

        foreach($array as $key => $item){
            if(is_array($item)){
                $out .= Html::script($item[0], $item[1], $item[2])."\n";
            } else {
                $out .= Html::script($item, $params['attributes'] ?: [], $params['secure'])."\n";
            }
        }


        return $out;
    }
public static function js ( array $ array , $ params = array ( 'attributes' => array ( ) , 'secure' => null ) ) { Arr :: mergeWithDefaultParams ( $ params ) ; if ( ! $ params [ 'secure' ] ) { try { $ params [ 'secure' ] = Utils :: isHTTPS ( ) ; } catch ( Exception $ e ) { } } $ out = "\n" ; foreach ( $ array as $ key => $ item ) { if ( is_array ( $ item ) ) { $ out .= Html :: script ( $ item [ 0 ] , $ item [ 1 ] , $ item [ 2 ] ) . "\n" ; } else { $ out .= Html :: script ( $ item , $ params [ 'attributes' ] ? : [ ] , $ params [ 'secure' ] ) . "\n" ; } } return $ out ; }
Load and output a js script tag from array

@param array $array
@param array $params
@return string
@throws \Exception
Load and output a js script tag from array