Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention right or wrong answer #971

Open
theashggl opened this issue Aug 5, 2024 · 1 comment
Open

Mention right or wrong answer #971

theashggl opened this issue Aug 5, 2024 · 1 comment

Comments

@theashggl
Copy link

🚀 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.

@Vardhaman-Mehta
Copy link

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}); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants