Amazon Frontend Interview Questions

After chatting for almost half an hour, can we get straight to the point?

Implement a simple file viewer using JavaScript.
On the left, there is a list of file names. When you click on a file name, the file content is displayed on the right.

Two APIs are available, both returning Promises:

GET /api/files
{ files: [“file-1.txt”, “file-2.txt”] }

GET /api/files/{filename}
{ file: “aGVsbG8gd29ybGQ=” } // renderContent(el, content) //

It’s not difficult to implement, should take around 20 minutes.
I’ve moved on, got another offer, not planning to continue with this onsite.