Question Most Common
Given an array with null values, how would you return a new array without any nulls?
pain07m
November 5, 2025

Answer

Use the reject function to filter out all null values from the array.

Code:

a!localVariables(
local!data: { 1, null, 6, 8, null, 19, 30, null },
reject(fn!isnull, local!data)
)

Output:

1762361173723-8jwxnqthqu8.png


JuniorExpressions#coding
Loading comments...