Production Engineer Interview Questions

1,940 production engineer interview questions shared by candidates

Q1: Given the following function works, what are the problems that you can identify? How would you improve on said problems? const items = [ { type: ‘phone’, color:’gold’, device: ‘Nokia’}, { type: ‘phone’, color:’bronze’, device: iPhone}, { type: tv, color:’brown’, device: Sony} ] const excludes = [ {k: ‘color’, v:’gold’}, {k: ‘type’, v:’tv’} ] function applyFilter(items, excludes) { excludes.forEach(pair => { items = items.filter(item => item[pair.k] !== pair.v) } return items } --- Q2: How would you construct the Emitter object? Emitter emitter = new Emitter(); Const sub = emitter.subscribe(‘event_name’, callback) Const sub2 = emitter.subscribe(‘event_name2’, callback2) Const sub3 =emitter.subscribe(‘event_name3’, callback) emitter.emit(‘event_name’, ‘foo’, ‘bar’, ‘baz’); sub.release() sub2.release() sub3.release()
avatar

Full Stack Production Engineer

Interviewed at Meta

3.6
Dec 9, 2019

Q1: Given the following function works, what are the problems that you can identify? How would you improve on said problems? const items = [ { type: ‘phone’, color:’gold’, device: ‘Nokia’}, { type: ‘phone’, color:’bronze’, device: iPhone}, { type: tv, color:’brown’, device: Sony} ] const excludes = [ {k: ‘color’, v:’gold’}, {k: ‘type’, v:’tv’} ] function applyFilter(items, excludes) { excludes.forEach(pair => { items = items.filter(item => item[pair.k] !== pair.v) } return items } --- Q2: How would you construct the Emitter object? Emitter emitter = new Emitter(); Const sub = emitter.subscribe(‘event_name’, callback) Const sub2 = emitter.subscribe(‘event_name2’, callback2) Const sub3 =emitter.subscribe(‘event_name3’, callback) emitter.emit(‘event_name’, ‘foo’, ‘bar’, ‘baz’); sub.release() sub2.release() sub3.release()

Viewing 1551 - 1560 interview questions

Glassdoor has 1,940 interview questions and reports from Production engineer interviews. Prepare for your interview. Get hired. Love your job.