Function Navigator
Line 1, Col 1
Language: Plain Text
Manage Macros
Save File
AI Code Assistant
Code Output
// JavaScript Code Output Example
const greeting = "Hello, World!";
console.log(greeting);
// Sample function
function add(a, b) {
return a + b;
}
// Testing the function
const result = add(5, 3);
console.log(`5 + 3 = ${result}`);
// Array operations
const numbers = [1, 2, 3, 4, 5];
const doubled = numbers.map(num => num * 2);
console.log("Doubled array:", doubled);
// Object example
const user = {
name: "John",
age: 30,
sayHi() {
console.log(`Hi, I'm ${this.name}`);
}
};
user.sayHi();