как улучшить мой код
function fearNotLetter(str) {
const missing = Array
.from(str, n => n.charCodeAt(0))
.find((n, i, a) => n !== a[0] + i);
return missing && String.fromCharCode(missing - 1);
}
function fearNotLetter(str) {
for (let i = 0, code = str.charCodeAt(0); ++i < str.length;) {
if (str.charCodeAt(i) !== ++code) {
return String.fromCharCode(code);
}
}
}
import { combineReducers } from "redux";
import userReducer from "./user-reducer";
import ordersTableReducer from "./orders/table-reducer";
import ordersModalsReducer from "./orders/modals-reducer";
export default combineReducers({
// Common
user: userReducer,
// Orders
orders: combineReducers({
table: ordersTableReducer,
modals: ordersModalsReducer,
}),
// .....
});