Imprint | Privacy Policy

Test highlight.js

Jens Lechtenbörger

Created: 2024-12-18 Wed 12:44

1. Tests for different languages

1.1. HTML

<h1 class="whatever">hello, what's your name</h1>

1.2. JavaScript

console.log("success");
var x='string using single quote';
x

1.3. Python

def factorial(n):
    if n < 2:
	return 1
    else:
	return n * factorial(n - 1)

print(factorial(10))

1.4. Go

type Allergen int

const (
    IgEggs Allergen = 1 << iota // 1 << 0 which is 00000001
    IgChocolate                 // 1 << 1 which is 00000010
    IgNuts                      // 1 << 2 which is 00000100
    IgStrawberries              // 1 << 3 which is 00001000
    IgShellfish                 // 1 << 4 which is 00010000
)