Question · Vibe coding with Claude Code course · Module 7: LinkedIn clone

Quiz: The jobTypes list with as const

Why does the type field in JobPost come from the jobTypes array written with as const?

Answer options

  • The same list gives a TypeScript union and z.enum on the server, so a value outside the list passes neither in code nor in the form
  • as const speeds up loading the page with offers
  • Thanks to it the browser shows English labels by itself
  • The array lets you add new contract types while the app is running

You can check the correct answer by solving this task in the CodeWorlds game.