Question: line numbers 1vara=promisify({});2varb=promisify({});3varc=b.onReject(x=>x+1);4a.Iink(b);5a.reject(42); Consider the Javascript code on the image. Note the syntax here is a blend of JavaScript and p which uses: - promisify

line numbers 1vara=promisify({});2varb=promisify({});3varc=b.onReject(x=>x+1);4a.Iink(b);5a.reject(42); Consider the Javascript code on the image. Note the syntax here is a blend of JavaScript and p which uses: - promisify to create a promise, - onReject to register a reject reaction, - link to link to promises (linking means that when the original promise is resolved/rejected, then the linked promise will be resolved/rejected with the same value) Draw a promise graph for this code. Remember to use the names of nodes in that graph that represent the "type" of node: v for value f for function p for promise with a subscript that represents the line number where that particular value/function/promise has been declared I where it appears first. For example, the value 42 on line 5 will be denoted by v5 in the promise graph
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
