From 98f1f1796f24b0c858ce032a1e07c0c6bda82e66 Mon Sep 17 00:00:00 2001 From: SwordsmanYao <1044225737@qq.com> Date: Thu, 22 Apr 2021 23:25:54 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E5=8D=95=E4=BE=8B=E6=A8=A1=E5=BC=8F.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\345\215\225\344\276\213\346\250\241\345\274\217.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/JavaScript/\345\215\225\344\276\213\346\250\241\345\274\217.md" "b/JavaScript/\345\215\225\344\276\213\346\250\241\345\274\217.md" index 7a5a681..d9c1364 100644 --- "a/JavaScript/\345\215\225\344\276\213\346\250\241\345\274\217.md" +++ "b/JavaScript/\345\215\225\344\276\213\346\250\241\345\274\217.md" @@ -14,7 +14,7 @@ Singleton.prototype.getName = function() { alert(this.name); }; -Singleton.getInstance = (function(name) { +Singleton.getInstance = (function() { var instance; return function(name){ if (!instance) { @@ -28,4 +28,4 @@ var a = Singleton.getInstance('ConardLi'); var b = Singleton.getInstance('ConardLi2'); console.log(a===b); //true -``` \ No newline at end of file +```