Skip to content

This project provides information about JavaScript callbacks with example.

Notifications You must be signed in to change notification settings

easiestjs/Javascript_Callbacks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Javascript Callbacks | Koseksi

Callbacks In Detail

  • Normally in javascript functions called as call back.
  • A function accepting parameter as function is also called callback.

Steps:

  • Create function in javascript file and pass as argument in another function.

Example (1)

  function task(taskStatus) {
    console.log('task()')
    console.log('task-- started');
    console.log('task-- completed');
    taskStatus('task completed');
    }

    task((status) => {
        console.log('callback',status);
    })

Releases

No releases published

Packages

No packages published