Grade 10 > Computer Studies
Create a JavaScript program that takes user input (e.g., their name) and displays a personalized greeting message on the web page.
Display the output of the program you made prior using different output methods.
Write a JavaScript function that uses conditional statements (if/else) to determine if a number is even or odd and returns the result.
Implement a switch statement that takes a day of the week as input and displays a message about that given day (you decide what to share for each day).
Add meaningful comments to all of your existing JavaScript code
Write a JavaScript program that uses different arithmetic operators (+, -, *, /) to perform calculations (e.g., a simple calculator).
Create a program that compares two numbers using comparison operators (==, !=, <, >) and displays the result.
Implement a JavaScript function that uses logical operators (&&, ||, !) to check if a user is eligible for a discount based on age and membership status.
Create JavaScript variables of different data types (e.g., string, number, boolean, array, object) and display their types using typeof.
Write a program that converts a string to a number and vice versa, then perform arithmetic operations on them.
Create a program that uses if/else statements to determine whether a given number is positive, negative, or zero.
Write a JavaScript function that checks if a user's password meets specific criteria (e.g., length, complexity) using if/else statements.
Develop a program that simulates a ticket booth, where the price of a movie ticket varies based on the user's age and showtime.
Build a JavaScript quiz that uses if/else statements to evaluate user answers and display a final score.
Implement a program that checks if a given year is a leap year or not using if/else statements.
Create a JavaScript program that uses a for loop to print numbers from 1 to 10.
Write a program that uses a while loop to find the factorial of a given number.
Develop a JavaScript function that iterates over an array using a for...of loop and displays the elements.
Use a do...while loop to repeatedly prompt the user for input until they enter a specific keyword.
Implement a program that generates a multiplication table for a given number using a nested for loop.
Create an array of fruits and use JavaScript array methods (e.g., push, pop, slice) to manipulate and display its contents.
Write a program that finds the largest and smallest numbers in an array of integers.
Write a JavaScript function that calculates the area of a rectangle based on its length and width.
Develop a function that takes an array of numbers as input and returns the sum of all the numbers.
Create a program that displays the current date and time using JavaScript's Date object.
Write a function that calculates the age of a user based on their birthdate.
Develop a countdown timer that displays the time remaining until a specific future date and time.
Calculate the number of days between two given dates using JavaScript's Date object.
Implement a program that checks if a date falls on a weekend or a weekday.
Write a JavaScript program that calculates the square root of a given number using the Math.sqrt() method.
Create a program that generates a random number between a specified range using Math.random().
Implement a function that rounds a floating-point number to the nearest integer using Math.round().
Develop a program that calculates the area of a circle based on its radius using the Math.PI constant.
Build a simple calculator that performs basic arithmetic operations (addition, subtraction, multiplication, division) using Math functions.
Generate a random password with a combination of uppercase letters, lowercase letters, numbers, and special characters.
Create a program that randomly selects a color from an array and changes the background color of a webpage.
Write a JavaScript function that simulates a dice roll and displays the result.
Develop a guessing game where the computer generates a random number, and the user has to guess it.
Build a random quote generator that displays a random quote from a predefined list each time the user clicks a button.
Create a program that demonstrates variable scope by declaring a variable both inside and outside a function and trying to access them.
Implement a function that uses a local variable and another function that uses a global variable with the same name to illustrate scope hierarchy.
Use the var, let, and const keywords in different scenarios to compare their scoping behavior and limitations.
Create intentional syntax errors in a JavaScript program and ask students to identify and correct them.
Implement a program that demonstrates the difference between runtime errors and logical errors in JavaScript.
Write a function that checks for common types of errors (e.g., division by zero, undefined variable) and provides descriptive error messages.