Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to find count and last element of array using Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 116
    Comment on it

    Hello Reader's If you are working on Javascript and want to get the count of array then you can use the syntax as below:-

    var car = ["mode1", "model2", "model4", "model5"];
    car.length;
    

    output:

    4
    

    And if you want to get last element of array then you can use the pop() syntax

      var car = ["mode1", "model2", "model4", "model5"];
    a.pop(); 
    

    Output:-

    model5
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: