Skip to content

Instantly share code, notes, and snippets.

@emartinez-usgs
emartinez-usgs / Asynchronous Javascript
Last active August 29, 2015 13:59
Asynchronous Javascript Development
<!-- Placeholder Gist for Name Only -->
@emartinez-usgs
emartinez-usgs / ImageList
Last active August 29, 2015 14:00
Example Using ImageList Content Pattern
<!-- Placeholder for Gist Title -->
@emartinez-usgs
emartinez-usgs / XSS - This Can Be Dangerous
Created October 1, 2014 20:26
Simplified example showing the potential dangers of using "this" in Javascript.
<!-- Placeholder for Gist Name Only -->
@emartinez-usgs
emartinez-usgs / Function Definitions
Last active December 28, 2015 16:29
Example used to explain pass-by-value vs. pass-by-reference and which is used in Javascript.
/**
* This function assigns a new value to the input parameter.
*/
var func1 = function func1 (param1) {
param1 = [4, 5 ,6];
};
/**
* This function acts on the input parameter.
*/
@emartinez-usgs
emartinez-usgs / 11-example.js
Last active January 2, 2016 17:49
Functions and Constructors
var MyClass = function () {
console.log(this);
};
new MyClass(); // Constructor
MyClass(); // Function
@emartinez-usgs
emartinez-usgs / A JS Coding Style Guide
Last active November 22, 2016 20:21
Document, largely by example, HazDev team preferred coding style for JavaScript
This is a placeholder file to name the Gist.