数组返回未定义

时间:2018-11-08 23:16:12

标签: javascript reactjs react-native

数组: Open image

componentDidMount() {
  var params = this.props.navigation.state.params;
  var nome = 'Amizade';
  var listas = params.lista;

  console.log(listas);
}

结果: Image

componentDidMount() {
  var params = this.props.navigation.state.params;
  var nome = 'Amizade';
  var listas = params.lista;

  console.log(listas.nome);
}

结果:未定义

如何搜索变量的值?

0 个答案:

没有答案