JS Newbie..Help
function exerciseThree(str){
// In this exercise, you will be given a variable, it will be called: str
// On the next line create a variable called 'length' and using the length property assign the new variable to the length of str
// Please write your answer in the line above.
return length;
}
Can somebody help me please and thx you
We will not do it for you. If you don't understand part of it, then explain what it is so we can actually help you
@theangryepicbanana
sorry so my answer was...
var length = 'Something';
length.length;
When i ran tests it said
'length' should be the length of str
But i don't understand how to assign it to str
@SeanChadwick well if you do
var length = 'Something'
, that doesn't actually get the length ofstr
.str
is a variable that currently equals a string. knowing that, how would you just get the length ofstr
?@theangryepicbanana '
str.length;
righ?
@SeanChadwick Yup, you got it. Did you pass the tests?
@SeanChadwick ok
@SeanChadwick If @theangryepicbanana helped you, please mark his post as the answer ;)
@abc3354 @SeanChadwick or just mark mine! xd (don't do it)