Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// alexa-cookbook sample code
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the entire file contents as the code for a new Lambda function,
// or copy & paste section #3, the helper function, to the bottom of your existing Lambda code.
// TODO add URL to this entry in the cookbook
@hao1987
hao1987 / 0.md
Created November 29, 2016 03:23 — forked from max-mapper/0.md
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

{
"condition":"OR",
"limit":"600",
"dataSourceLimits":{"consumers":"500","patients":"100"},
"rules":[
{
"condition":"AND",
"dataSource":"consumers",
"rules":[
{
{
"id": "7",
"name": "Test List",
"type": "seed",
"et_id": "549210",
"recipients": [
{
"email": "tester1@gmail.com",
"subscriberkey": "tester1sk"
},
{
"data": [
{
"Total": 133485,
"Age": {
"18": "1229",
"25": "3793",
"30": "7493",
"35": "9264",
"40": "9079",
{
"age": {
"0" : "10",
"1" : "20"
},
"gender": {
"0" : "Female"
},
"zctas" : {
"0" : "11214",
{
"id": "a0d36000000m9U6AAI",
"table": "consumers",
"condition": "OR",
"rules": [
{
"condition": "AND",
"rules": [
{
"id": "name_first",