if (条件) {
console.log('ab')
} else {
console.log('cd')
}
You can add any code here for the conditions The final result is console.log('abcd') There seem to be many ways, but it seems that many people think that it cannot be established at the same time
Isn’t this a question from @南小鸟’s blog last time I read it? .
Looking at the adopted answers, the first question is about simultaneous execution. They are all about saving the country through curves just to output abcd. Where can I see that they are executed at the same time?
Isn’t this a question from @南小鸟’s blog last time I read it? .
01 Replacement
02 Replacement
03 bind
But the result is that 'ab cd' has an extra space...
04 setTimeout + replacement
05 setTimeout + clear screen
. . . . . . . Is it because I don’t understand your needs or you lack basic programming logic
if else is mutually exclusive
ab abcd || cd abcd logically does not exist at the same time
if(condition){
console.log('ab');
}
if (another condition) {
console.log('cd');
}
if and else can only run one of the conditions. If the if condition is met, else will not be run
It’s just mind-boggling. .
I have a problem in my head. Which one should be written in the production environment and tried and executed at the same time? .
Looking at the adopted answers, the first question is about simultaneous execution. They are all about saving the country through curves just to output abcd. Where can I see that they are executed at the same time?