我在模型中定义了Knockout JS数组:
self.items = [{
firstName: 'James',
lastName: 'McConnell'
},{
firstName: 'Scott',
lastName: 'Hanselman'
},{
firstName: 'Bill',
lastName: 'Gates'
}];
我写了敲除JS函数self.VerifyName()。我想在verifyName函数中进行验证,无论是否在项目数组中存在名字和姓氏值。有人可以根据我的编码示例指导我吗?