SPI-Apprenticeship-2023-24--JavaScript

JavaScript

JavaScript Programs

Q1) WAP to create a simple calculator

Q2) WAP to create a simple calculator with user input

Q3) WAP to apply event listener on buttons

Q4) WAP to find the greatest number

Q5) WAP to print the table

Q6) WAP to print odd and even numbers

Q7) WAP to print table of a given number

Q8) WAP to swap two elements

JavaScript Assignments

Q1.1) WAP to print “Welcome to JavaScript” message on page load.

Q1.2) WAP to find the higher number from 2 numbers by using Prompt and Alert box.

Q1.3) Create a distance convertor in HTML that will convert meters in K.Ms.

Q1.4) WAP to print the table of a given number.

Q1.5) Create an HTML page to find the reverse of a number.

Q1.6) Create a simple calculator by using if statement in JavaScript.

Q1.7) WAP to print the pattern by using JS.

Q2.1) Create an HTML page to get and set the content from and in a div tag by using JavaScript.

Q2.2) Create an HTML page to show or hide a div tag also create a button to print the content of page.

Q2.3) Create an HTML page. Display a slider with 5 images. Image should be changed every 3 second.

Q2.4) Create an HTML page. Add some content to It. Create a button with text Open Popup. On button click display the modal. Add a button in Modal with text Close Popup. On button click hide the modal.

JavaScript Form Validation

Types of Client Side form validation:

  1. Length
  2. Required
  3. Pattern

Length

Required

Pattern

JavaScript Mini Projects