Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse integer in for javascript

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reverse #integer #javascript
ADD COMMENT
Topic
Name
7+6 =