Created
December 6, 2014 07:08
-
-
Save prio101/2581045fe0b3a6ab87e6 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/vewuso
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 charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var tasks = [ | |
{name:'Buy milk',complete:false}, | |
{name:'Trash',complete:false}, | |
{name:'Repairs',complete:false}, | |
{name:'Plumber',complete:true} | |
]; | |
var firstComplete; | |
for(var i=0;i<tasks.length;i++){ | |
if(tasks[i].complete){ | |
firstComplete = tasks[i]; | |
break; | |
} | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var tasks = [ | |
{name:'Buy milk',complete:false}, | |
{name:'Trash',complete:false}, | |
{name:'Repairs',complete:false}, | |
{name:'Plumber',complete:true} | |
]; | |
var firstComplete; | |
for(var i=0;i<tasks.length;i++){ | |
if(tasks[i].complete){ | |
firstComplete = tasks[i]; | |
break; | |
} | |
}</script></body> | |
</html> |
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
var tasks = [ | |
{name:'Buy milk',complete:false}, | |
{name:'Trash',complete:false}, | |
{name:'Repairs',complete:false}, | |
{name:'Plumber',complete:true} | |
]; | |
var firstComplete; | |
for(var i=0;i<tasks.length;i++){ | |
if(tasks[i].complete){ | |
firstComplete = tasks[i]; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment