Skip to content

Instantly share code, notes, and snippets.

View b-tekinli's full-sized avatar
🎯
focus

Beyzanur Tekinli b-tekinli

🎯
focus
View GitHub Profile
@b-tekinli
b-tekinli / closure.js
Created May 26, 2024 19:46
js interview closure
function createCounter() {
let count = 0; // Bu değişken dışarıdan erişilemez.
return function() {
count++; // İç fonksiyon dıştaki 'count' değişkenine erişebilir.
return count;
};
}
const counter = createCounter();
@b-tekinli
b-tekinli / outerInnerScope.js
Created May 26, 2024 15:46
js interview outer inner scope
var globalVar = "ben global scope"; // Global scope
function outerFunction() {
var outerVar = "ben outer function scope"; // Outer function scope
function innerFunction() {
var innerVar = "ben inner function scope"; // Inner function scope
console.log(globalVar); // Erişilebilir
console.log(outerVar); // Erişilebilir
@b-tekinli
b-tekinli / destructAssign.js
Created May 26, 2024 15:32
js interview destructuring assignment
// ES5
var person = { name: 'Beyza', age: 24 };
var name = person.name;
var age = person.age;
// ES6
const person = { name: 'Beyza', age: 24 };
const { name, age } = person;
@b-tekinli
b-tekinli / arrowFunc.js
Created May 26, 2024 15:22
js interview arrow func
// ES5
var add = function(a, b) {
return a + b;
};
// ES6
const add = (a, b) => a + b;
@b-tekinli
b-tekinli / variableDef.js
Created May 26, 2024 14:58
js interview variable def
// ES5
var x = 10;
if (true) {
var x = 20;
}
console.log(x); // 20
@b-tekinli
b-tekinli / reactstrap.jsx
Created April 29, 2024 20:22
Reactstrap
import { Button } from 'reactstrap';
<Button color="primary">Tıkla</Button>
@b-tekinli
b-tekinli / chakra.jsx
Created April 29, 2024 20:20
chakra ui
import { Button } from '@chakra-ui/react';
<Button colorScheme="blue">Tıkla</Button>
@b-tekinli
b-tekinli / material.jsx
Created April 29, 2024 20:17
material ui
import Button from '@material-ui/core/Button';
<Button variant="contained" color="primary">
Tıkla
</Button>
@b-tekinli
b-tekinli / tailwindCss.jsx
Created April 29, 2024 20:04
tailwind css
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
Tıkla
</button>
@b-tekinli
b-tekinli / scss.scss
Created April 29, 2024 19:54
SCSS (SASS)
$primary-color: blue;
.button {
background-color: $primary-color;
&:hover {
background-color: darken($primary-color, 10%);
}
}