此作业在javascript中有什么作用?

时间:2019-06-05 12:20:09

标签: javascript node.js

此作业在javascript中有什么作用?我找不到有关它的任何文档。

// Save state
private Parcelable recyclerViewState;
recyclerViewState = recyclerView.getLayoutManager().onSaveInstanceState();

// Restore state
notifyItemChanged(position);
recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState);

1 个答案:

答案 0 :(得分:6)

在更现代的ES / JS版本中,它大致等同于

const name = request.body.name;
const email = request.body.email;

它被称为Object Destructuring