10. Data Types I & II: Numbers And Strings


#1

https://www.codecademy.com/courses/getting-started-v2/1/5?curriculum_id=506324b3a7dffd00020bf661#

I keep on trying different strings, but nothing seems to work.
This is the error message:
Oops, try again. Is your string at least three words long?

'Something'.length;

#2

Hi @thewanderinglynx,

This is the error you got.

Copied from the instruction:

1.Write a string with at least 3 words. Check out the examples of strings above.
2.Find the length of the string by writing a period (full stop) and the word length, like this:

"string".length

Length counts every character in the string - including spaces!

First, you need to write those words (at least three words long), enclose those words with quotation marks, " ", to make it a string.

Then only use the string with .length

Hope it helps :slight_smile:


#3

I have already tried all of the combinations of strings. Still, thanks for trying to help. :grinning:


#4

Wait, never mind. I found what to do: spaces, words, and numbers.

‘Some thing 0’.length;


#5

@thewanderinglynx,

Weird.

My answer in the exercise works though.


"what are you?"
"what are you?".length

It let me passed. lol

Anyway, glad you found your solution. Cheers! :smile:


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.