01:198:170 Lecture Notes - Lecture 15: Code Reuse

40 views4 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

Code reuse: saves you if there"s a mistake in the code; only need to change it once. Reduce complexity: can write multiple functions to solve a problem. Problem resolution: when you have separate functions & know what functions are doing, if program isn"t working, you can narrow in on function that"s not working problems = limited to different functions. Organization: allows you to keep thoughts organized. Function: must have header & de nition, function de nition is js statements to perform, function must have name & parameters (so that you could pass values to the function; collect data to execute function) Parameter: reception area for receiving data from call. You call a function to make it work (also use alert) Assignments & parameters must match 1 to 1. Remember to put semi-colons, matching curly braces, parentheses. Always make sure functions are put inside script tags or inside button quotes.

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