【发布时间】:2019-03-26 11:58:10
【问题描述】:
我无法解决练习三和四。我会很高兴得到一些帮助。提前谢谢!
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;
}
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.
var num1 = rounded;
math.round (num1);
// Please write your answer in the line above.
return rounded;
}
【问题讨论】:
-
似乎已经有了很好的说明。你被困在哪里了?你试过什么?
-
网上有很多javascript教程,如果这些练习太难,你应该通过它们来学习。
标签: javascript variable-assignment string-length global-object