JS Built-ins
FormDatabeginner

FormData Constructor β€” truthy

πŸ“– Usage Example
const fd = new FormData()
fd.append('x', '1')
fd.append('x', '2')
fd.getAll('x')  // β†’ ['1', '2']

Use getAll() to retrieve all values for a key that has multiple entries.

FormData is truthy

An object created with new FormData() is always truthy in a boolean context.

Challenge: Verify that new FormData() is truthy.

πŸ’‘ Hints (1)
  • β€’ All objects are truthy in JavaScript