Commit 9946ec2f authored by vivaddadhi's avatar vivaddadhi

finish js practice

parent 113ec1fe
// variable - scope
const myArray = [1,2,3,4,5]
// function
const printArray = ((arr) => {
// loop
for (i of arr) {
console.log(i)
}
})
// function
const isItFriday = ((day) => {
// conditional
switch (day) {
case "Friday":
console.log("It is friday")
break
default:
console.log("It is not friday")
break;
}
})
// function calls
isItFriday("Friday")
printArray(myArray)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment