Skip to content

戻り値で変数に入れるか入れないかがわかりにくい #20

Description

@chvmvd

下手に変数を作ったことによって、何が起こったのかわかりにくくなってしまっていた。

function add(a, b) {
  return a + b;
}

document.write("1と2の和は" + /* ここで関数を呼び出し、1と2の和を求めてください。 */ + "で、3と4の和は" + /* ここで関数を呼び出し、3と4の和を求めてください。 */ + "です。");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions