Skip to content

Exercise 38 pre correction #149

@stegrams

Description

@stegrams

pre tag in exercise 38 should contain

seq([1,2,3,,,,,,,4,5,6,,,]).throttle(1000 /* ms */) === seq([,,3,,,,,,,6,,,]); 
// instead of seq([,,,,,,,3,,,,,,,,,,6,,,]);

The seq test i used was

function testSeq(sq){
    var now1 = Date.now();

    function log(i){ 
        var now2 = Date.now();
        var intervalInSec = Math.round((now2 - now1) / 100) / 10; 
        if(intervalInSec >= 0.5){
            console.log(intervalInSec +'s'); 
        }
        now1 = now2;
        console.log(i)
    }

    sq.forEach(log);
}

In both cases testSeq(seq([1,2,3,,,,,,,4,5,6,,,]).throttle(1000)) and testSeq(seq([,,3,,,,,,,6,,,])) I had the same results

_CREATED: 16:13 - UPDATED: 17:50 and 18:25_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions