-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7 added stringify and transformer (prizm)
- Loading branch information
Качалкова Кристина Романовна
committed
Apr 27, 2024
1 parent
4a63e6f
commit 81eed5c
Showing
3 changed files
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Можно использовать тернарник.
Вообще с точки зрения скорости выполнения, разницы нет. Здесь скорее вопрос читаемости кода.
Обычно можно просто следовать правилу: если код помещается в одну строку - используем тернарный оператор, если в одну строку он уже не помещается - используем if-else.