How to add input tag inside the for loop.
we had a number of 6 . so want 6 input tag show in the UI.
for that what would be the code.
render() {
return (
Team Size:
N/A
1
2
3
4
<div>Selected value is : {this.state.selectValue}</div>
{
for (let i = 0; i< this.state.selectValue; i++) {
<input type="text" />
}
}
</div>
</div>
2
Answers
How about this?
You may use for loop here as well instead of […Array(n)].map().