Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.javascript > #7979

Re: oggetto.nomeFunzione("stringa").operaSullaFunzione()

X-Received by 10.66.190.41 with SMTP id gn9mr12174212pac.0.1453645685187; Sun, 24 Jan 2016 06:28:05 -0800 (PST)
X-Received by 10.50.30.201 with SMTP id u9mr324696igh.4.1453645685145; Sun, 24 Jan 2016 06:28:05 -0800 (PST)
Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h5no8692508igh.0!news-out.google.com!l1ni5816igd.0!nntp.google.com!o2no5716815iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups it.comp.lang.javascript
Date Sun, 24 Jan 2016 06:28:04 -0800 (PST)
In-Reply-To <dgk4haFb88lU2@mid.individual.net>
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> <dgjb1pF5cgoU1@mid.individual.net> <3855b4c6-80be-4975-a9a2-e38e2fae4cc5@googlegroups.com> <dgk25sFb88lU1@mid.individual.net> <752d8b83-5456-41af-b8ed-4fd7043cd51b@googlegroups.com> <dgk4haFb88lU2@mid.individual.net>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <fd65564f-14a2-4638-9727-d09f149e5c89@googlegroups.com> (permalink)
Subject Re: oggetto.nomeFunzione("stringa").operaSullaFunzione()
From albaserver@gmail.com
Injection-Date Sun, 24 Jan 2016 14:28:05 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com it.comp.lang.javascript:7979

Show key headers only | View raw


Il giorno domenica 24 gennaio 2016 15:14:04 UTC+1, Alessandro Pellizzari ha scritto:
>[...]
> Per cui puoi fare
> 
> var pippo = MyString('p').append('ip').append('po');
> 
> (vedi disclaimer sopra)

Scusa ma non ho capito :(

Ho provato a fare:

var MyString = function(val) { 
 if (this == document) { 
   return new MyString(val); 
 } else { 
   this.val = val; 
 } 
} 

MyString.prototype.append = function(v2) { 
 return MyString(this.val + v2); 
} 


var pippo = MyString('p').append('ip').append('po'); 
console.log(pippo); 

Ma mi restituisce:

Uncaught TypeError: Cannot read property 'append' of undefined

Back to it.comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

oggetto.nomeFunzione("stringa").operaSullaFunzione() alcaseltzer <albaserver@gmail.com> - 2016-01-23 13:17 -0800
  Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() Alessandro Pellizzari <shuriken@amiran.it> - 2016-01-24 06:59 +0000
    Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 02:06 -0800
      Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 02:26 -0800
      Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() Alessandro Pellizzari <shuriken@amiran.it> - 2016-01-24 13:33 +0000
        Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 05:48 -0800
          Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() Alessandro Pellizzari <shuriken@amiran.it> - 2016-01-24 14:14 +0000
            Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 06:28 -0800
              Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-01-24 14:52 +0000
              Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() Alessandro Pellizzari <shuriken@amiran.it> - 2016-01-24 15:50 +0000
                Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 10:45 -0800
                Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-01-24 19:08 +0000
                Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() albaserver@gmail.com - 2016-01-24 12:33 -0800
  Re: oggetto.nomeFunzione("stringa").operaSullaFunzione() 4ndre4 <4ndre4@4ndre4.com.invalid> - 2016-01-24 13:56 +0000

csiph-web