Basics

SuiteScript Operators

SuiteScript Operators

SuiteScript operators include arithmetic and logical extending JavaScript.

Introduction to SuiteScript Operators

SuiteScript is a powerful JavaScript-based API used for automation and customization within NetSuite. Operators in SuiteScript include a wide range of arithmetic and logical operators that extend JavaScript's functionality, allowing developers to build complex scripts for business logic processing.

Arithmetic Operators

Arithmetic operators are used to perform mathematical calculations. Here are some of the most commonly used arithmetic operators in SuiteScript:

  • + : Addition
  • - : Subtraction
  • * : Multiplication
  • / : Division
  • % : Modulus (remainder)

Logical Operators

Logical operators are essential for making decisions in scripts. These operators allow you to perform logical operations and return a boolean result (true or false). Here are the primary logical operators:

  • && : Logical AND
  • || : Logical OR
  • ! : Logical NOT

Comparison Operators

Comparison operators are used to compare two values, and they return a boolean value. These operators are crucial in conditional statements and loops:

  • == : Equal to
  • != : Not equal to
  • === : Strict equal to
  • !== : Strict not equal to
  • > : Greater than
  • < : Less than
  • >= : Greater than or equal to
  • <= : Less than or equal to

Using Operators in SuiteScript

Understanding how to use these operators is fundamental to creating effective SuiteScript solutions. They allow you to manipulate data, control the flow of your scripts, and implement complex business logic. As you continue developing your SuiteScript skills, these operators will become essential tools in your programming toolbox.

Previous
Data Types