MCPcopy Create free account
hub / github.com/Klerith/node-intro-javascript / getEmpleado

Function getEmpleado

callback-hell.js:28–37  ·  view source on GitHub ↗
( id, callback )

Source from the content-addressed store, hash-verified

26
27
28const getEmpleado = ( id, callback ) => {
29
30 const empleado = empleados.find( e => e.id === id )?.nombre
31
32 if ( empleado ) {
33 callback( null, empleado );
34 } else {
35 callback(`Empleado con id ${ id } no existe`);
36 }
37}
38
39const getSalario = ( id, callback ) => {
40

Callers 1

callback-hell.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected