Skip to content

Variables

There are 2 types of variables in TuffSeal. - let - const

Variables are declared using let or const.

For example:

let x = 5;
const y = 10;

let

  • Mutable
  • Can be reassigned
let x = 1;
x = 2;

const

  • Immutable
  • Cannot be reassigned
  • Constant arrays and dictionaries are deeply immutable

WARNING: Reassigning a const variable is a runtime error.