const PATH = isGuestEnabled
? isFromRequests
? ROUTE.GUEST_AREA.REQUESTS_SCROLLER
: ROUTE.GUEST_AREA.FULL_PATH
: includes(window.location.href, ROUTE.CORPORATE.FULL_PATH)
? ROUTE.CORPORATE.REQUESTS.FULL_PATH
: ROUTE.CREDITS.FINANCING.FULL_PATH;
условие ? Результат если условие истина : Результат если условие ложь
const PATH =
ЕСЛИ (isGuestEnabled) ТОГДА {
ЕСЛИ(isFromRequests) ТОГДА {
ROUTE.GUEST_AREA.REQUESTS_SCROLLER
} ИНАЧЕ{
ROUTE.GUEST_AREA.FULL_PATH
}
} ИНАЧЕ {
ЕСЛИ(includes(window.location.href, ROUTE.CORPORATE.FULL_PATH)) ТОГДА {
ROUTE.CORPORATE.REQUESTS.FULL_PATH
} ИНАЧЕ {
ROUTE.CREDITS.FINANCING.FULL_PATH
}
};