20,741
edits
mNo edit summary |
mNo edit summary |
||
| Line 2: | Line 2: | ||
Objective: Learn more about vectors and hashes to see how you can simplify and generalize your code easily. | Objective: Learn more about vectors and hashes to see how you can simplify and generalize your code easily. | ||
Imagine a piece of Nasal code working with 5 different waypoints. You would need to manage the data for each waypoint. A simple version might look like this: | Imagine a piece of Nasal code working with 5 different waypoints. You would need to manage the data for each waypoint. A simple version using different variables for each data set might look like this: | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||