Tech
JavaScript String Methods
A String in JavaScript is a sequence of characters used to store text.
let course = " JavaScript " ;
1. String length
Purpose
Returns the total number of characters in a string.
Syntax
string . length
Example
let company = " OpenAI " ;
console . log ( company . length );
Output
6
Real-Time Example
Checking passw...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to