getComments
  • 26 Oct 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

getComments

  • Dark
    Light
  • PDF

Article summary

Description

Returns the user's comments for a page in your app's layout.


Input Parameters

NameTypeRequiredDescription
[index]NumberNoPage index (default is the current page)

Returns

Type: Text

Returns the user's comments for the specified page in your app's layout.


Examples

// display the user's comments for the current page in the debugger
debug.log(user.getComments());
// display the user's comments for the 2nd page in the debugger
// note: page indexes are zero-based
debug.log(user.getComments(1));

Remarks

Reasons for getting the user's comments include:

  1. Text analysis for ai suggestions
  2. Using the comments as input into an ai model or algorithm
  3. Much more!

Page indexes are zero-based. This means the first page will have an index value of 0 and the third page will have an index value of 2.

Zero-Based Indexing

Zero-based indexing seems strange at first, but it's how programming languages (i.e. Javascript) work with collections of things.


What's Next