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";


console.log(SomeString.length)

I hope you get an idea about javascript string substring.
I would like to have feedback on my infinityknow.com 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.

Leave a Comment