/* --------------------------------
JUST BY ADDING CONDITIONS, make the program print:
"All the world's a stage,
And all the men and women merely players;
They have their exits and their entrances,"
NOTE: You must refernce x, y, and z
------------------------------------ */
let x = true
let y = "5"
let z = 5
if(x) {
console.log('All the world\'s a stage, \nAnd all the men and women merely players;')
}
if (y == z) {
console.log('They have their exits and their entrances,')
} else {
console.log('And one man in his time plays many parts')
}
// Exercise #3b
/* --------------------------------
Change the values of a, and b so that the program prints:
"Thus with a kiss,
I say goodbye"
------------------------------------ */
let a = 3;
let b = "Rom";
if(b.length <= 3) {
console.log("Thus with a kiss, ")
}
if(b.length % a != 1) {
console.log("I say goodbye.")
} else {
console.log("I die.")
}
Comments
Post a Comment