difference between fetch and pull in github code example
Example 1: difference between foreach and map in js
forEach() just loop through the elements. It's throws away return values and always returns undefined.The result of this method does not give us an output .
map() loop through the elements allocates memory and stores return values by iterating main array
Example:
var numbers = [2,3,5,7];
var forEachNum = numbers.forEach(function(number){
return number
})
console.log(forEachNum)
var mapNum = numbers.map(function(number){
return number
})
console.log(mapNum)
map() is faster than forEach()
Example 2: difference between pull and pull request
If you use git pull, you pull the changes from the remote repository
into yours.
If you send a pull request to another repository, you ask their
maintainers to pull your changes into theirs (you more or less ask
them to use a git pull from your repository).