JSFiddle - React, Tailwind, and code Playground
by Jelgab
HTML
<div id = "Resultados" />
JavaScript
function printResults( theValue ){
$("#Resultados").append( theValue );
$("#Resultados").append( $("<br/>") );
}
function removeProperty(obj, prop) {
if ( typeof obj[ prop ] !== "undefined" ){
printResults( "has property" );
delete obj[ prop ];
} else {
printResults( "doesn't have property" );
}
}
var objectOne = { Prop1 : "One" };
var objectTwo = { OtherProp : "Other" };
removeProperty( objectOne, "Prop1" );
removeProperty( objectTwo, "Prop1" );