Get User Vote

<Integer|null> getUserVote()

Returns index (starting with 0) of the option voted for if user has voted. Otherwise, returns null.

Example

var vote = element.getUserVote();

if (vote !== null) {
  console.log('User voted for option: ', vote);
} else {
  console.log('User has not voted yet!');
}

Last updated