Getting Started with JavaScript
Welcome to the basics. This section covers variables, data types, operators, and control flow.
console.log("Hello, JavaScript!");
let name = "World";
console.log("Hello, " + name + "!");
Working with Objects
Learn how to create and manipulate objects in JavaScript.
let person = {
name: "John Doe",
age: 30,
city: "New York"
};
console.log(person.name); // Output: John Doe
Asynchronous JavaScript
Understand promises and async/await for handling asynchronous operations.
// Example: Using Promises
function fetchData() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve("Data fetched successfully!");
}, 1000);
});
}
fetchData().then(data => console.log(data));