Spec-Zone.ru › ColdFusion

isArray

Determines whether a value is an array. True, if value is an array, a query column object, or XML. also number = Dimension; function tests whether the array has exactly this dimension

isArray(value [, number]) → returns boolean

  • CF3+
  • Lucee
  • BL 1.0.0+
  • See Also: isStruct arrayIsEmpty

    Argument Reference

    value any
    Required

    The array in which to check.

    number numeric

    Dimension of the array.

    Examples
    Sample code invoking the isArray function

    simple isArray example

    For CF 9+ CF 10+

    colorArray = ['yellow','green','red'];
    writeOutput(isArray(colorArray));

    Expected Result: yes

    simple isArray example

    For Lucee 4.5+

    colorArray = ['yellow','green','red'];
    writeOutput(isArray(colorArray));

    Expected Result: true

    isArray example with number

    For CF 9+ CF 10+

    numberArray = [1,2,3];
    writeOutput(isArray(numberArray,1));

    Expected Result: yes

    isArray example with number

    For Lucee 4.5+

    numberArray = [1,2,3];
    writeOutput(isArray(numberArray,1));

    Expected Result: true

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/isarray

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API