()
| 12 | getRandomUser(); |
| 13 | |
| 14 | async function getRandomUser() { |
| 15 | const res = await fetch("https://randomuser.me/api"); |
| 16 | const data = await res.json(); |
| 17 | console.log(data); |
| 18 | |
| 19 | const user = data.results[0]; |
| 20 | console.log(user); |
| 21 | |
| 22 | const newUser = { |
| 23 | name: `${user.name.first} ${user.name.last}`, |
| 24 | money: Math.floor(Math.random() * 1000000), |
| 25 | }; |
| 26 | |
| 27 | addData(newUser); |
| 28 | } |
| 29 | |
| 30 | function doubleMoney() { |
| 31 | data = data.map((user) => { |
no test coverage detected