I can not find an explanation in google map construction:
phones = ["iPhone 7", "LG G 5", "Honor 9", "Idol S4", "Nexus 6P"]; phone: Observable<string>; showPhones() { this.phone = Observable.interval(500).map(i=> this.phones[i]); } Namely interests:
map(i=> this.phones[i]); Very similar to the foreach method in the map, but not quite, so that there would be no ambiguity I decided to clarify with you that there would be no more doubts. (Just in case, I’ll clarify that the code snippet was written in TypeScript, but I met exactly this in JS)
map(i=> <div>{this.phones[i]}</div>);i.e. You will receive a new array, already with<div />elements between which there will be a text with the name of each phone. Although you can take fromthis.phonesright away.map(el => el), whereelwill be the phone name - Vasily Barbashev