Skip to content

Instantly share code, notes, and snippets.

View ekas's full-sized avatar

Ekas Preet Singh ekas

  • Lufthansa Technik
  • Hamburg, Germany
  • 20:56 (UTC +02:00)
  • X @ekaspreet93
View GitHub Profile
@ekas
ekas / Google ICS: Mobile Web, Course 2 Summary.md
Created March 2, 2018 16:04 — forked from gpalsingh/Google ICS: Mobile Web, Course 2 Summary.md
My notes on course on ES6. Not comprehensive.

Lesson 6: Syntax

  • let: Variables can be reassigned, but can’t be redeclared in the same scope.
  • const: Variables must be assigned an initial value, but can’t be redeclared in the same scope, and can’t be reassigned.
  • Hoisting: Before any JavaScript code is executed, all variables are hoisted, which means they're raised to the top of the function scope.
  • Temporal dead zone: If a variable is declared using let or const inside a block of code, then the variable is stuck in what is known as the temporal dead zone until the variable’s declaration is processed.
  • Suggested to ditch var in place of using let and const.
  • Template literals: Denoted with backticks ( `` ), template literals can contain placeholders which are represented using ${expression}.
  • Examples:
@ekas
ekas / AES.c
Created October 26, 2016 04:36 — forked from bricef/AES.c
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>