MCPcopy Create free account
hub / github.com/LinkedInLearning/javascript-essential-training-2832077 / usedStatus

Function usedStatus

08_13/script.js:57–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55main.append(newArticle);
56
57const usedStatus = () => {
58 let age = everydayPack.backpackAge();
59 let description;
60 if (age >= 30) {
61 if (age >= 365) {
62 if (age >= 1095) {
63 description = "old";
64 } else {
65 description = "used";
66 }
67 } else {
68 description = "lightly used";
69 }
70 } else {
71 description = "new";
72 }
73
74 console.log(`
75 Age: ${age} days
76 Status: ${description}
77 `);
78};
79
80usedStatus()

Callers 1

script.jsFile · 0.70

Calls 1

backpackAgeMethod · 0.45

Tested by

no test coverage detected