Skip to content
Discussion options

You must be logged in to vote

For the quote length, you put the length in characters of the text(the quote text) property:

{
  text: "The quick brown fox jumped over the lazy dog",
  source: "Unknown",
  length: 44,
  id: 1
}

You can get the character count of any string in JavaScript using the length property(useful for long strings where you can't count manually or have your text editor show you when you highlight it):

let x = "The quick brown fox jumped over the lazy dog";
// 44
console.log(x.length);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tajhans
Comment options

Answer selected by tajhans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants