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 (560) [earned 5 cycles]
View Answer
TheDrone7 (560)

@JordanB12 you're close, what you need to do is store the length of str in the variable named length. For example, consider that str is "Hello World", it's a string with 11 characters in it. Then the variable length should hold the value 11. You'll need to figure out how to get the length of str since it won't always be the same thing. I don't think I can simplify the terms even more and answering by providing correct code is against repl talk rules. So that's all the help I can provide. Hope you solve it soon.