From 3f6516d027617b8e648247273105fb7dd5e49533 Mon Sep 17 00:00:00 2001 From: kzc Date: Sat, 20 May 2017 08:10:41 -0400 Subject: [PATCH] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 04bed970..de981ee0 100644 --- a/README.md +++ b/README.md @@ -305,7 +305,8 @@ There is a single high level minification function, `minify(code, options)`, whi performs all the steps in a configurable manner. Example: ```javascript -var result = UglifyJS.minify("function add(first, second) { return first + second; }"); +var code = "function add(first, second) { return first + second; }"; +var result = UglifyJS.minify(code); console.log(result.code); // minified output: function add(n,d){return n+d} console.log(result.error); // runtime error or undefined if no error ```