Skip to content

Instantly share code, notes, and snippets.

View yurtarmehmet's full-sized avatar
🤔

Mehmet Yurtar yurtarmehmet

🤔
View GitHub Profile
import React, { useState, useEffect } from "react";
export default function UserList({ showTitle, initialItems }) {
const [items, setItems] = useState(initialItems);
const [filter, setFilter] = useState("");
if (showTitle) {
const [titleClicks, setTitleClicks] = useState(0);
}
const path = require("path");
module.exports = {
"mode": "none",
"entry": "./src/index.js",
"output": {
"path": __dirname + "/dist",
"filename": "bundle.js"
},
devServer: {
// COPYING OBJECTS
// foreach
const person = {name: "John", age: 30, children: [{name:"JOHNNY"}]};
const newPerson = {};
Object.keys(person).forEach((personField) => {
newPeople[personField] = person[personField]
});
// object assign

1. Hafta:

  • Introduction to JavaScript, Philosophy, and Tips, ECMAScript, TC39, and the Standardization Process
  • Primitive Types, Reference Types, Expressions&Statements, If-Else Statement, Loops

2.Hafta

  • Variables, Execution Context, Scope, Hoisting, Functions, Closures, IIFE, this keyword
  • Objects, new keyword, Prototypes, bind, apply, call, ES6 Class Keyword

3.Hafta

  • DOM(Document Object Model)

Introduction: 1

Introduction to JavaScript, Philosophy, and Tips, ECMAScript, TC39, and the Standardization Process

**JavaScript Syntax:**1

Values, Operations, Types, Variables, Expressions&Statements, If-Else, Loops, Functions, Regular Expressions

Principles of JavaScript: 2

State'e yeni item ekleme:

this.setState({
  todos: [...this.state.todos, {
    content: "Yeni Todo",
    completed: false,
    id: Math.random()
  }]
});
@yurtarmehmet
yurtarmehmet / gist:63793a15448f171b00095f6dcfd7466b
Last active November 11, 2019 11:02
Array İterations Ödev

1 - forEach methodunu kullanarak copy dizisini items dizisinin bir copyası haline getirin.

const items = ['item1', 'item2', 'item3'];
const copy = [];

2 - map methodunu kullanarak "triples" isimli diziyi; yani aşağıdaki dizinin elemanlarının 3 ile çarpımıyla elde edilen diziyi oluşturun.

var numbers = [1, 4, 9];
@yurtarmehmet
yurtarmehmet / array_iterations.md
Last active November 2, 2022 15:03
Array Iteration Methodları