Skip to content

Commit

Permalink
async
Browse files Browse the repository at this point in the history
  • Loading branch information
AntaeusNar committed Apr 17, 2019
1 parent 3df3da1 commit 0afb6e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ function sum(num1, num2) { //curly brases define a block
return num1 + num2
}

var add = sum(2, 3) //call
sum // referance
var add = sum(2, 3) //call equal 5
sum // referance can be used to pass into another function

function foo(fn){ //callback functions - can pass functions into something that hasn't happened yet - asycn
fn(2,3)
}

0 comments on commit 0afb6e4

Please sign in to comment.