JavaScript Proxy Lab

In this lab, you will work with JavaScript Proxy objects. A proxy is an object that wraps another object (target) and intercepts the fundamental operations of the target object. The purpose is to customize the behavior of objects, and we will be implementing basic proxy functionalities.

In this hands-on exercise, you'll create a JavaScript Proxy object to log actions performed on an object, such as getting or setting properties. With the help of the Proxy, we'll also validate the data assigned to the properties.

Through this lab, you'll have the opportunity to work with JavaScript proxies and get a deeper understanding of their behavior and implementations.

Concepts you'll gain experience with:

  • Creating a Proxy object
  • Traps for intercepting object operations
  • Wrapping target object
  • Object validation
  • Logging object operations
Adding your container request
Getting your dedicated container
Connecting to your container
Setting up your editor
Finalizing your playground
TerminalEditorBrowser