1
New to javascript, not understanding the questions from the assignment, help please.
JordanB12 (0)

I think I understand most of what the question is asking, I just can't seem to figure out what they mean by assign things to other things, or how to do it. I tried looking online, but nothing seems to quite match what I'm trying to do. Or I'm doing it wrong, which is very possible.

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
let length = 'length'

// Please write your answer in the line above.
return length;
}

function exerciseFour(num1){
// In this exercise, you will be given a variable, it will be called: num1
// On the next line create a variable called 'rounded'. Call the Math global object's round method, passing it num1, and assign it to the rounded variable.
let rounded = 'rounded'
math.round(num1)

You are viewing a single comment. View All
Answered by TheDrone7 (516) [earned 5 cycles]
View Answer
1
JordanB12 (0)

@TheDrone7
So this is where I'm at with it, and what your saying makes sense, but it seems to want me to assign the variable length to the string 'length', then use that to assign it the length of str. I think the question is just badly written, but maybe I'm just missing something very obvious.

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
let length = 'length';
length = str;

// Please write your answer in the line above.
return length;
}