📜  javascript代码示例中的反向整数

📅  最后修改于: 2022-03-11 15:04:17.990000             🧑  作者: Mango

代码示例3
var text = ""
var i = 0
var array = ["1", "2", "3"]
var number = array.length
var arrayFinal = []

for (i = 0; i < array.length; i++) {
    text = array[number - 1]
    arrayFinal.push(text)
    text = ""
    number = number - 1
}

console.log(arrayFinal)