Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fff58b2

Browse files
Create htmlProgram.html
coding example in the flesh to show it works for free forever
0 parents commit fff58b2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

‎.github/workflows/htmlProgram.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE HTML>
2+
3+
<html>
4+
5+
6+
7+
8+
<script id="myscript">
9+
function newFunction(a, b) {
10+
return a + b;
11+
}
12+
</script>
13+
14+
15+
16+
17+
<!--the order you load the modules (or scripts) matters, as its embedded in HTML-->
18+
19+
20+
21+
<script id="myScript2">
22+
// Access the script element by its ID (Script 1)
23+
const scriptElement = document.getElementById('myScript');
24+
25+
// Call newFunction from Script 1
26+
const result = newFunction(2, 2);
27+
console.log(result); // This will log 4 to the console
28+
29+
</script>
30+
31+
32+
33+
34+
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /