scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Solution - Totally Private Data Farm
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

To see this lesson you need to be logged in. Joining Scrimba is free and gives you access to 20+ courses.Sign up
Solution - Totally Private Data Farm
AboutCommentsNotes
Solution - Totally Private Data Farm
Expand for more info
index.js
run
preview
console
import userData from "./data.js";

/* Totally Private Data Farm

Good news, renown advertising firm Evil Corp. wants to purchase our
private user data!

We'd never do this in real life of course, but just for practice
let's pretend we're unethical web hackers and transform the data
in the way Evil Corp. has requested. They're quite particular and
just want an array of users with a fullname and human readable
birthday.

Write a function that maps through the current data and returns
a new an array of objects with only two properties:
fullName and birthday. Each result in your
array should look like this when you're done:

{
fullName: "Levent Busser",
birthday: "Fri Aug 20 1971"
}

Read about toDateString() for info on formatting a readable date.

*/
function transformData(data){

}

console.log(transformData(userData));
Console
undefined
,
/index.html
-2:17