01:198:170 Lecture 16: Chapter 20 Iteration Principles

30 views8 pages
taupebee294 and 9 others unlocked
01:198:170 Full Course Notes
9
01:198:170 Full Course Notes
Verified Note
9 documents

Document Summary

For example: var text = "the leaky faucet went: "; for (var j=0; j<3; j=j+1) { text = text + "drip! text = text + "all night long! alert (text); Next! j = j + 1; works just fine j++ ; or j += 1: both are the same as above, a common shorthand. Any starting point & change in the iteration is allowed. Including negative numbers: for(j= -5; j>=10; j=j+1) {. Including fractional numbers: for(j= 3. 5; j<=maxvalue; j=j+0. 5) {: next integration does not have to be 1 step or step size: for(j= 0; j<=10; j=j+5) {, can go down: for(j= 5; j>=0; j=j-1) {. Imagine incomplete change: perhaps after a copy. A function can only return one answer, minimum it can return is zero. Minimum amount of data that can be passed to a function is zero, maximum is whatever i need. (25?) Argument is in the center of data; parameter is receiver of data.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents