JavaScript get only 10 characters from string

Getting only 10 characters from string in JavaScript can be done using simple JavaScript function. JavaScript is world’s most used scripting language to build web apps, hybrid mobile apps, hybrid desktop apps etc.

Get 10 characters from string using JavaScript

Here is a working demo of it:


String Slice method of JavaScript extracts parts of a string and returns the extracted part as a new string.

Leave a Reply

Your email address will not be published. Required fields are marked *