FAQ: Introduction to JavaScript - Properties

This community-built FAQ covers the “Properties” exercise from the lesson "Introduction to JavaScript ".

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Introduction To JavaScript

FAQs on the exercise Properties

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

7 posts were split to a new topic: Code won’t let me pass

11 posts were split to a new topic: Can’t continue without pressing solution button

4 posts were split to a new topic: Why would the length of a sentence be useful to know?

2 posts were split to a new topic: Difference between a property and a method?

hi in this chapter the characters are supposed to be 25 or 30 ?

console.log("Teaching the world how to code".length);

Is that the line you are measuring?

It’s 30 characters because .length counts each space as a character.

m = "23.556"
d = m.substring(m.indexOf('.') + 1).length
1 Like

3 posts were split to a new topic: Is there something wrong with my code?

Hello, what would the .length for numbers be, I tried assigning a variable to a number and then putting the variable in the console.log but it returns undefined, thanks fairly new to this.

Numbers are exact values that don’t have a length. Sure they have numeral characters, etc., but as objects they have no length. Further to this, numbers are not iterable.

1 Like

5 posts were split to a new topic: What does it mean by an instance of a data type?