{"id":798,"date":"2006-02-25T15:49:45","date_gmt":"2006-02-25T15:49:45","guid":{"rendered":"http:\/\/www.parnes.com\/wordpress\/index.php\/2006\/02\/25\/prototype_trythese\/"},"modified":"2006-02-25T15:49:45","modified_gmt":"2006-02-25T15:49:45","slug":"prototype_trythese","status":"publish","type":"post","link":"https:\/\/www.parnes.com\/blog\/index.php\/2006\/02\/25\/prototype_trythese\/","title":{"rendered":"Prototype Try.these"},"content":{"rendered":"<p>L&auml;ste lite om JavaScript biblioteket Prototype och hittade att det tillf&ouml;r en funktion som heter try.these och ett exempel kan se ut s&aring; h&auml;r: <\/p>\n<pre>return Try.these(\nfunction() {\nalert(\"first\");\njkgjhgjhg        \/\/intentional error\nalert(\"firsterror\");\nreturn 1;\n},\nfunction() {\nalert(\"second\");\nreturn 2;\n}\n);<\/pre>\n<p>D&auml;r den helt enkelt testar olika block av kod och om det blir fel s&aring; testar den n&auml;sta.<br \/>\nDet ger en helt ny tolkning av &#8220;trial and error&#8221;. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>L&auml;ste lite om JavaScript biblioteket Prototype och hittade att det tillf&ouml;r en funktion som heter try.these och ett exempel kan se ut s&aring; h&auml;r: return Try.these( function() { alert(&#8220;first&#8221;); jkgjhgjhg \/\/intentional error alert(&#8220;firsterror&#8221;); return 1; }, function() { alert(&#8220;second&#8221;); return 2; } ); D&auml;r den helt enkelt testar olika block av kod och om det &hellip; <a href=\"https:\/\/www.parnes.com\/blog\/index.php\/2006\/02\/25\/prototype_trythese\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Prototype Try.these<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","hentry","category-techstuff"],"_links":{"self":[{"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=798"}],"version-history":[{"count":0,"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/798\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.parnes.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}