Answer the question
In order to leave comments, you need to log in
Can't push, what should I do?
Hello, there was a problem with push, when I enter this command
git push -u origin master
This pops up:
To https://github.com/ratatyq/ShooterMiniGame.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/ratatyq/ShooterMiniGame.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Answer the question
In order to leave comments, you need to log in
The actual answer to the question is 'git pull ...') before pushing again.
var
path = 'aaa.bbb.ccc.ddd',
data = {
aaa: {
bbb: {
ccc: {
ddd: 'Hello!!'
}
}
}
};
console.log(path.split('.').reduce((p, c) => p[c], data)); // Hello!!
We are writing a function that will iterate over the object and, if the value of the object's key takes on the object, calls itself, and so on until it finds the desired key. https://learn.javascript.ru/recursion
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question