-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ37.js
More file actions
35 lines (31 loc) · 954 Bytes
/
Copy pathQ37.js
File metadata and controls
35 lines (31 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* *****************************************************
*
* File Description: Problem 37
* panacloud-modern-global-apps/typescript-node-projects
*
* Large Shirts: Modify the make_shirt() function so that shirts are large by default
* with a message that reads 'I love JavaScript'.
*
* Make a large shirt and a medium shirt with the default message,
* and a shirt of any size with a different message.
*
*
* created by: abkh
* modified on: 6 October 2022
*
*/
function make_shirt(size, text)
{
if(size != "Large")
{
console.log("The size of the shirt is %s", size)
console.log("Message to be printed on the shirt is '%s'", text)
}
else // Default Case
{
console.log("The size of the shirt is Large by default")
console.log("Message to be printed on the shirt is 'I Love Javascript'")
}
}
make_shirt("Medium","This is a good shirt")
make_shirt("Large",null)