此作业在javascript中有什么作用?我找不到有关它的任何文档。
// Save state
private Parcelable recyclerViewState;
recyclerViewState = recyclerView.getLayoutManager().onSaveInstanceState();
// Restore state
notifyItemChanged(position);
recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState);
答案 0 :(得分:6)
在更现代的ES / JS版本中,它大致等同于
const name = request.body.name;
const email = request.body.email;
它被称为Object Destructuring。