Skip to content

Instantly share code, notes, and snippets.

View kasiriveni's full-sized avatar
🎯
Focusing on Learning 💯🔥

Srinivas kasiriveni

🎯
Focusing on Learning 💯🔥
View GitHub Profile
const dùng để khai báo một hằng số - là một giá trị không thay đổi được trong suốt quá trình chạy.
const A = 5;
A = 10; // Lỗi Uncaught TypeError: Assignment to constant variable
let tạo ra một biến chỉ có thể truy cập được trong block bao quanh nó, khác với var - tạo ra một biến có phạm vi truy cập xuyên suốt function chứa nó.
function foo() {
let x = 10;
if (true) {
@Y2016
Y2016 / es6_class.js
Created November 5, 2016 09:27
ES6
// class
class Hamburger {
constructor() {
// This is the constructor.
}
listToppings() {
// This is a method.
}
}
@abhisheksliam
abhisheksliam / es6
Created November 15, 2016 11:56
es6
http://coenraets.org/present/es6

ES6

文法の基礎

変数展開

左辺にもブレスを書いて配列展開できる

[es6]
var arr = [1,2,3];
@BrianCortes
BrianCortes / Comments.jsx
Last active August 1, 2017 04:40
defaultProps and propTypes
Comment.defaultProps = {
valueInput: ''
}
Comments.propTypes = {
addComment: PropTypes.func.isRequired,
comments: PropTypes.array.isRequired,
changeText: PropTypes.func.isRequired
}
@kasiriveni
kasiriveni / CrashCourse
Last active March 4, 2020 12:25
WEB _Crash Course For Absolute Beginners
https://www.youtube.com/watch?v=UB1O30fR-EE&list=PLillGF-RfqbYeckUaD1z6nviTp31GLTH8
@1Marc
1Marc / workshops-planning.md
Last active January 20, 2023 02:34
Workshop Planning

This gist is no longer in use.

@coryhouse
coryhouse / userApi.js
Last active April 12, 2023 00:58
API Wrapper example
/* This API wrapper is useful because it:
1. Centralizes our Axios default configuration.
2. Abstracts away the logic for determining the baseURL.
3. Provides a clear, easily consumable list of JavaScript functions
for interacting with the API. This keeps API calls short and consistent.
*/
import axios from 'axios';
let api = null;
# GET VERSION
yarn -v (or --version)
# GET HELP
yarn help
# CREATE PACKAGE.JSON
yarn init
yarn init -y // Use defaults