Skip to content

Instantly share code, notes, and snippets.

View shahab570's full-sized avatar

MD SHAHAB UDDIN shahab570

View GitHub Profile
@shahab570
shahab570 / index.html
Last active December 29, 2020 12:24
index.html
//index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>New</title>
<link rel="stylesheet" href="./style.css" />
</head>
//_mixins.scss
@mixin reset {
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
}
//_variables.scss
$black: #0f3057;
$green: #008891;
$grey: #e7e7de;
//style.scss
@import "./variables";
@import "./mixins";
@include reset; //imported from "_mixins.scss"
body {
width: 100%;
height: 100vh;
background-color: $black;
@include center; //imported from "_mixins.scss"
//style.css
* {
margin: 0;
padding: 0;
box-sizing: border-box; }
body {
width: 100%;
height: 100vh;
background-color: #0f3057;
@shahab570
shahab570 / test.js
Last active December 30, 2020 03:26
function abc(a,b) { // a and b are called parameters
//code
}
abc(c,d); // c and d are called arguments
@shahab570
shahab570 / test.js
Last active December 30, 2020 03:21
function abc(x,y) {
//we used logical OR(||) operator. It returns the first truthy value.
//if first value is undefined, second value is returned
x = x || 100;
// value of x is x which is given at the function call. If not given value is 100
y = y || 50;
// value of y is y which is given at the function call. If not given value is 50
console.log(x,y);
}
function abc(x,y) {
if (x === undefined) {
x = 100;
}
if (y === undefined) {
y = 50;
}
console.log(x,y);
}
function identity(name = "John",age = 25) {
console.log(name, " ", age);
}
identity(); //John 25
identity("Harris"); //Harris 25
@shahab570
shahab570 / test.js
Last active December 29, 2020 13:46
function number() {
return 10;
}
function result (x ,y =number()) {
console.log(x+y);
}
result(2); //12
result(10,20) //30