Skip to content

Instantly share code, notes, and snippets.

@NhanKhangg98
Created September 11, 2022 08:59
Show Gist options
  • Save NhanKhangg98/086d3f56ac96bea9742ead9dafa5b664 to your computer and use it in GitHub Desktop.
Save NhanKhangg98/086d3f56ac96bea9742ead9dafa5b664 to your computer and use it in GitHub Desktop.
const players = [
{jersey:56,name:"Djounte Murray",position:"Point guard",PPG:2.6},
{jersey:98,name:"Dennis Rodman",position:"Small Forward",PPG:10.8},
{jersey:1,name:"Michael Jordan",position:"Small Forward",PPG:345.6},
{jersey:2,name:"Lebron James",position:"Shooting Guard",PPG:26.7},
{jersey:33,name:"Patrick Ewing",position:"Center",PPG:20.2}
]
const player2 = players.map((key, value) => {
if (key === PPG) return Math.floor(value);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment