Created
July 26, 2020 19:26
-
-
Save roshnet/233c3cc7976dbbc6ff104edecdb32eae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function placeOrder(user) { | |
var order; | |
order.buyer = user; | |
order.itemName = 'Raspberry Pi'; | |
order.itemPrice = 2500; | |
order.isConfirm = true; | |
return order; | |
} | |
var person = { | |
name: 'John', | |
isFrequentVisitor: false | |
}; | |
var newOrder = placeOrder(person); | |
if (newOrder.isConfirm) { | |
console.log('The order has been confirmed. Check details below:'); | |
console.log(newOrder); | |
} | |
else { | |
console.log('The order has not been confirmed yet.'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment