Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1963590.rXt3JUOypb@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 28 Oct 2012 19:53:01 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <67583587.7BbXikoxoM@PointedEars.de> <3102322.j8kCu7WbkW@PointedEars.de> <8635315.16DEVHx3j1@PointedEars.de> <1983193.7UhRnYkZ6n@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 36 NNTP-Posting-Date: 28 Oct 2012 19:53:02 CET NNTP-Posting-Host: a72053b8.newsspool3.arcor-online.net X-Trace: DXC=nAD8cLQ=I_UYQ5E:lKPe^bhg0G;bb]5LR]4[^XPXW X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16930 Cezary Tomczyk wrote: > W dniu 2012-10-28 18:07, Thomas 'PointedEars' Lahn pisze: >> Cezary Tomczyk wrote: >>> ID: String.prototype.trim = function(){ alert('test'); return false; >>> }; >>> R: function (){ alert('test'); return false; } >>> >>> ID: String.prototype.trim >>> R: function (){ alert('test'); return false; } >>> >>> ID: String(String.prototype.trim); >>> R: "function (){ alert('test'); return false; }" >> >> JFYI: In the Chromium/Chrome console a type conversion to String so far >> is implicit for Function instances. > > A, there is no differences when I type in console: > > String(String.prototype.trim); > and > String.prototype.trim There is a difference: the double-quotes. That aside, > because they are always converted to string. Right? you are correct. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,