Journey of DLithe Bootcamp .NET Full Stack Developer | Week 3(Feb7-Feb12)

Charan H U
18 min readFeb 7, 2022

Bootstrap and JavaScript

The Week 3 started with very energetically and exchanging things done in weekends. After that Arun sir said that include general talks in blogs like Customer Experience, Design Thinking, End user requirements etc.,.

So I like to share my thoughts about customer experience. Yes for example a customer visits facebook.com in desktop, same customer visits facebook.com in Android or iPhone, if the website looks like a desktop then he or she has to scroll to view the content. Instead of that, if the content matches to the display means He / She no need to scroll the entire website to see the content this will leads to the great customer experience. This is the case of website designing customer experience. Same way we can see lot of things which relates customer experience. If you design in software which helps customer experience and gives more priority to customer experience then that software will definitely stand outs. this is my thoughts about customer experience.

After that Pallavi mam started explaining remaining concept in bootstrap and after the explanation they given some tasks.

Date: 07–02–2022

Assignment No. 15: DLithe_BC_NFS_T_Task15_Bootstrap

The task assigned in to implement a responsive webpages as per the below requirements:

1. Popover
2. Progressbar
3. Tab
4. Pill
5. Scrollspy
6. JavaScript alert

1. Popover

The Popover plugin is similar to tooltips; it is a pop-up box that appears when the user clicks on an element. The difference is that the popover can contain much more content.

popover

2. Progressbar

A progress bar can be used to show a user how far along he/she is in a process. Bootstrap provides several types of progress bars. We can see progress bars in different websites like YouTube. Example you much video completed.

3. Tab

Most web pages have some kind of a menu. In HTML, a menu is often defined in an unordered list (and styled afterwards)

4. Pill

Pills are components placed in pages to speed up browsing. Also, the first step of adding links inside navbar is to apply <ul> element together with class=”navbar-nav”.

5. Scrollspy

The Bootstrap scrollspy is a navigation mechanism that automatically highlights the nav links based on the scroll position to indicate the visitor where they are currently on the page.

We can have dropdown in Scrollspy.

6. JavaScript alert

The alert() method displays an alert box with a message and an OK button.

The alert() method is used when you want information to come through to the user.

— — — — — — — — — — — — — — — — — — — — — — — —

Date: 08–02–2022

The day started with some chit chats and exchanging some thoughts about the session on going. After that Pallavi mam started JavaScript.

JavaScript, often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. Over 97% of websites use JavaScript on the client side for web page behavior, often incorporating third-party libraries.

In the morning session mam covered the topics Data types, Displaying different methods, variables, Functions with parameters, events in JavaScript, innerHTML.

Then mam covered some Conditional statements, Entry Condition Check, Exit Conditions Check.

For Entry Conditions Check best example are for loop and while loop.

for loop syntax in JavaScript:

For Exit Condition Checks best example is do-while loop.

Syntax:

After that mam explained topics:

  1. push
  2. pop
  3. shift
  4. unshift

Also, today mam covered topics on Strings in JavaScript.

Assignment No. 16: DLithe_BC_NFS_T_Task16_Javascript

The task is to implement the web pages as per the below requirements

1. Functions with parameters
2. Show the working of any 5 events in js
3. Use of innerHTML with any 5 elements
4. Change background image using js

1. Functions with parameters:

A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when “something” invokes it (calls it).

Example:

Sample Output:

Function Parameters

2.JavaScript Events:

HTML events are “things” that happen to HTML elements.

When JavaScript is used in HTML pages, JavaScript can “react” on these events.

HTML Events

An HTML event can be something the browser does, or something a user does.

Here are some examples of HTML events:

  • An HTML web page has finished loading
  • An HTML input field was changed
  • An HTML button was clicked

Often, when events happen, you may want to do something.

JavaScript lets you execute code when events are detected.

HTML allows event handler attributes, with JavaScript code, to be added to HTML elements.

3. Inner HTML:

The innerHTML property sets or returns the HTML content (inner HTML) of an element.

The HTML DOM allows JavaScript to change the content of HTML elements.

Changing HTML Content

The easiest way to modify the content of an HTML element is by using the innerHTML property.

4. Change background image using js:

For changing background image,

Syntax:

— — — — — — — — — — — — — — — — — — — — — — — —

Date: 09–02–2022

I joined the session at 09:43am. Arun sir already entered in the meeting but I'm the second one. After that me and Arun Sir exchanged some thoughts about fitness and morning sun raise. Arun Sir said that they wake up at 5:30 AM and they went for ground with his brother on a bike.

After that all the remaining participants started joining the session and taken a 20 to 30 minutes of morning session for explaining software development life cycle and also use case rating or documenting. They taken an example of bank and a bank needs a KYC application. Sso first step is

  1. Rrequirement gathering process after that
  2. IT requirements, in IT requirements project manager (PM), Subject Matter Expert(SME), Architect, Team lead, Developers, Testers

Assignment No. 17: DLithe_BC_NFS_T_Task17_JavascriptExceptionHandling

The task is to implement the webpages as per the requireents below:

1. Arrays and Array methods
2. Date Functions
3. Math Functions
4. String Methods
5.Exception Handling

splice()

The splice() method adds and/or removes array elements.
The splice() method overwrites the original array.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.splice(2, 0, "Lemon", "Kiwi");
document.write(fruits);

JavaScript Output:

Banana,Orange,Lemon,Kiwi,Apple,Mango

  1. The splice() method adds and/or removes array elements.
    The splice() method overwrites the original array.
  2. The splice() method takes three arguments:
  3. The index at which to start changing the array.
  4. How many elements to remove (can be 0).
  5. Elements to add to the array (can be empty).
  6. The splice() method returns an array of removed elements.
    The splice() method overwrites the original array.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.splice(2, 1);
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Mango
Apple

slice()

The slice() method returns a shallow copy of a portion of an array into a new array object selected from begin to end (end not included). The original array will not be modified.
The slice() method does not alter the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var citrus = fruits.slice(1, 3);
document.write(fruits);
document.write(citrus);

JavaScript Output:
Banana,Orange,Apple,Mango
Orange,Apple

sort()

The sort() method sorts the elements of an array in place and returns the sorted array.
The sort() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.sort();
document.write(fruits);

JavaScript Output:
Apple,Banana,Mango,Orange

reverse()

The reverse() method reverses an array in place. The first array element becomes the last and the last becomes the first.
The reverse() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.reverse();
document.write(fruits);

JavaScript Output:
Mango,Apple,Orange,Banana

join()

The join() method joins the elements of an array into a string.
The join() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var str = fruits.join(" * ");
document.write(str);

JavaScript Output:
Banana * Orange * Apple * Mango

pop()

The pop() method removes the last element from an array and returns that element.
The pop() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.pop();
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Apple
Mango

push()

The push() method adds one or more elements to the end of an array and returns the new length of the array.
The push() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.push("Lemon");
document.write(fruits);

JavaScript Output:
Banana,Orange,Apple,Mango,Lemon

shift()

The shift() method removes the first element from an array and returns that element.
The shift() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.shift();
document.write(fruits);
document.write(a);

JavaScript Output:
Orange,Apple,Mango
Banana

unshift()

The unshift() method adds one or more elements to the front of an array and returns the new length of the array.
The unshift() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.unshift("Lemon");
document.write(fruits);

JavaScript Output:
Lemon,Banana,Orange,Apple,Mango

entries()

The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array.
The entries() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var iterator = fruits.entries();
for (let e of iterator) {
document.write(e + "
");
}

0,Banana
1,Orange
2,Apple
3,Mango

concat()

The concat() method is used to join two or more arrays, and returns a copy of the joined arrays.
The concat() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.concat(["Lemon", "Kiwi"]);
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Apple,Mango
Banana,Orange,Apple,Mango,Lemon,Kiwi

filter()

The filter() method creates a new array with all elements that pass the test implemented by the provided function.
The filter() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.filter(function (fruit) {
return fruit.length > 6;
});
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Apple,Mango

indexOf()

The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
The indexOf() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var a = fruits.indexOf("Apple");
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Apple,Mango
2

lastIndexOf()

The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present.
The lastIndexOf() method does not change the original array, and both arrays will have the same behavior after any change to one is applied to the other.

Example:

var fruits = ["Banana", "Orange", "Apple", "Mango", "Banana", "Orange", "Apple", "Mango"];
var a = fruits.lastIndexOf("Apple");
document.write(fruits);
document.write(a);

JavaScript Output:
Banana,Orange,Apple,Mango,Banana,Orange,Apple,Mango
6

String Methods

charAt()

charAt() method returns the character at the specified index.

var str = "Hello World!";
var res = str.charAt(0);
document.write(res);

Result:

H

concat()

concat() method joins two or more strings, and returns a new string.

var str1 = "Hello ";
var str2 = "World!";
var res = str1.concat(str2);
document.write(res);

Result:

Hello World!

indexOf()

indexOf() method returns the position of the first occurrence of a specified text in a string.

var str = "Hello World!";
var res = str.indexOf("o");
document.write(res);

Result:

4

lastIndexOf()

lastIndexOf() method returns the position of the last occurrence of a specified text in a string.

var str = "Hello World!";
var res = str.lastIndexOf("o");
document.write(res);

Result:

7

toLowerCase()

toLowerCase() method converts a string to lowercase letters.

var str = "Hello World!";
var res = str.toLowerCase();
document.write(res);

Result:

hello world!

toUpperCase()

toUpperCase() method converts a string to uppercase letters.

var str = "Hello World!";
var res = str.toUpperCase();
document.write(res);

Result:

HELLO WORLD!

trim()

trim() method removes whitespace from both ends of a string.

var str = "     Hello World!     ";
var res = str.trim();
document.write(res);

Result:

Hello World!

split()

split() method splits a string into an array of substrings.

var str = "Hello World!";
var res = str.split(" ");
document.write(res[0]);
document.write(res[1]);

Result:

Hello
World!

Global Variable

Global Variable is a variable that is defined outside of a function.

var x = 10;
document.write(x);

Result:

10

Local Variable

Local Variable is a variable that is defined inside a function.

var x=20;
function myFunction() {
let x = 10;
document.write(x);
}
myFunction();

Result:

10

try

try is a statement that allows you to execute a block of code.

try {
var x = 10;
document.write(x);
} catch (error) {
document.write(error);
}

Result:

10

try-catch

try-catch is a statement that allows you to execute a block of code.

function deleteName() {
var name_of_user = "YouTube";
}
function DeleteNameFromDataBase() {
try {
document.write(name_of_user);
}
catch (ex) {
document.getElementById("error").innerHTML = ex;
}
}
deleteName();
DeleteNameFromDataBase();

Result:

ReferenceError: name_of_user is not defined

try-catch-finally

try-catch-finally is a statement that allows you to execute a block of code.

try {
var x = 10;
document.write(x);
document.write(y);
} catch (error) {
document.write(error);
} finally {
document.write("Finally");
}

Result:

10
ReferenceError: y is not defined
Finally

Math.E

The value of the mathematical constant E, approximately 2.718281828459045.

Example:

document.write(Math.E);

Result:

2.718281828459045

Math.LN10

The natural logarithm of 10, approximately 2.302585092994046.

Example:

document.write(Math.LN10);

Result:

2.302585092994046

Math.LN2

The natural logarithm of 2, approximately 0.6931471805599453.

Example:

document.write(Math.LN2);

Result:

0.6931471805599453

Math.LOG10E

The base-10 logarithm of E, approximately 0.4342944819032518.

Example:

document.write(Math.LOG10E);

Result:

0.4342944819032518

Math.LOG2E

The base-2 logarithm of E, approximately 1.4426950408889634.

Example:

document.write(Math.LOG2E);

Result:

1.4426950408889634

Math.PI

The value of the mathematical constant PI, approximately 3.141592653589793.

Example:

document.write(Math.PI);

Result:

3.141592653589793

Math.SQRT1_2

The square root of 1/2, approximately 0.7071067811865476.

Example:

document.write(Math.SQRT1_2);

Result:

0.7071067811865476

Math.SQRT2

The square root of 2, approximately 1.4142135623730951.

Example:

document.write(Math.SQRT2);

Result:

1.4142135623730951

Math.abs()

Returns the absolute value of a number.

Example:

document.write(Math.abs(-5));

Result:

5

Math.acos()

Returns the arccosine (in radians) of a number.

Example:

document.write(Math.acos(0.5));

Result:

1.0471975511965979

Math.asin()

Returns the arcsine (in radians) of a number.

Example:

document.write(Math.asin(0.5));

Result:

0.5235987755982989

Math.atan()

Returns the arctangent (in radians) of a number.

Example:

document.write(Math.atan(0.5));

Result:

0.4636476090008061

Math.atan2()

Returns the arctangent of the quotient of its arguments.

Example:

document.write(Math.atan2(0.5, 0.5));

Result:

0.7853981633974483

Math.ceil()

Rounds a number up, away from zero.

Example:

document.write(Math.ceil(4.4));

Result:

5

Math.cos()

Returns the cosine of a number (in radians).

Example:

document.write(Math.cos(0.5));

Result:

0.8775825618903728

Math.exp()

Returns Euler’s number to the power of a number.

Example:

document.write(Math.exp(1));

Result:

2.718281828459045

Math.floor()

Rounds a number down, towards zero.

Example:

document.write(Math.floor(4.4));

Result:

4

Math.log()

Returns the natural logarithm (base E) of a number.

Example:

document.write(Math.log(1));

Result:

0

Math.max()

Returns the largest of zero or more numbers.

Example:

document.write(Math.max(1, 2, 3, 4, 5));

Result:

5

new Date()

new Date() creates a new date object with the current date and time:

Example:

var d = new Date();
document.write(d);

The above example will output the current date and time:

Wed Feb 09 2022 17:35:42 GMT+0530 (India Standard Time)

new Date(milliseconds)

new Date(milliseconds) creates a new date object with the specified number of milliseconds since January 1, 1970:

Example:

var d = new Date(1000);
document.write(d);

The above example will output the date and time of the first second of 1970:

Thu Jan 01 1970 05:30:01 GMT+0530 (India Standard Time)

new Date(year, month, day, hours, minutes, seconds, milliseconds)

new Date(year, month, day, hours, minutes, seconds, milliseconds) creates a new date object with the specified date and time:

Example:

var d = new Date(2020, 0, 1, 0, 0, 0, 0);
document.write(d);

The above example will output the date and time of the first second of 2020:

Wed Jan 01 2020 00:00:00 GMT+0530 (India Standard Time)

new Date(dateString)

new Date(dateString) creates a new date object with the specified date and time:

Example:

var d = new Date("January 1, 2020");
document.write(d);

The above example will output the date and time of the first second of 2020:

Wed Jan 01 2020 00:00:00 GMT+0530 (India Standard Time)

new Date(dateString, formatString)

new Date(dateString, formatString) creates a new date object with the specified date and time:

Example:

var d = new Date("January 1, 2020", "MM/dd/yyyy");
document.write(d);

The above example will output the date and time of the first second of 2020:

Invalid Date

Age Calculator

Age Calculator is a function that calculates the age of a person.

// to take input from user
function myFunction() {
var x = document.getElementById("myNumber").value;
document.getElementById("demo").innerHTML = ageCalculator(x);
}
// to calculate age
function ageCalculator(birthYear) {
var CurrentYear = new Date().getFullYear()
return CurrentYear - birthYear;
}

Enter your Birth Year: 1999

Check your age: 23

— — — — — — — — — — — — — — — — — — — — — — — —

Date: 10–02–22022

Assignment No. 19: DLithe_BC_NFS_T_Task19_Javascript

The given task is to implement web pages as per the below requirements

1. Inheritance
2. Polymorphism
Note:
Using Classes and prototype

JavaScript Object

Objects are variables too. But objects can contain many values.

Example:

function Employee() {
this.firstName = "John";
this.lastName = "Doe";
this.designation = "Manager";
this.PhoneNumber = "123-456-7890";
}
var emp1 = new Employee();
document.write("Results:
"+emp1.firstName + "
");
document.write(emp1.lastName + "
");
document.write(emp1.designation + "
");
document.write(emp1.PhoneNumber + "
");
Employee.prototype.location = "Shivamogga" Employee.prototype.Message = function () {
document.write("WelCome");
}
var emp2 = new Employee(); var proto = Object.getPrototypeOf(emp2); document.write("" + "After Location Property" + ""); document.write(emp2.firstName + "
");
document.write(emp2.lastName + "
");
document.write(emp2.designation + "
");
document.write(emp2.PhoneNumber + "
");
document.write(emp2.location + "
");
document.write("" + "Prototype Function" + "" + proto.constructor + ""); emp2.Message();

Results:

John
Doe
Manager
123–456–7890

After Location Property

John
Doe
Manager
123–456–7890
Shivamogga

Prototype Function

function Employee() {
this.firstName = "John";
this.lastName = "Doe";
this.designation = "Manager";
this.PhoneNumber = "123-456-7890";
}

WelCome

JavaScript Inheritance

To create a class inheritance, use the extends keyword.
A class created with a class inheritance inherits all the methods from another class

Example:

class Car {
constructor(brand) {
this.carname = brand;
}
present() {
return 'I have a ' + this.carname;
}
}
class Model extends Car {
constructor(brand, mod) {
super(brand);
this.model = mod;
}
show() {
return this.present() + ', it is a ' + this.model;
}
}
let myCar = new Model("Ford", "Mustang");
document.getElementById("demo").innerHTML = myCar.show();

Results:

I have a Ford, it is a Mustang

Getter and Setter

Getter and Setter are used to control access to an object’s properties.

Example:

class Employee {
constructor(name, id) {
this.name = name;
this.id = id;
}
get employeeName() {
return this.name;
}
set employeeName(name) {
this.name = name;
}
}
let employee = new Employee("John", 1);
document.getElementById("demo").innerHTML = employee.employeeName;
employee.employeeName = "Pete";
document.getElementById("demo").innerHTML = employee.employeeName;

Results:

Pete

JavaScript Polymorphism

Polymorphism is the ability of an object to take on many forms. In other words, an object can take on many forms.

Example:

class Animal {
display() {
return "Animal";
}
}
class Dog extends Animal {
} var dog = new Dog();
document.write(dog.display());

Results:

Animal

JavaScript Polymorphism

Polymorphism is the ability of an object to take on many forms. In other words, an object can take on many forms.

Example:

var vehicle = function() {}                vehicle.prototype.select = function() {
return "Car";
}
var bmw = function() {} bmw.prototype=Object.create(vehicle.prototype);
bmw.prototype.select=function(){
return "BMW";
}
var audi=function(){} audi.prototype=Object.create(vehicle.prototype);
audi.prototype.select=function(){
return "Audi";
}
var tesla=function(){} tesla.prototype=Object.create(vehicle.prototype); var vehicles=[new vehicle(),new bmw(),new audi(),new tesla()]; for(var i=0;i");
}

Results:

Car
BMW
Audi
Car

Date: 11–02–2022

Assignment No. 20: DLithe_BC_NFS_T_Task20_Javascript

The given task is to implement web pages as per the requiremenst below

1. JS ABSTRACT CLASSES
2. JS ENCAPSULATION
NOTE:USING PROTOTYPE APPROACH AND CLASSES

JavaScript ABSTRACT CLASSES

Abstract classes are classes that cannot be instantiated. They are used to define the skeleton of a class, providing a template for the subclasses to follow.

Abstract classes are used to define the skeleton of a class, providing a template for the subclasses to follow.

Example:

JavaScript ENCAPSULATION

Encapsulation is the process of wrapping the data (variables) and code acting on the data (methods) up into a single unit.

Use var keyword to make data members private.

Use getter and setter to make data members public.

Use setter methods to set the data and getter methods to get that data.

Example:

var person = {
firstName: "John",
lastName: "Doe",
id: 5566,
fullName: function() {
return this.firstName + " " + this.lastName;
}
};
document.write(person.fullName());

Results:

John Doe

Example 2:

class car {
constructor() {
var model;
var color;
}
getModel() {
return this.model;
}
setModel(model) {
this.model = model;
}
getColor() {
return this.color;
}
setColor(color) {
this.color = color;
}
}
var myCar = new car();
myCar.setModel("Ford");
myCar.setColor("Red");
document.write("Car Model and Color: " + myCar.getModel() + " " + myCar.getColor());

Results:

Car Model and Color: Ford Red

Password Matching

Password Matching is a simple program that checks if the password entered by the user matches the password in the database.

Regular Expression

Regular expression is a special text string for describing a search pattern. Regular expressions are widely used in UNIX-like operating systems and other computer software. Regular expressions are used to search for or validate data.

Example:

— — — — — — — — — — — — — — — — — — — — — — Date: 12–02–2022

Good morning all of you, the day started with sharing thoughts about birds. Arun shared their experience about birds. They also told that they are maintaining some plastic bottles toprovide food and water to birds near to their home. Beside their home a tree is there replacing some bottles and customising that bottles like a nest and water ponds from this birds came to drink water and have a food. And also they said that at the end of bird life it flies at high level and collapse.

After that lovely man conducted a quiz on HTML, Bootstrap, CSS and JavaScript. They divided all members into 4 teams. Panda, Kasa, Lonavala and Pushpa.

Assignment No. 21: DLithe_BC_NFS_T_Task18_HTMLCSSJS_QuestionnaireProject

The task given is to implement webpages for Questionnaire Project using HTML,CSS,JS.

The HTML Structure is very simple follw the below code. You definately understand this code very less time.

After that the main code comes in JavaScript. Here all the validation and checking will perform in the javascript file.

The JavaScript Code looks below.

The main thing in this JavaScript file is, here we creating explicitly the addEventListener to perform when user click the radio button.

First the Load( ) will be called and the first question and it’s options will be loded. Then we recording the user input in getSelected( ) function.

Then it returns the answer to addEvetListener. This time the user input will be compared with the array answer.

If the array answer and the user given answer matches then score will be incresed by 1(initially scoreset to 0).

You can refer all the code here:-

— — — — — — — — — — — — — — — — — — — — — — — —

Date: 12–02–2022

Assignment No. 21: DLithe_BC_NFS_T_Task21_Javascript

The given task is to create webpages as per the requirements

Registration Form
1. Use regular expression
2. Confirm password

RegExp Object

A regular expression is a pattern of characters.

The pattern is used to do pattern-matching “search-and-replace” functions on text.

In JavaScript, a RegExp Object is a pattern with Properties and Methods.

This script will evaluate the password length and is it alphanumeric. The regular expression is the above script is minimum of 7 character and maximum of 14 character.

If it not satisfyis the above requirements the promt displays and gives error message try another or wrong password.

Password Matching:

Password Matching is a simple program that checks if the password entered by the user matches the password in the database.

In the below example I just for the learning purpose just comparing the password and confirm password.

If the password and confirm password matches to each other then the prompt will output password matching. Else miss match

--

--

Charan H U

Applied AI Engineer | Internet Content Creator | Freelancer | Farmer | Student