JS mengambil ukuran string

const name = "Boris";
console.log(name.length);
// => 5
Curious Chamois