map with if condition in js

Solutions on MaxInterview for map with if condition in js by the best coders in the world

showing results for - "map with if condition in js"
Lilian
05 Jun 2018
1    row = this.props.cells.map(function(cell, i) {
2
3        if(cell.URL != null && cell.URL.length > 0){
4            return <td className={cell.Meta.HTMLClass} key={i}>{cell.Text}</td>;        
5        }
6        else {
7            return <td className={cell.Meta.HTMLClass} key={i}>{cell.Text}</td>;
8        }
9
10    }.bind(this));
11