2

I hope someone can help me to understand the following behaviour:

<script runat=server>
    Platform.Load("Core", "1.1.1");

    function test(args) {
        for (var i = 0; i < args.length; i++) {}
    }

    Write(Stringify(test([1,2,3,4,5])));
</script>

Output:

5

Why does this return the length of args? There is no return value for the function. In JS this will result in undefined

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.