Another Page
demo.js
let a = 1;
console.log(a);
demo.ts
// TypeScript
interface Person {
name: string;
age: number;
}
const person: Person = { name: "John", age: 30 };
console.log(person);
demo.py
# Python
def add(a, b):
return a + b
result = add(3, 5)
print(result)
demo.cs
// C#
using System;
class Program
{
static void Main()
{
string message = "Hello, world!";
Console.WriteLine(message);
}
}
demo.cpp
// C++
#include <iostream>
using namespace std;
int main() {
int x = 5;
int y = 10;
int sum = x + y;
cout << "The sum is: " << sum << endl;
return 0;
}
demo.java
// Java
public class Main {
public static void main(String[] args) {
String greeting = "Hello, world!";
System.out.println(greeting);
}
}
demo.css
/* CSS */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
color: #333;
}
demo.html
<!-- HTML -->
<!DOCTYPE html>
<html>
<head>
<title>Sample Page</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>This is a sample HTML page.</p>
</body>
</html>