<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>js return</title> </head> <body> <script> // 1.return function f() { // 此行代码有无,效果相同。 // return undefined; } console.log(f()); // undefined if (f()) { console.log(true); } else { console.log(false); // false } </script> </body> </html>
js return.html
最新推荐文章于 2024-08-23 16:56:25 发布