Starting system initialization...
Loading kernel modules...
Initializing memory...
Mounting file systems...
ERROR: Unable to mount /dev/sda1
WARNING: Low disk space on /home
function helloWorld() {
console.log("Hello, World!");
}
helloWorld();
[INFO] System ready
User logged in: admin
Processing data...
SUCCESS: Data processed
for (let i = 0; i < 10; i++) {
console.log(i);
}
System status: OK
Memory usage: 42%
CPU temperature: 68°C
WARNING: Network interface eth0 is down
const fib = (n) => {
if (n <= 1) return n;
return fib(n - 1) + fib(n - 2);
};
console.log(fib(10));
SUCCESS: Database connection established
Starting service: apache2
ERROR: Permission denied (publickey,password)
class Person {
constructor(name) {
this.name = name;
}
greet() {
console.log(`Hello, my name is ${this.name}`);
}
}
const person = new Person("Alice");
person.greet();
WARNING: Out of memory, killing process
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5));
SUCCESS: Package installation complete
ERROR: Segmentation fault (core dumped)
async function fetchData() {
const response = await fetch('https://api.example.com');
return response.json();
}
fetchData().then(data => console.log(data));
WARNING: Disk write error on /var/log
SUCCESS: Backup completed successfully
function sumArray(arr) {
return arr.reduce((acc, curr) => acc + curr, 0);
}
console.log(sumArray([1, 2, 3, 4, 5]));
ERROR: Connection timed out
WARNING: CPU usage critical: 98%
function isPrime(n) {
for(let i = 2, s = Math.sqrt(n); i <= s; i++)
if(n % i === 0) return false;
return n > 1;
}
console.log(isPrime(17));
SUCCESS: System update completed
ERROR: Insufficient storage space
function reverseString(str) {
return str.split('').reverse().join('');
}
console.log(reverseString('hello'));
WARNING:
WARNING: DNS resolution failed
function bubbleSort(arr) {
for(let i = 0; i < arr.length; i++) {
for(let j = 0; j < arr.length - 1; j++) {
if(arr[j] > arr[j + 1]) {
[arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
}
}
}
return arr;
}
console.log(bubbleSort([5,2,1,8,4]));
SUCCESS: Service restarted successfully
ERROR: Module not found: 'fs'
class Car {
constructor(make, model) {
this.make = make;
this.model = model;
}
getDetails() {
return `${this.make} ${this.model}`;
}
}
const myCar = new Car("Toyota", "Camry");
console.log(myCar.getDetails());
WARNING: SSL certificate expired
function fibonacciSequence(n) {
let sequence = [0, 1];
for(let i = 2; i < n; i++) {
sequence.push(sequence[i - 1] + sequence[i - 2]);
}
return sequence;
}
console.log(fibonacciSequence(10));
SUCCESS: Database backup initiated
ERROR: Out of video memory
function binarySearch(arr, target) {
let left = 0;
let right = arr.length - 1;
while(left <= right) {
let mid = Math.floor((left + right) / 2);
if(arr[mid] === target) return mid;
if(arr[mid] < target) left = mid + 1;
else right = mid - 1;
}
return -1;
}
console.log(binarySearch([1,2,3,4,5], 3));
WARNING: System time mismatch detected
SUCCESS: Package repository updated
function quickSort(arr) {
if(arr.length <= 1) return arr;
const pivot = arr[0];
const left = [];
const right = [];
for(let i = 1; i < arr.length; i++) {
arr[i] < pivot ? left.push(arr[i]) : right.push(arr[i]);
}
return [...quickSort(left), pivot, ...quickSort(right)];
}
console.log(quickSort([5,2,1,8,4]));