function generation(x,y) {
const generations = {
"-3": { m: "great grandfather", f: "great grandmother" },
"-2": { m: "grandfather", f: "grandmother" },
"-1": { m: "father", f: "mother" },
0: { m: "me!", f: "me!" },
1: { m: "son", f: "daughter" },
2: { m: "grandson", f: "granddaughter" },
3: { m: "great grandson", f: "great granddaughter" },
};
return generations[x][y]
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter