0
Do you think the value of isRed will change from false, which is the original value to true. By assignment of the if clause?
12:23 What will be the output of this program? enum colors { RED = "#FF0000", GREEN="#00FF00", BLUE = "0000FF", } let userChoice = "#FF0000"; let isRed: boolean = false; if (userChoice == colors.RED) { isRed = true; } console.log(isRed); Quick question here; don't you think that that value of isRed just changed from š³š®š¹šš² to ššæšš² after the if clause posted an if question which is already true ... š°š¼š¹š¼šæš.š„šš =#šš0000 which is also equal to userChoice. the fact that for TypeScript , once u have typed a variable, u can change its valu. i think š©if š© changes the value of the boolean statementš¤
1 Answer