14.09.2015 Views

JavaScript Datové typy / literály Datové typy / literály Konverze na boolean

verze pro tisk - j i k o s . c z

verze pro tisk - j i k o s . c z

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

functionEmploye(){<br />

functionWorkerBe(){<br />

hiṡprojects=[];<br />

hiṡdept="general";<br />

t mac=newEnginer("Wod,Mac");<br />

vara=newAray();<br />

arc=newAray(3,"a");<br />

arb=newAray(3);<br />

vard=["a","b","c"];<br />

v Objekty a dědičnost<br />

unctionEmploye(<strong>na</strong>me,dept){<br />

hiṡ<strong>na</strong>me=<strong>na</strong>me|";<br />

hiṡdept=dept|"general";<br />

functionWorkerBe(<strong>na</strong>me,dept,projs){.}<br />

unctionMa<strong>na</strong>ger(<strong>na</strong>me,dept,reports){.}<br />

WorkerBėprototype=newEmploye;<br />

functionSalesPerson(<strong>na</strong>me,projs,quota){.}<br />

Ma<strong>na</strong>geṙprototype=newEmploye;<br />

Engineṙprototype=newWorkerBe;<br />

SalesPersoṅprototype=newWorkerBe;<br />

functionEnginer(<strong>na</strong>me,projs,mach){.}<br />

varidCounter=1;<br />

thiṡid=idCounter+;<br />

}f t f<br />

Array.prototype<br />

toString() – totéž, co join()<br />

toLocaleString()<br />

concat(item1, item2, …)<br />

join(separator) – vytvoření řetězce (defaultní separátor je<br />

čárka)<br />

pop()<br />

push(item1, item2, …)<br />

reverse()<br />

shift()<br />

slice(start, end)<br />

Objekty a dědičnost<br />

}WorkerBėprototype=newEmploye;<br />

mployėprototypė<strong>na</strong>me="Unknown";<br />

}Employėprototypė<strong>na</strong>me=";<br />

amy=newWorkerBe;<br />

E<br />

Array

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!