diff --git a/define-nonenumerable-read-only-accessor/README.md b/define-nonenumerable-read-only-accessor/README.md index 81079165..92a8898e 100644 --- a/define-nonenumerable-read-only-accessor/README.md +++ b/define-nonenumerable-read-only-accessor/README.md @@ -38,8 +38,6 @@ var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils/define-nonenumera - - ```javascript function getter() { return 'bar'; @@ -49,8 +47,12 @@ var obj = {}; setNonEnumerableReadOnlyAccessor( obj, 'foo', getter ); -obj.foo = 'boop'; -// throws +try { + obj.foo = 'boop'; + // throws +} catch ( error ) { + console.error( error.message ); +} ```