|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | +<meta charset="UTF-8"> |
| 5 | +<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | +<title>BubuCode Documentation</title> |
| 7 | +<link rel="stylesheet" href="styles.css"> |
| 8 | +</head> |
| 9 | +<body> |
| 10 | + <header> |
| 11 | + <h1>BubuCode Documentation</h1> |
| 12 | + </header> |
| 13 | + |
| 14 | + <nav> |
| 15 | + <ul> |
| 16 | + <li><a href="#intro">Introduction</a></li> |
| 17 | + <li><a href="#variables">Variables</a></li> |
| 18 | + <li><a href="#functions">Functions</a></li> |
| 19 | + <li><a href="#conditionals">Conditionals</a></li> |
| 20 | + <li><a href="#loops">Loops</a></li> |
| 21 | + <li><a href="#builtinfucntions">Built-in Functions</a></li> |
| 22 | + </ul> |
| 23 | + </nav> |
| 24 | + |
| 25 | + <main> |
| 26 | + <section id="intro"> |
| 27 | + <h2>Introduction</h2> |
| 28 | + <p>BubuCode is an easy, minimalistic, and interpreted programming language.</p> |
| 29 | + <div class="code-block"> |
| 30 | + <code>log("Hello, World!")</code> |
| 31 | + </div> |
| 32 | + </section> |
| 33 | + |
| 34 | + <section id="variables"> |
| 35 | + <h2>Variables</h2> |
| 36 | + <p>Declare variables using <code>var</code>:</p> |
| 37 | + <div class="code-block"> |
| 38 | + <code>var name: "Bubu"<br>var age: 20</code> |
| 39 | + </div> |
| 40 | + </section> |
| 41 | + |
| 42 | + <section id="functions"> |
| 43 | + <h2>Functions</h2> |
| 44 | + <p>Define functions using <code>function</code>:</p> |
| 45 | + <div class="code-block"> |
| 46 | + <code>function greet(name)<br> log("Hello, " + name)<br>end</code> |
| 47 | + </div> |
| 48 | + </section> |
| 49 | + |
| 50 | + <section id="conditionals"> |
| 51 | + <h2>Conditionals</h2> |
| 52 | + <p>Use <code>if</code> statements for conditionals:</p> |
| 53 | + <div class="code-block"> |
| 54 | + <code>if age >= 18 then<br> log("Adult")<br>else<br> log("Minor")<br>end</code> |
| 55 | + </div> |
| 56 | + </section> |
| 57 | + |
| 58 | + <section id="loops"> |
| 59 | + <h2>Loops</h2> |
| 60 | + <p>BubuCode supports <code>forloop</code> and <code>whileloop</code>:</p> |
| 61 | + <div class="code-block"> |
| 62 | + <code>forloop i = 0, 5 do<br> log(i)<br>end</code> |
| 63 | + </div> |
| 64 | + </section> |
| 65 | + |
| 66 | + <section id="builtinfucntions"> |
| 67 | + <h2>Built-in Functions</h2> |
| 68 | + <p>Some useful built-in functions include:</p> |
| 69 | + <ul> |
| 70 | + <li><code>log()</code>: Outputs text to the console.</li> |
| 71 | + <li><code>random()</code>: Generates random numbers.</li> |
| 72 | + </ul> |
| 73 | + <div class="code-block"> |
| 74 | + <code>log("Random number: " + random(1, 10))</code> |
| 75 | + </div> |
| 76 | + </section> |
| 77 | + </main> |
| 78 | + |
| 79 | + <footer> |
| 80 | + <p>© 2024 BubuTheDev. All rights reserved.</p> |
| 81 | + </footer> |
| 82 | +</body> |
| 83 | +</html> |
0 commit comments