Условие всегда ленивое и хочет побыстрее выйти. Если v1 будет true, то что там дальше его не будет интересовать: if (v1 == true || v2 == true) {...}
Таким образом, если у нас есть такой код: var v1 = CalcV1(); var v2 = CalcV2(); if (v1 == true || v2 == true) {...}
Выглядит хоть и симпатично, но совершенно непроизводительно. Лучше писать так: if (CalcV1() == true || CalcV2() == true) {...}
Естественнно нужно понимать, что CalcV2 вызываться не будет, если CalcV1 вернет true, поэтому не нужно на это расчитывать. Но я надеюсь, что вы это знаете :)
Условие всегда ленивое и хочет побыстрее выйти. Если v1 будет true, то что там дальше его не будет интересовать: if (v1 == true || v2 == true) {...}
Таким образом, если у нас есть такой код: var v1 = CalcV1(); var v2 = CalcV2(); if (v1 == true || v2 == true) {...}
Выглядит хоть и симпатично, но совершенно непроизводительно. Лучше писать так: if (CalcV1() == true || CalcV2() == true) {...}
Естественнно нужно понимать, что CalcV2 вызываться не будет, если CalcV1 вернет true, поэтому не нужно на это расчитывать. Но я надеюсь, что вы это знаете :)
The public channel had more than 109,000 subscribers, Judge Hui said. Ng had the power to remove or amend the messages in the channel, but he “allowed them to exist.” Ng, who had pleaded not guilty to all charges, had been detained for more than 20 months. His channel was said to have contained around 120 messages and photos that incited others to vandalise pro-government shops and commit criminal damage targeting police stations. How to create a business channel on Telegram? (Tutorial) A Hong Kong protester with a petrol bomb. File photo: Dylan Hollingsworth/HKFP. Private channels are only accessible to subscribers and don’t appear in public searches. To join a private channel, you need to receive a link from the owner (administrator). A private channel is an excellent solution for companies and teams. You can also use this type of channel to write down personal notes, reflections, etc. By the way, you can make your private channel public at any moment.
from us