Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 932 Bytes

FunctionDeclaration.md

File metadata and controls

74 lines (63 loc) · 932 Bytes

FunctionDeclaration

FunctionDeclaration

function aaa(a: string, b?: string, c: string = undefined) {
    const d = 123;
    const e = b + 123;
    return `1${a}2${e}3${c}4${d}`;
}

aaa('1', '2', '3');

const bbb = (x: string) => "222";

bbb("1");

const a = {
    b() {
        return "111";
    }
};

const b = {
    b: function () {
        return "111";
    }
};

const c = {
    b: () => {
        return "111";
    }
};

c.b();

if (b) {
    bbb('');
}
function aaa($a, $b = null, $c = null) {
    $d = 123;
    $e = $b . 123;
    return "1" . $a . "2" . $e . "3" . $c . "4" . $d;
}
aaa("1", "2", "3");
$bbb = function ($x){
return "222";
};
$bbb("1");
$a = array(
    "b" => function () {
        return "111";
    }
);
$b = array(
    "b" => function () {
        return "111";
    }
);
$c = array(
    "b" => function () {
        return "111";
    }
);
$c["b"]();
if ($b) {
    $bbb("");
}