Created
May 30, 2018 11:06
-
-
Save fitradev/c6419f880abf668e301da725e07ed909 to your computer and use it in GitHub Desktop.
FunctionChallenges created by fitradev - https://repl.it/@fitradev/FunctionChallenges
This file contains 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
console.log('Tugas1----\n'); | |
function shoutOut() { | |
console.log('Halo Function'); | |
} | |
shoutOut(); | |
console.log('\n\n-----Tugas2----\n'); | |
function calculateMultiply(){ | |
return num1*num2; | |
} | |
var num1=5; | |
var num2=6; | |
var hasilPerkalian = calculateMultiply(num1,num2); | |
console.log(calculateMultiply()); | |
console.log('\n\n-----Tugas3----\n'); | |
function processSentence(){ | |
return 'Nama Saya '+name+', umur saya '+age+' tahun, alamat saya di '+address+', hobby saya '+hobby; | |
} | |
var name = "Agus"; | |
var age = 30; | |
var address = "Jln. Malioboro, Yogjakarta"; | |
var hobby = "gaming"; | |
var fullSentence = processSentence(name,age,address,hobby); | |
console.log(processSentence()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment