Skip to content

Instantly share code, notes, and snippets.

@michaelnagy
Last active July 3, 2017 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelnagy/a40ef518840e81b9a3ea7a498cb82ff0 to your computer and use it in GitHub Desktop.
Save michaelnagy/a40ef518840e81b9a3ea7a498cb82ff0 to your computer and use it in GitHub Desktop.
let radio = []
for (var prop in allusers) {
let i = 0
if (allusers[prop].oid === uid ) {
radio[i] =
<TableRow>
<TableRowColumn style={ajusteA}>{allusers[prop].date}</TableRowColumn>
<TableRowColumn>{allusers[prop].message}</TableRowColumn>
<TableRowColumn>{allusers[prop].type}</TableRowColumn>
</TableRow>
i++
}
}
// Using push instead of a counter
let radio = []
for (var prop in allusers) {
if (allusers[prop].oid === uid ) {
radio.push(
<TableRow>
<TableRowColumn style={ajusteA}>{allusers[prop].date}</TableRowColumn>
<TableRowColumn>{allusers[prop].message}</TableRowColumn>
<TableRowColumn>{allusers[prop].type}</TableRowColumn>
</TableRow>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment