Skip to content

Instantly share code, notes, and snippets.

View christianmendoza's full-sized avatar

Christian Mendoza christianmendoza

View GitHub Profile
/* http://idiallo.com/javascript/ajax-without-jquery */
var url = "http://jsonplaceholder.typicode.com/posts";
var Ajax = {
xhr : null,
request : function (url, method, data, success, failure) {
if (!this.xhr) {
this.xhr = new XMLHttpRequest();
}
@christianmendoza
christianmendoza / christian_awesome.js
Last active August 29, 2015 14:27 — forked from BenDol/adam_awesome.java
Christian is Awesome!
// Object Oriented Life Motto
var me = world.getPerson("Christian Mendoza");
if(me !== null) {
while(me.isAlive()) {
if(me.isSad()) {
me.setSad(FALSE);
me.executeAwesomeness();
console.log("huzzah");
}
else {