X-Received: by 10.182.128.39 with SMTP id nl7mr11825980obb.13.1453629977870; Sun, 24 Jan 2016 02:06:17 -0800 (PST) X-Received: by 10.50.225.101 with SMTP id rj5mr317244igc.3.1453629977848; Sun, 24 Jan 2016 02:06:17 -0800 (PST) Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!h5no8616784igh.0!news-out.google.com!kr2ni7699igb.0!nntp.google.com!h5no8616780igh.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: it.comp.lang.javascript Date: Sun, 24 Jan 2016 02:06:17 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.230.73.160; posting-account=cq4grQoAAAAyQd4GSKCm6SON0ktlHosm NNTP-Posting-Host: 2.230.73.160 References: <12069110-6044-4930-9e22-4304304ea799@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3855b4c6-80be-4975-a9a2-e38e2fae4cc5@googlegroups.com> Subject: Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() From: albaserver@gmail.com Injection-Date: Sun, 24 Jan 2016 10:06:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com it.comp.lang.javascript:7973 Il giorno domenica 24 gennaio 2016 07:59:07 UTC+1, Alessandro Pellizzari ha= scritto: > Quella =E8 la sintassi per chiamare un metodo di un oggetto, quindi la pu= oi=20 > applicare solo su oggetti. Quindi dovrei fare qualcosa tipo: var stringa=3D { operaSullaStringa: function(parametro) { parametro.faiQlcs(); } } Cos=EC dovrei richiamarlo come stringa.operaSullaStringa("valore")? > Se non vuoi estendere l'oggetto String (che non =E8 DOM, ma normale JS), = e=20 > in generale fai bene, allora devi crearti un tuo oggetto string e usare= =20 > sempre quello. S=EC scusa mi sono accorto dopo dell'errore. Ma, a scopo didattico, come fa jQuery ad estendere le funzioni e a operare = su $("qualcosa").lavoraSulReturnDellaFunzione()? Grazie e ciao