Strings and Text
String Length
Read characters and the length of a string.
String Length
string_length.js
const word = "trace";
const size = word.length;
const first = word[0];
const last = word[word.length - 1];
console.log("word=" + word);
console.log("size=" + size);
console.log("edges=" + first + last);
string-length
A string is indexed like a sequence of characters. `length` counts characters, and bracket access reads a character at a position.