Languages
[Edit]
EN

JavaScript - how to check string length?

5 points
Created by:
AnnLen
1777

In JavaScript it is possible to check string length in following way.

1. String.prototype.length property example

var text = 'This is my text...';

console.log(text.length);

Outout:

18

Merged questions

  1. JavaScript - how to check string size?
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.