JS Built-ins
FormDatabeginner

FormData Constructor β€” starts empty

πŸ“– Usage Example
const fd = new FormData()
fd.append('file', new Blob(['data']), 'file.txt')
fd.get('file').name  // β†’ 'file.txt'

FormData can hold Blob or File objects for file uploads.

FormData starts empty

A freshly created FormData has no entries.

Challenge: Verify that Array.from(new FormData().entries()).length is 0.

πŸ’‘ Hints (1)
  • β€’ Use Array.from() to convert the iterator returned by entries()