You’ve defined a variable as the property of an object, but now you want to get rid of it. In this video Craig Buckler teaches novice JavaScript developers how to perform this essential operation, beginning with the basics of object creation. Learn how to erase your property using JavaScript’s delete command or, for more complex objects, convert the property to “undefined.” Beginners can follow along easily as Buckler demonstrates each option using jsconsole.com.

Take the next step in JavaScript with our Beginning JavaScript Learning Path.


Craig Buckler is an experienced Web Developer working in the UK who started his career creating desktop software. Craig has worked for a number of well-known companies, including Microsoft, MSN, Thomson Reuters, and the UK & EU governments. Craig is the prolific author of countless articles and tutorials on HTML5, CSS3, JavaScript, JQuery, PHP, and Node.js.

Article image: Screenshot from "Removing properties from JavaScript objects"