Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
JavascriptBasics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex Pinto
JavascriptBasics
Commits
f24a55df
Commit
f24a55df
authored
4 years ago
by
Alex Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit'
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
example.html
example.html
+49
-0
No files found.
example.html
0 → 100644
View file @
f24a55df
<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>
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment