Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Examples

Example 1

Code Block
languagejs
watchers2 = addElementIfNotExist(watchers, currentUser());

Adds currentUser to the watchers array if currentUser is not already present. The routine returns a new array watchers2, so the initial array will not be modified.

Example 2

Code Block
languagejs
watchers = addElementIfNotExist(watchers, currentUser());

...