return find(current + 5, `(${history} + 5)`) || find(current * 3, `(${history} * 3)`);
function binded(bindedVal , el, i ,arr){
console.log(bindedVal , el, i ,arr)
}
[1,2,3].forEach(binded.bind(null,"Avitus"));
const newBind = binded.bind(null,"Avitus");
[1,2,3].forEach(newBind);
"Avitus", 2, 1, [1, 2, 3]
"Avitus", 3, 2, [1, 2, 3]
"Avitus", 1, 0, [1, 2, 3]
"Avitus", 2, 1, [1, 2, 3]
"Avitus", 3, 2, [1, 2, 3]
var result = {};
result.price = {};
result.price.buy = {};
result.price.sell = {};
arr.map((res, key) => {
result.price.buy[res] = {};
result.price.buy[res].price = "Загрузка...";
});
arr.map((res, key) => {
result.price.sell[res] = {};
result.price.sell[res].price = "Загрузка...";
});
When you run git config --global core.editor emacs -nw, your shell splits the command line into words before invoking git. Git thus sees "emacs -nw" as two separate arguments. It only needs one to put into the config file, so the other is ignored. (Actually, that's a lie but you can check the man page for details.) You can put quotes around a series of words to tell your shell not to break them up: git config --global core.editor "emacs -nw" will give "emacs -nw" to git as a single argument which will do what you want.
<p>{this?.props?.post?.title}</p>
async function Func() {
а это значит что она не возвращает результат, она возвращает Promise, который вам тоже нужно обрабатывать асинхронно.componentDidMount() {
this.foo = (timerToClear) = {
//some code
if (timerToClear) {
clearTimeout(timerToClear);
}
setTimeout(func, 1);
};
};
componentWillUnmount() {
const timer = setTimeout(func, 1);
//some code
this.foo(timer);
}