April 2023
Intermediate to advanced
614 pages
12h 41m
English
Here are the solutions (partial, or worked out in full) to the questions that were contained within the chapters in this book. In many cases, there are extra questions so that you can do further work if you choose to.
1.1 TypeScript, please! The following are the fully annotated versions of the code in the chapter. This is the code for the factorial functions:
// question_01_typescript_please.ts
function fact(n: number): number {
if (n === 0) {
return 1;
} else {
return n * fact(n - 1);
}
}
const fact2 = (n: number): number => {
if (n === 0) {
return 1;
} else {
return n * fact2(n - 1);
}
};
const fact3 = (n: number): number => n === 0 ? 1 ...Read now
Unlock full access