Skip to content

Instantly share code, notes, and snippets.

View yamankatby's full-sized avatar
🍍
hacking...

Yaman yamankatby

🍍
hacking...
View GitHub Profile
module.exports = {
getTransformModulePath() {
return require.resolve("react-native-typescript-transformer");
},
getSourceExts() {
return ["ts", "tsx"];
}
};
{
/* Search the config file for the following line and uncomment it. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
}
import React, { Component } from "react";
import { Text, View } from "react-native";
interface Props {
}
interface State {
}
if (true) {
var var_message = "if scope'un içerisindeyim";
}
if (true) {
let let_message = "bende if scope'un içerisindeyim";
}
console.log(var_message); // 🎉 Bunu yapabilirsin -> if scope'un içerisindeyim
console.log(let_message); // 💥 Bunu yapamazsın (ReferenceError)
let name = 'Yaman KATBY';
const username = '@yamankatby';
name = 'KATBY Yaman'; // 🎉 Bunu yapabilirsin
surname = '@yaman_katby'; // 💥 Bunu yapamazsın (TypeError)
const sayHello = (name) => {
return "Merhaba, " + name + "!";
};
sayHello("Yaman KATBY"); // 🎉 Hello, Yaman KATBY!
const sayHello = (name = "Yeni Kullanıcı") => {
return "Merhaba " + name + "!";
};
sayHello(); // Merhaba Yeni Kullanıcı!
sayHello("Yaman KATBY"); // Merhaba Yaman KATBY!
const sayHello = (name = "Yeni Kullanıcı") => "Merhaba " + name + "!";
const profile = {
name: "Yaman KATBY",
username: "@yamankatby",
email: "[email protected]"
};
const name = profile.name; // Yaman KATBY
const username = profile.username; // @yamankatby
const email = profile.email; // [email protected]
const profile = {
name: "Yaman KATBY",
username: "@yamankatby",
email: "[email protected]"
};
const { name, username, email } = profile;