Created
December 15, 2013 20:04
-
-
Save chrisbraddock/7977440 to your computer and use it in GitHub Desktop.
from http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/ via http://stackoverflow.com/a/5947280/227260
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( skillet, $, undefined ) { | |
//Private Property | |
var isHot = true; | |
//Public Property | |
skillet.ingredient = "Bacon Strips"; | |
//Public Method | |
skillet.fry = function() { | |
var oliveOil; | |
addItem( "\t\n Butter \n\t" ); | |
addItem( oliveOil ); | |
console.log( "Frying " + skillet.ingredient ); | |
}; | |
//Private Method | |
function addItem( item ) { | |
if ( item !== undefined ) { | |
console.log( "Adding " + $.trim(item) ); | |
} | |
} | |
}( window.skillet = window.skillet || {}, jQuery )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment