Commit f24a55df authored by Alex Pinto's avatar Alex Pinto

initial commit'

parents
<html>
<head>
<title>My First Program</title>
<script language="javascript" type="text/javascript">
var globalVar = 4
function myFunction(person, session) {
var localVar = 3
return "Hello " + person + " welcome to " + session
}
var i = Math.floor(Math.random() * 4);
if(i == 0) {
while(i < 4) {
i++
console.log(i)
}
}
else {
switch(i) {
case 1:
console.log("Its zero")
break;
case 2:
console.log("its two")
break;
case 3:
console.log("its three")
default:
console.log("no dice")
}
}
i++
console.log("and now its: " + i)
</script>
</head>
<body>
<script>
document.write(myFunction("Alex", "Nowhere Land"))
//will print to doc
document.write(globalVar)
//will print undefined to doc
document.write(localVar)
</script>
</body>
</html>
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