Skip to content

Commit 261f8bc

Browse files
Update README.md
1 parent 5b66df3 commit 261f8bc

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,37 @@
33

44
A trick I learned from working with CHATGPT, to solve an interesting problem I had.
55

6-
How do we create modules of javascript, thats embeddable across the web, in one copy paste code, like you can do with google sites?
6+
***How do we create modules of javascript, thats embeddable across the web, in one copy paste code, like you can do with google sites***?
77

88

9-
Many programmers use import and export, and multiple files, but I wanted to have it all one copy and paste, and have it leggible.
9+
Many programmers use _import_ and _export_, and multiple files, but I wanted to have it all one copy and paste, and have it leggible.
1010

1111

1212
How this trick works is, you create your modules with the script tag, then you give them Id's to be called as objects.
1313

1414

15-
Modules are just individual <scripts> in seperate files. The difference between this and regualar module programming of javascript is:
15+
# Modules are just individual ***<scripts>*** in seperate files.
16+
17+
The difference between this and regualar module programming of javascript is:
1618

1719

1820

1921
It has to be layered in a specific order, like you do within an algorithm.
2022

21-
This is due to how the DOM loads things in HTML.
23+
_This is due to how the DOM loads things in HTML_.
2224

23-
Its an HTML file, not a javascript one.
25+
***Its an HTML file, not a javascript one***.
2426

2527

2628

2729
With this trick, you can create individual callable scripts as objects, that can be further troubleshot and debugged,
2830

29-
all embeddable.
31+
_all embeddable_.
3032

3133

3234

3335

34-
To check if it works, run the file, which is a blank white screen, and hit inspect to read the console.log to see the sum equal
36+
***To check if it works, run the file, which is a blank white screen, and hit inspect to read the console.log to see the sum equal***
3537

3638
4
3739

@@ -40,6 +42,8 @@ To check if it works, run the file, which is a blank white screen, and hit inspe
4042
Two scripts interacting and calling each other, from two seperate tags in the same html file.
4143

4244

45+
This is Unlicensed, as a thank you to <sup>god</sup> for giving me the privilege, Codecademy for the free knowledge, and chatGPT for the free helper to solve this complex problem that school couldnt.
46+
4347

4448

4549
I may provide more complex examples later.

0 commit comments

Comments
 (0)