new lecture. javascript pattern