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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Multiple clicks trigger a pool of executed functions" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<input id="txtMsg" type="text"/> |
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
console.clear(); | |
function Blog(){ | |
//bad pratice avoid this | |
//if (!(this instanceof blog)) | |
// return new blog(); | |
function internal(){ | |
console.log('internal:' + this); |
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
console.clear(); | |
console.log('init Test'); | |
var globalVar = "global"; | |
function myObject(value){ | |
var test="private"+value; | |
this.testLog = function(){ | |
console.log(test + ":" + globalVar); | |
}; |
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
.prompt{ | |
padding:5px; | |
background-color:black; | |
height:28px; | |
color:white; | |
font-family:courier; | |
} |
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
console.clear(); | |
function printRecursiveArray(value, c){ | |
for(c=0; c<value.length; c++){ | |
if (typeof value[c] !=='object'){ | |
console.log(value[c]); | |
}else{ | |
printRecursiveArray(value[c],0); | |
} | |
} | |
} |