We can change the value of a variable based on certain conditions. For that, we can use an if statement.