Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

WTF Javascript?

Name: Anonymous 2012-02-29 2:35

function map(proc, lst) {
    var res = [];
    for (var obj in lst)
        res.push(proc(obj));
    return res;
}

function filter(pred, lst) {
    var res = [];
    for (var obj in lst)
        if (pred(obj))
            res.push(obj);
    return res;
}

ls = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

ls = map(function(x) {
    return x * x;
}, ls);

print(ls);

ls = filter(function (x) {
    return x % 2 == 0;
}, ls);

print(ls);


What I expect:
0,1,4,9,16,25,36,49,64,81
0,4,16,36,64


What I get:
0,1,4,9,16,25,36,49,64,81
1,3,5,7,9


WHY?

Name: Anonymous 2012-02-29 12:50

want to fill in the form on http://www.unblockyoutube.us/

normally i'd do document.FORMNAME.FIELDNAME.value='TEXT GOES HERE';

But the form on that page has no name or fields (I tried "url_form and "a" respectively without success).

Now, I also tried document.getElementsByTagName('form')[0].value='TEXT';

But that didnt work either.

Any pointers?

document.getElementsByClassName("form")[0].value = "pepe"

gives you a blank page with text

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List