logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is Shift() method in Javascript?


  • Correct Answer
  • -The shift() method is similar as the pop() method but the difference is that Shift method works at the beginning of the array -The shift() method take the first element off of the given array and returns it The array on which is called is then altered For example var myarray = ["apple ", "banana ", "mango "]; consolelog(myarrayshift()); consolelog(myarray); we get the following console output: apple ["banana ", "mango "]; When we call shift() on an empty array, it will return an undefined value 


  • Technology problems


    Search Results


    • 1. What are Math Constants and Functions using JavaScript?
    • Discuss
    • 2. How to create arrays in JavaScript?
    • Discuss
    • 3. How to read and write a file using javascript?
    • Discuss
    • 4. What does isNaN function do?
    • Discuss
    • 5. What are windows object and navigator object in JavaScript?
    • Discuss
    • 6. Explain VBScript in detail.
    • Discuss
    • 7. .What are the different types of environments available in the web?
    • Discuss
    • 8. What is website?
    • Discuss
    • 9. What is web portal?
    • Discuss
    • 10. What is web application?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment