Top community members
All Wiki Articles Create Wiki Article

Many years me and my friends we were volunteers on my university doing programming classes for young people.

I got main conclusion: Young people are awesome, especially students, because they always bring new and fresh ideas :)
* I loved to do it but my time is limited

  I decided to create something that will help millions of students

Now I am here

co-founder

JavaScript - remove first character from string

0 contributions
8 points

In JavaScript it is possible to remove first character from string in following ways.

1. Using String slice() method

// ONLINE-RUNNER:browser;

var text = "abc";
var substring = text.slice(1);

console.log(substring); // bc

2. Using String substring() method

// ONLINE-RUNNER:browser;

var text = "abc";
var substring = text.substr(1);

console.log(substring); // bc

3. Using String replace() method

// ONLINE-RUNNER:browser;

var text = "abc";
var substring = text.replace("abc", "bc");

console.log(substring); // bc

Merged questions

  1. JavaScript - how to chop off first char from string?
  2. How do I trim off first char in JavaScript?
  3. JavaScript - delete first character of string
  4. Slice off first character in js
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more