function gg() {
if (flag < a.length) {
a.filter((her => her.name='Privet'))[flag];
console.log(a[flag]);
a.filter((her => her.name='NONE'))[flag-1];
console.log(a[flag-1]);
// } //else {
// flag = 0;
}
flag++;
var a = [
{name: 'John', age: 25, states}
....
]
не изменяеться ReactDOM.render(<App automobile={data} />, document.getElementById('app'));
render () {
const automobile = this.props.automobile;
return (
<div>
{automobile.map(n => (
<div className="Cars" headerText={n.name}>
....
</div>
))}
</div>
);
}