{"id":253196,"date":"2015-03-16T23:50:13","date_gmt":"2015-03-16T19:50:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=253196"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=253196","title":{"rendered":"5 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Console, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0412\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438"},"content":{"rendered":"<p>       \u041d\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e <code>console.log()<\/code> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0438 \u0434\u043b\u044f \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b 5 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Console, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>  <i>\u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Google Chrome 38<\/i><\/p>\n<hr\/>\n<p>  <\/p>\n<h5>console.assert(expression, message)<\/h5>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043b\u043e\u0436\u043d\u043e, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"bash\">&gt; console.assert(document.querySelector('body'), &quot;Missing 'body' element&quot;)  &gt; console.assert(document.querySelector('.foo'), &quot;Missing '.foo' element&quot;) [Error] Assertion failed: Missing '.foo' element <\/code><\/pre>\n<hr\/>\n<p>  <\/p>\n<h5>console.table(object)<\/h5>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/72d\/9b6\/c34\/72d9b6c3433f4a34b19f3eba3a32e9a4.png\"\/><br \/>  <i>\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u043e <code>console.table()<\/code> \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u041c\u0430\u0440\u0438\u0443\u0441\u0430 \u0428\u0443\u043b\u044c\u0446\u0430 <a href=\"http:\/\/blog.mariusschulz.com\/2013\/11\/13\/advanced-javascript-debugging-with-consoletable\">\u00abAdvanced JavaScript Debugging with console.table()\u00bb<\/a><\/i><\/p>\n<hr\/>\n<p>  <\/p>\n<h5>console.profile(name)<\/h5>\n<p>  <code>console.profile(name)<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u043e\u0442\u0447\u0435\u0442\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u043d\u044e. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>console.profileEnd()<\/code>.<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/363\/931\/c75\/363931c75bb341f0a46091d11966fe3a.png\"\/><\/p>\n<hr\/>\n<p>  <\/p>\n<h5>console.group(message)<\/h5>\n<p>  <code>console.group(message)<\/code> \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u043b\u043e\u0433\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u0431\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>console.groupEnd()<\/code>. \u0421\u043f\u0438\u0441\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u0435\u0442\u0432\u0438\u0442\u044c\u0441\u044f. <code>console.groupCollapsed(message)<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043b\u0438\u0448\u044c \u0432 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/55e\/74d\/d93\/55e74dd936a841c6948b371c83493a42.png\"\/><\/p>\n<hr\/>\n<p>  <\/p>\n<h5>console.time(name)<\/h5>\n<p>  <code>console.time(name)<\/code> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0430\u0439\u043c\u0435\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>console.timeEnd(name)<\/code>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u043e\u0431\u0435\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0438\u043c\u044f.  <\/p>\n<pre><code class=\"bash\">&gt; console.time('Saving user') &gt; console.log('User saved') &gt; console.timeEnd('Saving user') Saving user: 2.750ms <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/253081\/\"> http:\/\/habrahabr.ru\/post\/253081\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e <code>console.log()<\/code> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0438 \u0434\u043b\u044f \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b 5 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Console, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>  <i>\u0412\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Google Chrome 38<\/i><\/p>\n<hr\/>\n<p>  <\/p>\n<h5>console.assert(expression, message)<\/h5>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043b\u043e\u0436\u043d\u043e, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-253196","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253196"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253196\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}