Function inversion

  • 反转数组或者字符串

    Parameters

    • value: any

    Returns any

    inversion([1, 2, 3]); /// [3, 2, 1]
    inversion('123'); /// '321'
    inversion(); /// undefined
    inversion(true); /// true