Skip to content

Commit 075fd04

Browse files
committed
sie bricht mir das herz
1 parent 5b7eb44 commit 075fd04

106 files changed

Lines changed: 231 additions & 161 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/_includes/layout/sidebars/supporters.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</div>
3737
<div id="aftersupporters">
3838
Click
39-
<a href="/donate" target="_blank">here</a>
39+
<a href="/donate">here</a>
4040
to become a supporter.
4141
</div>
4242
<a href="#beforesupporters" class="skiplink" aria-hidden="true"

content/about/about-the-site.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,12 @@ <h2>Link back to me!</h2>
220220
<section>
221221
<h2>Milestones</h2>
222222
<ul>
223+
<li>2026-06-12: <strong>3400</strong> followers reached!</li>
224+
<li>2026-06-09: 1000 guestbook messages</li>
225+
<li>2026-05-31: <strong>3300</strong> followers reached!</li>
223226
<li>2026-05-17: <strong>3200</strong> followers reached!</li>
224227
<li>2026-04-29: <strong>3100</strong> followers reached!</li>
228+
<li>2026-04-24: 900 guestbook messages</li>
225229
<li>2026-04-15: <strong>3000</strong> followers reached! 🎉</li>
226230
<li>2026-04-02: <strong>2900</strong> followers reached</li>
227231
<li>2026-03-16: <strong>2800</strong> followers reached</li>

content/coding/javascript-tutorial.html

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,23 +273,38 @@ <h3 id="functions">Functions</h3>
273273
</p>
274274
<p>We define a function like this:</p>
275275
<pre><code class="language-javascript"><span><span>function</span> <span>sayHello</span>(<span></span>) </span>{
276-
// add function code here...
277276
<span>console</span>.log(<span>"Hello!"</span>);
278277
}
279278
</code></pre>
280-
<p>and call (execute) it like this:</p>
279+
<p>
280+
In this case, the function <code>sayHello</code> only has one line of code
281+
(the console.log statement). Anything between the the <code>{</code> and
282+
<code>}</code> is the function code.
283+
</p>
284+
<p>
285+
Now we can call (execute) the function by typing out its name and adding
286+
<code>()</code>:
287+
</p>
281288
<pre><code class="language-javascript">sayHello()<span>;</span>
282289
</code></pre>
283290
<p>
284-
Notice the <code>()</code> at the end - they are a clear sign that
285-
<em>sayHello</em> is a function. Without the <code>()</code> the function
286-
will not be executed.
291+
The <code>()</code> at the end are a clear sign that <em>sayHello</em> is a
292+
function. Without the <code>()</code> the function will not be executed.
293+
</p>
294+
<p>
295+
So now, wherever we type <code>sayHello();</code>, the code of our function
296+
(in this case the output "Hello!") will be executed.
297+
</p>
298+
<p>
299+
(Btw, you can also call the function inside of itself - but that will create
300+
an infinite loop and crash your browser. So, uh, don't do that.)
287301
</p>
288302
<br />
289303
<h4>Parameters</h4>
290304
<p>
291305
Functions can also take so-called parameters. Those are just variables that
292-
you fill in when you call a function.
306+
you fill in when you call a function. This way you can make your function do
307+
different things depending on which parameters you use while executing it.
293308
</p>
294309
<p>
295310
For example, this function takes two parameters, which can be used as
@@ -298,17 +313,27 @@ <h4>Parameters</h4>
298313
<pre><code class="language-javascript"><span>function</span> <span>introduceMyself</span>(name, age) {
299314
console.log("Hello! My name <span>is</span> <span>" + name + "</span> <span>and</span> I am <span>" + age + "</span> years old.<span>");
300315
}</span>
316+
<p>Now you can use this function to output the introduction, no matter which name and age is given.</p>
301317
</code></pre>
302318
<p>You&#39;d call it like this:</p>
303319
<pre><code class="language-javascript"><span>introduceMyself</span>(<span>"Petra"</span>, <span>26</span>);
304320
</code></pre>
321+
305322
<p>or like this, using our variables from before:</p>
306323
<pre><code class="language-javascript">introduceMyself(<span>myName</span>, myAge)<span>;</span>
307324
</code></pre>
308325
<p>or any combination:</p>
309326
<pre><code class="language-javascript">introduceMyself(<span>"Petra"</span>, myAge)<span>;</span>
310327
</code></pre>
311-
<p>You can see here that the order of variables is important.</p>
328+
<p>
329+
You can see here that the order of variables is important, because the
330+
values you use while executing the function should match the order of
331+
variable names you defined when creating the function. (In this case,
332+
"Petra" becomes the value of the variable <code>name</code> because it is
333+
the first parameter, and 26 will be the value of <code>age</code> because it
334+
is the second parameter.)
335+
</p>
336+
312337
<br />
313338
<h4>Return</h4>
314339
<p>
@@ -320,18 +345,15 @@ <h4>Return</h4>
320345
<span>return</span> number1 + number2;
321346
}
322347
</code></pre>
323-
<p>
324-
Here is an example using a string as a return value (also notice how I use
325-
<code>+</code> to combine strings):
326-
</p>
348+
<p>Here is an example using a string as a return value:</p>
327349
<pre><code class="language-javascript"><span><span>function</span> <span>getIntroduction</span>(<span>name, age</span>) </span>{
328350
<span>let</span> introduction = <span>"Hello! My name is "</span> + name + <span>" and I am "</span> + age + <span>" years old."</span>;
329351
<span>return</span> introduction;
330352
}
331353
</code></pre>
332354
<p>
333355
When calling a function with a return value you could then save its return
334-
value in a newly created variable like so:
356+
value in a newly created variable and then use that variable:
335357
</p>
336358
<pre><code class="language-javascript"><span>let</span> myIntroduction = getIntroduction(myName, myAge);
337359
console.<span>log</span>(myIntroduction);
@@ -341,6 +363,44 @@ <h4>Return</h4>
341363
</p>
342364
<pre><code class="language-javascript">console.<span>log</span>(getIntroduction(myName, myAge));
343365
</code></pre>
366+
367+
<br />
368+
<h4>Existing functions</h4>
369+
<p>
370+
By now you might have noticed that the <code>console.log();</code> statement
371+
we use to output text in the console is also a function! To be exact,
372+
<code>log</code> is a function of the object <code>console</code>. (We know
373+
that <code>log</code> is a function and not a variable because it has the
374+
<code>()</code> at the end and it can take parameters - in this case the
375+
text to output.)
376+
</p>
377+
<p>
378+
<code>console.log()</code> is just one of many pre-existing functions in
379+
JavaScript that are useful. Here are some examples of functions you can use
380+
to modify text. The syntax for these is
381+
<code>variableName.functionName()</code>:
382+
</p>
383+
<pre><code class="language-javascript">let myTextVariable = "Text";
384+
myTextVariable.toUpperCase(); // turns "Text" into "TEXT"
385+
myTextVariable.toLowerCase(); // turns "Text" into "text"
386+
myTextVariable.split(); // turns "Text" into ["T", "e", "x", "t"]
387+
myTextVariable.includes("Tex"); // return true because "Text" includes "Tex"
388+
myTextVariable.startsWith("T"); // return true because "Text" starts with "T"</code></pre>
389+
<p>
390+
Keep in mind that all of these are case sensitive. This means it's
391+
<code>toUpperCase()</code> <b>not</b> <code>toUppercase()</code>. This also
392+
means that <code>myTextVariable.startsWith("t")</code> would return false
393+
because "Text" does not include a lowercase t.
394+
</p>
395+
<p>
396+
Btw, to use the results of these function you'd need to save the value into
397+
a variable, because the functions do not modify your variable value. That
398+
means: After calling <code>myTextVariable.toUpperCase()</code>,
399+
<code>myTextVariable</code> is still "Text", <b>not</b> "TEXT". To save it
400+
we could do something like this:
401+
</p>
402+
<pre><code class="language-javascript">let myTextVariable = "Text";
403+
let myTextVariableUppercase = myTextVariable.toUpperCase();</code></pre>
344404
</section>
345405

346406
<!-- --------------------------------------------------------------- -->

public/about/about-me.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/about/about-the-site.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

public/about/blinkies.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/about/cats.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/about/credits.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/about/dream-diary.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/about/faq.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)