...
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
const string = 'pricefx' const formatted = `Hi ${string}` console.log(formatted) // Hi pricefx |