pub fn evaluate_array_method_with_scope<V: VariableProvider>(
arr_value: &Value,
method: &ArrayMethodCall,
global_vars: &V,
local_vars: &mut HashMap<String, Value>,
) -> Result<Value, ExecutionError>Expand description
Evaluate an array method with scope.
Supports dual-dispatch: methods like .length, .includes(), .indexOf(),
.slice(), and .concat() work on both arrays and strings (matching JS behavior).
Array-only methods (.map(), .filter(), etc.) produce a clear error on strings.