How To Make A Array As A Stack Using JavaScript

How To Make A Array As A Stack Using JavaScript


  • 14 Mar, 2012

    The pop() and push() functions turn a harmless array into a stack in JavaScript...<script type="text/javascript">var numbers = ["one", "two", "three", "four"];numbers.push("five");numbers.push("six");document.write(numbers.pop());document.write(numbers.pop());document.write(numbers.pop());</script>This producessixfivefour

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.