什么是值(未定义)..我知道我可以使用简单的return关键字,但我只是测试。所以我得到的输出未定义。 [英] What is for the value (undefined) .. And I know I can use simply return keyword but I was just testing. So for what I got output undefined .
本文介绍了什么是值(未定义)..我知道我可以使用简单的return关键字,但我只是测试。所以我得到的输出未定义。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<!DOCTYPE html>
JavaScript函数
访问不带()的函数将返回函数定义而不是函数结果:
<!DOCTYPE html>
JavaScript Functions
Accessing a function without () will return the function definition instead of the function result:
推荐答案
使用返回
关键字
usereturn
keyword
function toCelsius(f) {
return ((5/9) * (f-32));
}
这篇关于什么是值(未定义)..我知道我可以使用简单的return关键字,但我只是测试。所以我得到的输出未定义。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文