Can someone help me with my assignment? Im new at coding. I Need help with question 3. I have tried everything and every video. I just can't figure it out.
The videos you've seen have probably told you this already but,
to access a property of an object attach a period . at the end of the variable name, followed by the name of the property.
In your case you want to
You also have a variable called length (a valid name, but it's confusing to use "length" so many times for different things)
You just want to set length equal to
str.length like so:
var length; length = str.length;