javascript length of string

Today, We want to share with you javascript length of string.In this post we will show you javascript length of object, hear for javascript right string we will give you demo and example for implement.In this post, we will learn about JavaScript String length Property with an example.

javascript length of array

Example : 1 JavaScript String length Property

var str = "Hello World!";
var n = str.length;

Example : 2 Finding Number of Characters in a String

let sentence = "";
let len = sentence.length;
console.log(len); // 0

sentence = "I love Pakainfo.";
len = sentence.length;
console.log(len); // 17

sentence.length = 5;
console.log(sentence); // I love Pakainfo.

Example : 3

var members = ["Radhubhi", "OsmanMeer", "Brijubarot", "Gordhanmenu"];
var membersLength=members.length;//4 is members array length 

var str = "bug";
var strLength=str.length;//3 is the number of characters in bug

let SomeString = "Example";


I hope you get an idea about javascript string substring.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  jQuery AJAX Submit form serialize PHP MySQLi

About Pakainfo

I am Jaydeep Gondaliya, a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Pakainfo →

Leave a Reply

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