For those looking for a way to check if you have completed a specific quest already, eg. for finding where you are on a quest line after abandoning the current quest, look no further!
As of the Shadowlands pre-patch the command has changed, as it was relocated to the C_QuestLog namespace.
The new command is:
/script print(C_QuestLog.IsQuestFlaggedCompleted(43812))
Just replace the numbers with the quest ID and paste in the chat. (Look up the quest on wowhead, the ID will be in the url, eg. “https://www.wowhead.com/quest=43812/down-to-business”)
True = You have completed the quest
False = You have not completed it