How to get the first element of an array?

How do you get the first element from an array like this:

var ary = ['first', 'second', 'third', 'fourth', 'fifth'];

I tried this:

alert($(ary).first());

But it would return [object Object]. So I need to get the first element from the array which should be the element 'first'.

134 thoughts on “How to get the first element of an array?”

  1. Greetings from California! I’m bored to tears at
    work so I decided to check out your website on my iphone during lunch break.

    I love the knowledge you present here and can’t wait to take a look when I get home.
    I’m amazed at how quick your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyhow, amazing blog!

    Reply
  2. Hey I know this is off topic but I was wondering if you knew of any widgets I could add
    to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have
    some experience with something like this. Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new
    updates.

    Reply
  3. Hello! I just wanted to ask if you ever have any problems with hackers?

    My last blog (wordpress) was hacked and I
    ended up losing months of hard work due to no back up.
    Do you have any methods to stop hackers?

    Reply
  4. hey there and thank you for your info – I’ve certainly
    picked up anything new from right here. I did however expertise some technical issues using this site, as I experienced to reload the web site lots of times previous to I could get it to load correctly.
    I had been wondering if your web host is OK? Not that
    I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your quality score if
    ads and marketing with Adwords. Anyway I’m adding this RSS to my email
    and could look out for a lot more of your respective exciting content.
    Ensure that you update this again soon. cheap flights http://1704milesapart.tumblr.com/ cheap flights

    Reply
  5. Wow, fantastic blog structure! How long have you ever been blogging for? you make blogging look easy. The full look of your website is excellent, let alone the content!

    Reply
  6. I’m really enjoying the theme/design of your blog. Do you ever run into any web browser
    compatibility problems? A few of my blog audience have complained about
    my blog not working correctly in Explorer but
    looks great in Chrome. Do you have any tips to help fix
    this problem?

    Reply
  7. Aw, this was an exceptionally good post. Spending some time
    and actual effort to produce a superb article… but what can I say… I procrastinate a whole lot and never manage to
    get anything done.

    Reply
  8. Howdy just wanted to give you a quick heads up. The text in your
    content seem to be running off the screen in Internet explorer.
    I’m not sure if this is a formatting issue or something
    to do with internet browser compatibility but I thought I’d post
    to let you know. The design and style look great though! Hope you
    get the problem resolved soon. Many thanks

    Reply
  9. Hello! This post could not be written any better! Reading this post reminds me of my good old room mate!

    He always kept talking about this. I will forward this page to him.
    Pretty sure he will have a good read. Many thanks for sharing!

    Reply
  10. I am really enjoying the theme/design of your weblog.
    Do you ever run into any internet browser compatibility issues?
    A small number of my blog readers have complained about my blog not
    working correctly in Explorer but looks great in Firefox.
    Do you have any advice to help fix this issue?

    Reply
  11. Have you ever thought about writing an ebook or guest authoring on other
    websites? I have a blog based on the same topics you discuss and would love to have you
    share some stories/information. I know my viewers would
    value your work. If you are even remotely interested,
    feel free to shoot me an e-mail.

    Reply
  12. Hey! Quick question that’s entirely off topic. Do you know how to make
    your site mobile friendly? My blog looks weird when browsing from my
    apple iphone. I’m trying to find a theme or plugin that might be able to correct this issue.
    If you have any suggestions, please share. Many thanks!

    Look at my web site: coupon

    Reply
  13. Heya! I know this is kind of off-topic however I needed to ask.

    Does managing a well-established website like yours require a massive amount
    work? I’m brand new to operating a blog however I do write
    in my journal everyday. I’d like to start a blog so I will be able to share my experience and views online.
    Please let me know if you have any ideas or tips for brand new
    aspiring blog owners. Appreciate it!

    Reply
  14. This is the right webpage for everyone who
    wants to find out about this topic. You understand a whole lot its almost hard to argue with you (not that I actually would want to…HaHa).

    You definitely put a brand new spin on a topic which has been written about for decades.
    Wonderful stuff, just great!

    Reply