DEV Community

kamran maharaz
kamran maharaz

Posted on

Variable

let answer: string = "correct"
if (answer === "correct") {
console.log("You got it right!");
} else {
console.log("Sorry, that's not correct.";
}

Top comments (1)

Collapse
 
softwaredeveloping profile image
FrontEndWebDeveloping

Hello @kamran_maharaz_e491192b9d ! Welcome to DEV. If you explain more about how variables work, you will be more valuable to the community. As this post stands, all the moderators will mark it as low quality. Hope this helps! 😀