Skip to content

Instantly share code, notes, and snippets.

@maurodoglio
maurodoglio / observer.js
Created December 7, 2012 10:30
Mauro's observer - updated to create two models
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My js observer</title>
<script type="text/javascript">
"use strict";
var Model = function(){
this.observers = [];
this.value = null