Skip to content

Instantly share code, notes, and snippets.

View tanisha03's full-sized avatar
🏠
Working from home

Tanisha Sabherwal tanisha03

🏠
Working from home
View GitHub Profile
@tanisha03
tanisha03 / scope.js
Created February 2, 2020 12:27
Understanding Lexical Scoping
function greet(){
name="Tanisha"; //local variable for greet()
function sayHello(){ //inner function
alert("Hello"+name); //access to the variable
}
sayHello();
}
@tanisha03
tanisha03 / closure.js
Created February 2, 2020 12:56
Understanding closures
function greet(fname){
return sayHello(lname){ //inner function
return "Hello "+fname+lname; //access to the variable
}
}
var greetTanisha=greet("Tanisha");
print(greetTanisha("Sabherwal"));
// PRINTS "Hello TanishaSabherwal"
function sayfirst(){
console.log("First"); }
function saySecond(){
console.log("Second") }
sayFirst();
saySecond();
// First
// Second
function sayfirst(){
setTimeout(function(){
console.log("First")},500);
}
function saySecond(){
console.log("Second") }
sayFirst();
saySecond();
@tanisha03
tanisha03 / tanisha.js
Last active May 24, 2021 19:31
Tanisha Sabherwal
hello = () => ({
name: 'Tanisha Sabherwal',
website: 'https://www.tanishasabherwal.me/',
twitter: 'tanishaaa03'
});
import Pagination from 'components/Pagination';
import PropTypes from 'prop-types';
import React from 'react';
import styled from 'styled-components';
const Th = styled.th`
padding: 13px 10px;
border: 1px solid #e1dddd;
font-size: 14px;
text-align: ${props =>
{
"name": "ftux",
"exclude_users": [
150,
4567
],
"targetGroup": "",
"payload": {
"videos":{
"videoCompletionTitle":"Ready to start a game?",
const modalContainer = document.createElement('div');
modalContainer.style.position = 'fixed';
modalContainer.style.top = '0';
modalContainer.style.left = '0';
modalContainer.style.width = '100%';
modalContainer.style.height = '100%';
modalContainer.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
modalContainer.style.display = 'none';
modalContainer.style.justifyContent = 'center';
modalContainer.style.alignItems = 'center';