JavaScript Provide method - basic implementation