naked javascript

Download Naked JavaScript

Post on 13-May-2015

903 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

  • 1..-o -- E ~oo -.V' ~ . r -. ~ ., '" ,... s: -

2. o-. _. 3. ~ t I ,'.'1.11 ~. ~r,. g -- I t. c...0 l 0..:~ ~ ~IQ ITt:c:~ ~",. i.: ~. "'~,,'" 4. . ...... 5. -. 6. ~~ ~'!t- ... -fa,. , -~ ,.'" It, '!." .',., " ".. " " C1I, .JI ",.. - ., --.0, vt~4t'-+ ... .,,~s:: C;tC r- rIO----a~ '" ~ tA~ --S.., ~ ~ jf/II .,..;C -- CV - ;(. --- v- -- p" ~" ~~~II " ~ ", ~ "r~ ',f' , .""..-.......-- s:: a....'--' ... :. C' ,.,. ~ 'I ~ ~.... . ~i~t'~~ 8. o e: 9. Number.prototype.stupid = function() {return (Math.floor(Math.random()*2) == 1); }; var a = 4; a; a.stupid(); Number.prototype.stupid = function() { print ("I am not"); } ;a; a.stupid(); :s WOIJ~ 10r EUf,~~-rJ,fi,u~b'-~ 10. J -. -" :>.~cJ' 11. 'WI' ~~~ c~.....&,.-~ , - t } QI.....c ,.. c ~~ r ,....,. .,.~ ;;r rJ ". ,. rJ.," ,...~ )i' 4....-. --. ."".~.~ ~ ~......I ~c. ~~~.... ~..,. Co~1 -.-- ) -. " ",-- -. , ~ ,.::" . IN' .. S I , r ~- " 12. Function.prototype.stupid = function() { retu rn (Math. floor (Math. rando'm() ;':2) =-~ 1); };I' iA ~ ~~function a() { print("hi") } a() ;Bo",,~ ~'" a.stupid();---." Funct;on.prototype.stupid = function() { pri nt (~'I am not"); } ;a(); a.stupid(); Wa~.fWh 13. var a =1; var optimus ; function() {a=2;return function() { a = 3; retu rn functi on () {a = 6.;return function() {a == "prime";}} } }ptjoptilmus() opti mus () () optimus() () () opti mus () () () () 14.