Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active April 2, 2018 16:49
Show Gist options
  • Save rogerwschmidt/499b99c75045dcee8f72361cf0a022bd to your computer and use it in GitHub Desktop.
Save rogerwschmidt/499b99c75045dcee8f72361cf0a022bd to your computer and use it in GitHub Desktop.

File system and asynchronous behavior

Objectives

  • Explain what asynchronous behavior is and why it is important.
  • Use the file system library asynchronously

What is asynchronous behavior is and why is it important?

print 1
print 2
print 3
goGetData('sticky note on the front door', function(error, info){
    print info
})
print 4
print 5
print 6
print 1
print 2
print 3
goGetData('sticky note on the front door', function(error, info){
    print info
    goGetData('sticky note on the instructor office door', function(error, data){
      print data
    })
  })
print 4
print 5
print 6
print 1
print 2
print 3
goGetData('sticky note on the front door', function(error, info){
  print info
})
goGetData('sticky note on the instructor office door', function(error, data){
  print data
})
print 4
print 5
print 6
  • With your groups, define what asynchronous behavior is, and explain why it is important

Use the file system library asynchronously

With your groups, complete the following exercise -> https://github.com/gSchool/file-system-to-do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment