In Javascript, what is an options object?

后端 未结 4 1240
忘掉有多难
忘掉有多难 2021-02-12 13:33

Now I have googling this a lot, but I cant seem to find what I am looking for. I am not talking about the options object that does drop down menus, I am talking about seeing st

4条回答
  •  青春惊慌失措
    2021-02-12 14:11

    There is no standard, universal object called options.

    Most likely what's meant is that the library you're using happens to have a variable named options that has properties like remove, enable, and instance.

    It's fairly common for library functions to take an options argument specifying... well... options — that is, supplementary settings the function can exploit. In cases where there are many variables you may want to set, a single object with those properties is cleaner than a function that takes a hundred ordered arguments.

提交回复
热议问题