Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS E:\Mernstack\Web-Dev-Batch-1> git pull
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
error: 2551 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: unpack-objects failed
PS E:\Mernstack\Web-Dev-Batch-1>
1 change: 0 additions & 1 deletion README.md

This file was deleted.

52 changes: 52 additions & 0 deletions asyn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// const getData1 = async () => {
// let data = "Hello World";
// return data;
// }

// getData1().then(data => console.log(data));

//////////////////////////////////////////
// const getData2 = async () => {
// let y = await "Hello World";
// console.log(y);
// }

// console.log(1);
// getData2();
// console.log(2);
////////////////////////////////////////////////

// async function test() {

// await console.log("A");
// console.log("B");
// await console.log("C");


// }

// console.log(" hello")
// test()


function asynchronous_operational_method() {
let first_promise = new Promise((resolve, reject) => resolve("Hello"));

let second_promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(" GeeksforGeeks..");
}, 1000);
});

let combined_promise = Promise.all([first_promise, second_promise]);
return combined_promise;
}

async function display() {
let data = await asynchronous_operational_method();
console.log(data);
}



display();
31 changes: 31 additions & 0 deletions cond.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
var hour=19

if (hour < 18) {
greeting = "Good day";
console.log(greeting)

}
else {
greeting = "Good evening";
console.log(greeting)
}
let time=15;

if (time < 10) {
greeting = "Good morning";
console.log(greeting)
}
else if (time < 20)
{
greeting = "Good day";
console.log(greeting)
}
else if (time = 15)
{
greeting = "Good half day";
console.log(greeting)
}

else {
greeting = "Good evening";
}
165 changes: 165 additions & 0 deletions css_practice3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of Floating Elements</title>
<style>
img {
float: right;
width: 150px;
height: 150px;
margin-right: 20px;
}
</style>
</head>
<body>
<p><img src="/examples/images/kites.jpg" alt="Flying Kites"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui. Mauris magna metus, dapibus nec turpis vel, semper malesuada ante. Vestibulum id metus ac nisl bibendum scelerisque non non purus. Suspendisse varius nibh non aliquet sagittis. In tincidunt orci sit amet elementum vestibulum. Vivamus fermentum in arcu in aliquam. Quisque aliquam porta odio in fringilla. Vivamus nisl leo, blandit at bibendum eu, tristique eget risus. Integer aliquet quam ut elit suscipit, id interdum neque porttitor. Integer faucibus ligula.</p>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of CSS Relative Positioning</title>
<style>
.box{
position: relative;
left: 100px;
color: #fff;
background: #00c4cc;
padding: 20px;
}
.container{
padding: 50px;
margin: 50px;
border: 5px solid black;
font-family: Arial, sans-serif;
}
.container p{
line-height: 50px;
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<h2>Relative Positioned Box</h2>
<div><strong>Note:</strong> The left margin edge of this DIV box is shifted to right by 100px from its original position. The whitespace generated is preserved.</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui. Mauris magna metus, dapibus nec turpis vel, semper malesuada ante. Vestibulum id metus ac nisl bibendum scelerisque non non purus. Suspendisse varius nibh non aliquet sagittis. In tincidunt orci sit amet elementum vestibulum. Vivamus fermentum in arcu in aliquam. Quisque aliquam porta odio in fringilla. Vivamus nisl leo, blandit at bibendum eu, tristique eget risus. Integer aliquet quam ut elit suscipit, id interdum neque porttitor. Integer faucibus ligula.</p>
<p>Quis quam ut magna consequat faucibus. Pellentesque eget nisi a mi suscipit tincidunt. Ut tempus dictum risus. Pellentesque viverra sagittis quam at mattis. Suspendisse potenti. Aliquam sit amet gravida nibh, facilisis gravida odio. Phasellus auctor velit at lacus blandit, commodo iaculis justo viverra. Etiam vitae est arcu. Mauris vel congue dolor. Aliquam eget mi mi. Fusce quam tortor, commodo ac dui quis, bibendum viverra erat. Maecenas mattis lectus enim, quis tincidunt dui molestie euismod. Curabitur et diam tristique, accumsan nunc eu.</p>
</div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of CSS Layers Effect</title>
<style>
.container{
position: relative;
}
.box{
width: 150px;
height: 150px;
opacity: 0.9;
position: absolute;
}
.red{
background: #ff0000;
z-index: 1;
}
.green{
top: 30px;
left: 30px;
background: #00ff00;
z-index: 2;
}
.blue{
top: 60px;
left: 60px;
background: #0000ff;
z-index: 3;
}
</style>
</head>
<body>
<div class="container">
<div class="box red"></div>
<div class="box green"></div>
<div class="box blue"></div>
</div>
</body>
</html>



<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Setting Text Alignment using CSS</title>
<style>
h1 {
text-align: center;
}
p {
width: 400px;
text-align: justify;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui. Mauris magna metus, dapibus nec turpis vel, semper malesuada ante. Vestibulum id metus ac nisl bibendum scelerisque non non purus. Suspendisse varius nibh non aliquet sagittis.</p>
</body>
</html>


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of Dynamic Anchor Pseudo-classes</title>
<style>
a:link {
color: blue;
}
a:visited {
text-decoration: none;
}
a:hover {
color: red;
}
a:active {
color: gray;
}
a:focus {
color: yellow;
}
</style>
</head>
<body>
<p>Visit <a href="https://www.tutorialrepublic.com" target="_blank">www.tutorialrepublic.com</a></p>
</body>
</html>

<form>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
16 changes: 16 additions & 0 deletions destructre.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let a, b, rest;
[a, b] = [10, 20];

console.log(a);
// Expected output: 10

console.log(b);
// Expected output: 20

[a, b, ...rest] = [10, 20, 30, 40, 50];


console.log(rest);
// Expected output: Array [30, 40, 50]


27 changes: 27 additions & 0 deletions foreach.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// JavaScript to illustrate forEach() method
function func() {

// Original array
const items = [12, 24, 36];
const copy = [];
items.forEach(function (item) {
copy.push(item + item + 2);
});
console.log(copy);
}
func();


// JavaScript to illustrate forEach() method
function func() {

// Original array
const items = [1, 4, 6];
const copy = [];
items.forEach(function (item) {
copy.push(item * item);
});
console.log(copy);
}
func();

62 changes: 62 additions & 0 deletions fun.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

let hello=function(){
console.log(" hello");
}

hello()



//////add func ////////////////
function add(x,y)
{
return(x+y)
}

a=add(3,4)
console.log(a)

//////sub function /////////////
function sub(a,b)
{
return(a-b)
}

b=sub(8,9)
console.log(b)

//////////////mul//////

function mul(x,y,z)
{
return(x*y*z)
}

mul(2*3*4)
////////////

function add1(x,y)
{
console.log(x*y)
}

add1(20,20)

let add2=function(a,b)
{
console.log(a+b)
}
add2(1,2)

let add3=(x,y)=>
{
console.log(x,y)
}
add3(80,90)

const cars = new Array("Saab", "Volvo", "BMW");
console.log(cars)

const person = ["John", "Doe", 46];
console.log(person)

Loading