vscode-leetcode icon indicating copy to clipboard operation
vscode-leetcode copied to clipboard

Mention right or wrong answer

Open theashggl opened this issue 1 year ago • 1 comments

🚀 Feature Proposal

Just like the website where it is mentioned in colours if the answer is right or wrong we need it mentioned in the console or the submission page that opens in VSCode that the answer is right or wrong. In case of wrong at least it is not mentioned separately about it so if there's a long output then checking becomes difficult.

theashggl avatar Aug 05 '24 18:08 theashggl

using js,

function checkAnswer(userAns, correctAns) { if (userAns === correctAns) { console.log('%ccorrect!', 'color: green;'); } else { console.log('%cIncorrect!', 'color: red;'); } console.log(Your answer: ${userAns}); console.log(Correct answer: ${correctAns}); }

Vardhaman-Mehta avatar Aug 19 '24 08:08 Vardhaman-Mehta