Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Javascript Assignment, Assignments of Javascript programming

Solve these important questions of javascript assignment.

Typology: Assignments

2024/2025

Available from 07/03/2025

kashifa-affan
kashifa-affan 🇮🇳

2 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1.Write a JavaScript program that checks if a number is even or odd.
2. Write a JavaScript program that declares two variables a and b, assigns them numeric
values, and then prints the sum, difference, product, and quotient of these two numbers.
3. Write a program that finds the largest number in an array.
4. Write a JavaScript function isPalindrome that takes a string as input and checks whether
it’s a palindrome (i.e., it reads the same backward as forward).
5. Write a program that validates that all fields (name, email, and message) are filled out
before submitting the form.

Partial preview of the text

Download Javascript Assignment and more Assignments Javascript programming in PDF only on Docsity!

1.Write a JavaScript program that checks if a number is even or odd.

  1. Write a JavaScript program that declares two variables a and b, assigns them numeric values, and then prints the sum, difference, product, and quotient of these two numbers.
  2. Write a program that finds the largest number in an array.
  3. Write a JavaScript function isPalindrome that takes a string as input and checks whether it’s a palindrome (i.e., it reads the same backward as forward).
  4. Write a program that validates that all fields (name, email, and message) are filled out before submitting the form.