Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I remove the first character of a string?

    So say if my string was..

    Code:
    a = "Hello";
    alert(a);
    How do I get it to say;

    Code:
    alert("ello");
    So how do I take off the 'H' in this example..

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,917
    Thanks
    56
    Thanked 545 Times in 542 Posts
    Code:
    a = "Hello";
    a=a.slice(1)
    alert(a);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •