Skip to content

Commit 1447f86

Browse files
committed
Add solution 04 - Optional Parameter <name>?:
1 parent 7bfdc80 commit 1447f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/04-optional-params.problem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, it } from "vitest";
22

3-
export const getName = (first: string, last: string) => {
3+
export const getName = (first: string, last?: string) => {
44
if (last) {
55
return `${first} ${last}`;
66
}

0 commit comments

Comments
 (0)