GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [js] 第644天 写一个函数时,如果有多个参数,如何传才比较好? · Issue #3457 · haizlin/fe-interview

[js] 第644天 写一个函数时,如果有多个参数,如何传才比较好? #3457

New issue
Copy link
New issue
Copy link
Open
Open
[js] 第644天 写一个函数时,如果有多个参数,如何传才比较好?#3457
Copy link
Labels
jsJavaScript

Description

@haizhilin2013
haizhilin2013
opened on Jan 18, 2021
Issue body actions

第644天 写一个函数时,如果有多个参数,如何传才比较好?

3+1官网

我也要出题

Activity

  1. haizhilin2013
    added
    jsJavaScript
    on Jan 18, 2021
  2. xujs0813 commented on Jan 19, 2021

    @xujs0813
    xujs0813
    on Jan 19, 2021
    More actions

    使用对象传递参数,利用解构为参数设置默认值
    function foo({arg1=1, arg2=2, }={})

    Reacted by HandsomeWuWu
  3. Aizener commented on Jan 21, 2021

    @Aizener
    Aizener
    on Jan 21, 2021
    More actions
    1. 用对象传;
    2. 用扩展运算符;
    3. 利用arguments。
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

    jsJavaScript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.