PageSourceSearch

https://www.ezfrontend.com/assets/js/84ee8cb6.c2016570.js

js ezfrontend.com collected 2026-10-07 20:32:52 UTC 6,479 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkeasy_frontend=self.webpackChunkeasy_frontend||[]).push([[8725],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return d}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),m=u(n),h=o,d=m["".concat(l,".").concat(h)]||m[h]||p[h]||i;return n?r.createElement(d,a(a({ref:t},s),{},{components:n})):r.createElement(d,a({ref:t},s))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[m]="string"==typeof e?e:o,a[1]=c;for(var u=2;u<i;u++)a[u]=n[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}h.displayName="MDXCreateElement"},3009:function(e,t,n){n.r(t),n.d(t,{assets:function(){return m},contentTitle:function(){return u},default:function(){return v},frontMatter:function(){return l},metadata:function(){return s},toc:function(){return p}});var r,o=n(7462),i=n(3366),a=(n(7294),n(3905)),c=["components"],l={id:"js-04-06",slug:"/js-comments",title:"M\u1eb9o vi\u1ebft comments hi\u1ec7u qu\u1ea3",sidebar_label:"04-06 Comments",draft:!1},u="M\u1eb9o vi\u1ebft comments hi\u1ec7u qu\u1ea3 \ud83c\udf89",s={unversionedId:"javascript/js-04-06",id:"javascript/js-04-06",title:"M\u1eb9o vi\u1ebft comments hi\u1ec7u qu\u1ea3",description:"- What: Comments l\xe0 ph\u1ea7n gi\u1ea3i th\xedch th\xeam cho code hi\u1ec7n t\u1ea1i.",source:"@site/docs/javascript/04-06-comments.md",sourceDirName:"javascript",slug:"/js-comments",permalink:"/docs/js-comments",draft:!1,tags:[],version:"current",frontMatter:{id:"js-04-06",slug:"/js-comments",title:"M\u1eb9o vi\u1ebft comments hi\u1ec7u qu\u1ea3",sidebar_label:"04-06 Comments",draft:!1},sidebar:"mySidebar",previous:{title:"02-04 FiraCode",permalink:"/docs/js-vscode-firacode"},next:{title:"04-08 Variables",permalink:"/docs/js-variables"}},m={},p=[{value:"Vi\u1ebft comments nh\u01b0 th\u1ebf n\xe0o cho hi\u1ec7u qu\u1ea3",id:"vi\u1ebft-comments-nh\u01b0-th\u1ebf-n\xe0o-cho-hi\u1ec7u-qu\u1ea3",level:2}],h=(r="DocsJSFooter",function(e){return console.warn("Component "+r+" was not imported, exported, or provided by MDXProvider as global scope"),(0,a.kt)("div",e)}),d={toc:p},f="wrapper";function v(e){var t=e.components,n=(0,i.Z)(e,c);return(0,a.kt)(f,(0,o.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"m\u1eb9o-vi\u1ebft-comments-hi\u1ec7u-qu\u1ea3-"},"M\u1eb9o vi\u1ebft comments hi\u1ec7u qu\u1ea3 \ud83c\udf89"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"What"),": Comments l\xe0 ph\u1ea7n gi\u1ea3i th\xedch th\xeam cho code hi\u1ec7n t\u1ea1i."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"When"),": Khi c\xf3 logic ph\u1ee9c t\u1ea1p, code ph\u1ee9c t\u1ea1p"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Where"),": Vi\u1ebft tr\u01b0\u1edbc \u0111o\u1ea1n code c\u1ea7n gi\u1ea3i th\xedch"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Why"),": \u0110\u1ec3 hi\u1ec3u \u0111\u01b0\u1ee3c t\u1ea1i sao m\xecnh vi\u1ebft code nh\u01b0 v\u1eady khi quay l\u1ea1i sau n\xe0y."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"}
1,"Who"),": Ng\u01b0\u1eddi n\xe0o vi\u1ebft code, th\xec ng\u01b0\u1eddi \u0111\xf3 comments =))")),(0,a.kt)("h2",{id:"vi\u1ebft-comments-nh\u01b0-th\u1ebf-n\xe0o-cho-hi\u1ec7u-qu\u1ea3"},"Vi\u1ebft comments nh\u01b0 th\u1ebf n\xe0o cho hi\u1ec7u qu\u1ea3"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Vi\u1ebft b\u1eb1ng ",(0,a.kt)("strong",{parentName:"li"},"Ti\u1ebfng Anh")," (QUAN TR\u1eccNG)"),(0,a.kt)("li",{parentName:"ul"},"Cung c\u1ea5p high-level overview cho c\xe1i m\xecnh \u0111ang l\xe0m."),(0,a.kt)("li",{parentName:"ul"},"Gi\u1ea3i th\xedch t\u1ea1i sao cho code hi\u1ec7n t\u1ea1i, ch\u1ee9 ko gi\u1ea3i th\xedch code ch\u1ea1y nh\u01b0 th\u1ebf n\xe0o.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"/**\n * Returns x raised to the n-th power.\n *\n * @param {number} x The number to raise.\n * @param {number} n The power, must be a natural number.\n * @return {number} x raised to the n-th power.\n */\nfunction pow(x, n) {\n  // ...\n}\n\nfunction doComplexStuff() {\n  // Your high-level summary over here\n  // to let the others read your code understand what you're going to do briefly\n}\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// Print to console: Welcome to Easy FRONTEND --\x3e BAD\nconsole.log('Welcome to Easy Frontend')\n\n// prevent XSS attack from htmlString --\x3e GOOD\nconst safeHTML = sanitize(htmlString);\n")),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Tham kh\u1ea3o th\xeam: ",(0,a.kt)("a",{parentName:"p",href:"https://javascript.info/comments"},"https://javascript.info/comments"))),(0,a.kt)(h,{mdxType:"DocsJSFooter"}))}v.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.