您好,欢迎来到意榕旅游网。
搜索
您的当前位置:首页(完整word版)南邮Web技术第四章作业

(完整word版)南邮Web技术第四章作业

来源:意榕旅游网


Web技术 第四章作业

———————————作业4.2—————————————

Write, test, and debug (if necessary) JavaScript scripts for the problems that follow. When required to write a function, you must include a script to test the function with at least two different data sets. In all cases,

for testing, you must write an XHTML file that references the JavaScript file.

4.2 Output : The first 20 Fibonacci numbers, which are defined as in the sequence

1, 1, 2, 3, …

whereeach number in the sequence after the second is the sum of the two previous numbers. You mustuse document.write to produce the output.

Fibonacci numbers

结果截图:

———————————作业4.11—————————————

4.11 Function : counter

Parameter : An array of numbers.

Returns : The numbers of negative elements, zeros, and values greater than zero in the given array.

Note : You must use a switch statement in the function.

counter

结果截图:

———————————作业4.13—————————————

4.13 Function : row_averages

Parameter : An array of arrays of numbers.

Returns : An array of the averages of each of the rows of the given matrix.

row_averages

//输出第二个

结果截图:

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- yrrf.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务