This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Color Quotes</title> | |
<link rel="stylesheet" href="style.css"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Chapter No: 1 DOM Manipulation */ | |
// 1. DOM Ready Event: Subscribing the DOM event. | |
// 1. With Jquery | |
$(document).ready(function(){ | |
alert('First Method'); | |
}); | |
// 2. Shorter Jquery Version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = ["a", "b", "c"]; | |
var obj = {}; | |
/* Create object from array */ | |
// Method 1 | |
arr.forEach(function(item, index){ | |
obj[index] = item | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
display: grid; | |
grid-template-columns: 100px 100px 100px; | |
grid-template-rows: 50px 50px; | |
color: #fff; | |
text-align: center; | |
} | |
/* .item1 { | |
grid-column-start: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RegEx | |
// Sample: /expression/.test('string'); | |
// 1. expression: is any regular expression that we build | |
// 2. string: it is a string that we put under test | |
// 3. test: this method returns true or false | |
// / & /: mark the start and end of the expression | |
// expression between / are literals. They are treated as literals characters. | |
// Start with single character |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let name = "Parvez"; | |
let job = "Developer"; | |
let tools = "JavaSCript and CSS"; | |
// Single Interpolation(Using old conventional way) | |
console.log("My name is "+name+" and I am a "+job+". I write "+tools+"."); | |
// Using ES6's template literals, we will do this | |
console.log(`My name is ${name} and I am a ${job}. I write ${tools}.`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function minefizzBuzz(number){ | |
if(number % 3 === 0 && number % 5 === 0) { | |
return "FizzBuzz" | |
} else if( number % 5 === 0) { | |
return "Buzz" | |
} else if(number % 3 === 0 ) { | |
return "Fizz" | |
} else { | |
return number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Fizz Buzz</title> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet"> | |
<link rel="stylesheet" href="style.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. calculate angle of hour | |
2. calculate angle of minutes | |
# Calculate angle of minutes | |
1 hour = 60 minutes = 1 full rotation = 360/60 = 6 degree / minute | |
______________________________ | |
| | | |
|angle-of-minutes = 6 * minute | | |
| | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="wrapper"> | |
<div class="description"> | |
<h2>Fibonacci Number Formula</h2> | |
<p>The Fibonacci numbers are generated by setting <code>F0=0</code>, <code>F1=1</code>, and then using the recursive formula | |
<code class="formula">Fn = Fn-1 + Fn-2</code> to get the rest. Thus the sequence begins: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... This sequence of Fibonacci numbers arises all over mathematics and also in nature.</p> | |
</div> | |
<div class="input-container"> | |
<input type="text" placeholder="Enter your number" class="input-text" id="number"> | |
</div> |