JavaScript-Developer-I 試験問題 76

A developer is required to write a function that calculates the sum of elements in an
array but is getting undefined every time the code is executed. The developer needs to find
what is missing in the code below.
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?
  • JavaScript-Developer-I 試験問題 77

    通常の機能定義と比較して、ファットアラーで定義された機能の2つのユニークな機能は何ですか?
    2つの答えを選択してください
  • JavaScript-Developer-I 試験問題 78

    次のコードが与えられます:
    カウンター=0;
    const logCounter =()=> {
    console.log(counter);
    );
    logCounter();
    setTimeout(logCOunter、1100);
    setInterval(()=> {
    Counter ++
    logCounter();
    }、1000);
    最初の4つのログステートメントによって何がログに記録されますか?
  • JavaScript-Developer-I 試験問題 79

    開発者には、firstNameとlastNameの2つの引数を取り、文字列を返すformatName関数があります。彼らはスケジュールしたい
    5秒後に1回実行する関数。
    この関数をスケジュールするための正しい構文は何ですか?
  • JavaScript-Developer-I 試験問題 80

    次のコードが与えられます:

    02行目の条件文のどの置換により、開発者はページ上のボタンがクリックされたと正しく判断できますか?