assistance-engine/docs/developer.avapframework.com/chapter8_5.md

365 B

Practical Example

Below is a practical example that illustrates the use of expressions in AVAP™ with lists:

// Definition of a list of numbers
numbers = [1, 2, 3, 4, 5]

// Calculation of the sum of the elements
total = sum(numbers)  // Output: 15

// Checking if a number is present in the list
is_present = 6 in numbers  // Output: False