jjzjj

renderCreditNote

全部标签

javascript - 'instanceof' 的右侧不可调用

我正在关注thistutorial“检测”唯一数字是否在数组对象中。这个数字是一个字符串。我习惯于在RubyonRails中检测,所以我在React(JavaScript)中寻找等效项:ES6:...//thiswillbe"data"in"this.props.data"data=[{id:1,order_id:"44",name:"Someordernumbername",},{id:2,order_id:"65",...,}]//letnum="44";JustforthisexamplerenderCreditNote(num){if(numinstanceofthis.pro