Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To define a variable, use the let or const keyword. Don’t use var as it is a global variable and can conflict with interceptor, app and CRM.

Code Block
languagejs
let someString = 'some-string'

let someNumber = 69

let someBool = true

const array = ['string', 69, true]

const object = {
  key: 'value',
  'key-word': 'value',
}

...

use backticks and ${}

Code Block
languagejs
const string = 'pricefx'
const formatted = `Hi ${string}`
console.log(formatted) // Hi pricefx