Numbers and Strings

Numbers and Strings
πŸ‘¨β€πŸ’Ό We're building a product catalog system. Our first task is to create variables that store product information with proper types.
We need to track:
  • Product prices (numbers)
  • Product names (strings)
  • Product descriptions (strings with template literals)
🐨 Open
index.ts
and complete the following tasks:
  1. Create price with type number set to 29.99
  2. Create productName with type string set to "TypeScript Guide"
  3. Create quantity with type number set to 100
  4. Create description as a string (prefer a template literal) with this exact value: Product: TypeScript Guide | Price: $29.99 | In Stock: 100

Required exports

Export: price, productName, quantity, description

Completion criteria

  • price is the number 29.99
  • productName is "TypeScript Guide"
  • quantity is the number 100
  • description matches the exact formatted string above (including $, spaces, and | separators)
πŸ’° Template literals let you embed expressions inside a string.

Please set the playground first

Loading "Numbers and Strings"
Loading "Numbers and Strings"