Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
<script>
$(function(){
console.log("$('dt:first').text()", $('dt:first').text())
console.log("should only be foo", $('dt:first').text() === "foo");
var dls = $('dl');
console.log("dls.find('dt:first').text()", dls.find('dt:first').text())
console.log("should only be foo", dls.find('dt:first').text() === "foo");
#import <Foundation/Foundation.h>
@implementation NSArray (BlocksTest)
- (void) do:(void (^)(id))aBlock;
{
[self enumerateObjectsUsingBlock:
^(id obj, NSUInteger idx, BOOL *stop) {
aBlock(obj);
}];