RAPID
  • Introduction
  • Quick start
  • Resources
    • Debugging
    • Compiler
    • Rapid CLI
    • Project structure
  • Language
    • Types [proposal]
    • Variables [proposal]
    • Functions
  • Sources
    • Github
Powered by GitBook
On this page
  • Example variable declaration
  • Definition

Was this helpful?

  1. Language

Variables [proposal]

PreviousTypes [proposal]NextFunctions

Last updated 5 years ago

Was this helpful?

Example variable declaration

Variable must be of one of known .

let test = 12
let users: string[] = ['Annie', 'John']

You don't need to declare variable type for basic types like numbers and strings - they are inferred automatically. Type declaration is necessary in complex data structures like Arrays, Sets etc.

Definition

 let <variable_name>: <type>? = <value>
Types