JavaScript I
Javascript for Beginners
Embark on your coding journey with our JavaScript Beginner Course! Discover the core concepts of JavaScript, from variables and data types to basic operations. Unleash your potential to create interactive web experiences and build a strong foundation for web development. Join us to unlock the magic of code and shape the future of the web! 🚀💻
- Day 1
Concept:
Resources:
Assignments:
Task 1: Declare Variables
- Create 3 variables using let, const, and var.
- Store your age in one,
- Your name in another,
- The value of Pi (3.1416) in the last one.
Task 2: Work with Data Types
- Create variables for different data types:
• A number (e.g., let score = 100;)
• A string (e.g., let greeting = "Hello!";)
• A boolean (e.g., let isStudent = true;)
- Print all of them using console.log()
.
Task 3: Perform Basic Operations
- Add two numbers (e.g., 10 + 20) and print the result.
- Concatenate two strings (your first name + last name).
- Compare two numbers (5 > 3, 10 == "10", etc.) and print the results.
- Use logical operators:
• true && false
• true || false
• !true
Task 4: Small Challenge
Write a small program that:
- Stores your name and age in variables.
- Prints: "Hi, my name is [YourName] and I am [YourAge] years old."
(Hint: use string concatenation or template literals `Hi, my name is ${name}...`
)
By completing this assignment, you’ll practice declaring variables, using data types, and applying operations — everything we covered today.
- Day 2
Concept:
Resources:
Assignments:
Write a program that prints the first 10 multiples of a given number. If the number is negative or zero, print an error message.
- Day 3
Concept:
Resources:
Assignments:
Write a function that converts temperature from Celsius to Fahrenheit. The formula for conversion is: `F = (C * 9/5) + 32`.
- Day 4
Concept:
Resources:
Assignments:
Create a simple webpage with a button. When the button is clicked, change the text of a paragraph to a new message.
- Day 5
Concept:
Resources:
Assignments:
Create an array of numbers. Use the `map()` method to double each number, and then use the `filter()` method to keep only the even numbers. Finally, use a loop to print the resulting array.
- Day 6
Concept:
Resources:
Assignments:
Create an object that represents a book. Include properties like `title`, `author`, `year`, and `isAvailable`. Then, use both dot notation and bracket notation to access and display the book's information.
- Day 7
Concept:
Resources:
Assignments:
Create a constructor `Rectangle` that takes `width` and `height` as parameters. Add a method `calculateArea()` that calculates and returns the area of the rectangle.
- Day 8
Concept:
Resources:
Assignments:
Create a function that fetches weather information for a specific city from the [OpenWeatherMap API](https://openweathermap.org/api). Display the temperature, weather conditions, and other relevant data in the console.
- Day 9
Concept:
Resources:
Assignments:
Create an `async` function that simulates fetching data from an API. Use `setTimeout` to simulate a delay. Handle both successful and failed outcomes using Promises.
- Day 10
Concept:
Resources:
Assignments:
Submit the Weather App