Commit 4fa2efc8 authored by Philippe Fonzin's avatar Philippe Fonzin

finish scripts

parents
<html>
<body>
<script type = "text/javascript">
document.write(function (personNmae, session) {
return "Hello " + personNmae + "! Welcome to " + session;
}("Philippe", "JavaScript"))
;
</script>
</body>
</html>
\ No newline at end of file
<html>
<body>
<script type = "text/javascript">
document.write(function (personNmae, session) {
return "Hello " + personNmae + "! Welcome to " + session;
}("Philippe", "JavaScript"))
;
</script>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>Basic HTML</title>
</head>
<body>
Hello, World!!!
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>My First Program</title>
</head>
<body>
<script
language = "javascript" type = "text/javascript">
document.write("Hello World!")
</script>
</body>
</html>
\ No newline at end of file
<html>
<body>
<script type="text/javascript">
let greatestRapperAlive;
switch(true) {
case 20 <= 5:
document.write("YES");
break;
case 50 === 50:
document.write("You Got It, Girl");
greatestRapperAlive = "Hov";
break;
default:
break;
}
if (greatestRapperAlive === "Hov") {
document.write("<br></br>");
document.write("RIP DMX");
}
</script>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>External</title>
</head>
<body>
<script src="first.js"></script>
<script type="text/javascript">myFunction()</script>
</body>
</html>
\ No newline at end of file
function myFunction() {
document.write("Hello World!");
}
<html>
<head>
<title>From the Head</title>
<script language = "javascript" type = "text/javascript">
function myFunction() {
document.write("Hello World!");
}
</script>
</head>
<body>
<script>myFunction()</script>
</body>
</html>
\ No newline at end of file
<html>
<head>
<title>Local Variable</title>
<script type = "text/javascript">
var global = "ACCESS";
function checkVar() {
var myVar = "I am a local variable";
document.write(myVar);
}
function func2() {
global = "We Major!";
document.write(global)
}
</script>
</head>
<body onload = "func2()">
</body>
</html>
\ No newline at end of file
<html>
<body>
<script type = "text/javascript">
function myFunc(personNmae, session) {
// document.write("Hello", personNmae, "! Welcome to", session);
return "Hello " + personNmae + "! Welcome to " + session;
}
var func = myFunc("Philippe", "JavaScript");
document.write(func);
</script>
</body>
</html>
<html>
<body>
<script type="text/javascript">
function isEven(num) {
return num % 2 === 0;
}
function printEven(arr) {
for (let num of arr) {
if (isEven(num)) document.write(num);
document.write("\n")
}
}
document.write(printEven([1,2,3,4,5,6,7,8]))
</script>
</body>
</html>
\ No newline at end of file
<html>
<body onload = checkVar()>
<script type = "text/javascript">
function checkVar() {
var myVar = "I am from myVar", otherVar = "I am another variable";
document.write(myVar);
}
</script>
</body>
</html>
\ 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