Then, test your function on at least 10 different pages in your context to ensure that it behaves the way you anticipate. Debug and improve your function as needed.
The possibilities here are endless, but some useful categories of functions might include the following:
In any case, be sure that you are providing an appropriate output for your function. For instance, if you are finding content, then you would want the output to show as a table or a list, while if you are changing content, you might just want to notify your user that the change occurred.
You can also combine find, analyze, and change functions, such as by analyzing the word count of a page in Canvas and then appending the results to the page so that readers can see it.
This content is provided to you freely by EdTech Books.