练习题11_方程式.html 477 B

123456789101112131415161718192021
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. //
  11. function fun(a){
  12. var res = 4*a*a+3*a+2;
  13. // console.log(res);
  14. return res;
  15. }
  16. // 调用函数 函数名+() 函数就可以执行
  17. var num = fun(1);
  18. console.log(num);
  19. </script>
  20. </body>
  21. </html>