Posts

Showing posts from January, 2025

FSD-Theory Assingment 2:Advanced ES6 features in JavaScript and Typescript

                          Assignment -2 Advanced ES6 features in JavaScript and Typescript     Q. 1 Answer the following. 1.       What are template literals? 2.       What is the purpose of the spread syntax in JavaScript? 3.       What are arrow functions in ES6? 4.       What are Symbols in JavaScript? 5.      L ist three advantages of using Typescript over plain JavaScript. 6.       What are decorators in TypeScript? 7.       What are 'let' and 'const' in ES6? Q.2 Answer the following. 1.       Explain the difference between let and const in JavaScript. 2.       What are arrow functions in ES6, and how do t...

MSC(CS) FSD-1 Practical 3- Email validation

  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Login Form </ title >     < script >         // ES6 function to validate form fields         const validateForm = () => {             let isValid = true ;             // Get input values             const email = document . getElementById ( 'email' ). value . trim ();             // Get error element             const emailError = document . getElementById ( 'emailError' );             // Reset error message             emailError . textContent = '' ;   ...

MSc(CS) FSD-1 Practical-2 Employee Registration details

 Create an HTML form that contain the Employee Registration details and write a JavaScript to validate DOB, Joining Date, and Salary. <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Employee Registration Form </ title >     < script >         // ES6 function to validate form fields         const validateForm = () => {             let isValid = true ;             // Get input values             const dob = document . getElementById ( 'dob' ). value ;             const joiningDate = document . getElementById ( 'joiningDate' ). value ;             const salary = documen...

MSc(CS) FSD-I Practical 1-Student Registration details

Students Create an HTML form that contain the Student Registration details and write a JavaScript to validate Student first and last name as it should not contain other than alphabets and age should be between 18 to 50.   <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Student Registration Form </ title >     < script >         // ES6 function to validate form fields         const validateForm = () => {             let isValid = true ;             // Get input values             const firstName = document . getElementById ( 'firstName' ). value . trim ();             const lastName = document...