The unrate() JavaScript method makes it possible to unrate a map or topic. It is only available in the Reader designer (with the map variable) and Topic template designer (with the topic variable).
It corresponds to the Delete a topic's rating web service.
Example
The following example deletes the user's rating for the currently open topic.
async function unrateTopic() {
try {
await topic.unrate();
console.log("Topic has been unrated successfully!");
} catch (error) {
console.error("Error while unrating the topic:", error);
}
}
// Call the function to unrate the topic
unrateTopic();