{"id":39519,"date":"2023-08-17T13:10:54","date_gmt":"2023-08-17T06:10:54","guid":{"rendered":"https:\/\/itviec.com\/blog\/?p=39519"},"modified":"2025-10-01T11:51:42","modified_gmt":"2025-10-01T04:51:42","slug":"javascript-la-gi","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/javascript-la-gi\/","title":{"rendered":"JavaScript l\u00e0 g\u00ec? H\u1ecdc JavaScript c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh d\u1ec5 hi\u1ec3u nh\u1ea5t"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#JavaScript_la_gi\" >JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#JavaScript_hoat_dong_the_nao\" >JavaScript ho\u1ea1t \u0111\u1ed9ng th\u1ebf n\u00e0o?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#JavaScript_duoc_dung_de_lam_gi\" >JavaScript \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#9_ung_dung_noi_bat_cua_JavaScript\" >9 \u1ee9ng d\u1ee5ng n\u1ed5i b\u1eadt c\u1ee7a JavaScript<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Cac_uu_diem_han_che_dang_luu_y_cua_JavaScript_la_gi\" >C\u00e1c \u01b0u \u0111i\u1ec3m &amp; h\u1ea1n ch\u1ebf \u0111\u00e1ng l\u01b0u \u00fd c\u1ee7a JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Cac_kieu_du_lieu_trong_Javascript_la_gi\" >C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u trong Javascript l\u00e0 g\u00ec?&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Quy_tac_cu_phap_trong_JavaScript_la_gi\" >Quy t\u1eafc c\u00fa ph\u00e1p trong JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Bien_trong_JavaScript_la_gi_Cach_khai_bao_va_gan_gia_tri_cho_bien\" >Bi\u1ebfn trong JavaScript l\u00e0 g\u00ec? C\u00e1ch khai b\u00e1o v\u00e0 g\u00e1n gi\u00e1 tr\u1ecb cho bi\u1ebfn<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Toan_tu_trong_JavaScript_la_gi\" >To\u00e1n t\u1eed trong JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Ham_trong_JavaScript_la_gi\" >H\u00e0m trong JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Thu_vien_JavaScript_co_ban\" >Th\u01b0 vi\u1ec7n JavaScript c\u01a1 b\u1ea3n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#12_framework_Javascript_pho_bien_nhat_2023\" >12 framework Javascript ph\u1ed5 bi\u1ebfn nh\u1ea5t 2023<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Cac_cau_hoi_thuong_gap_ve_JavaScript_la_gi\" >C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 JavaScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/#Tong_ket\" >T\u1ed5ng k\u1ebft<\/a><\/li><\/ul><\/nav><\/div>\n\n<p><b><i>JavaScript l\u00e0 g\u00ec? JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c d\u00f9ng nhi\u1ec1u nh\u1ea5t trong h\u01a1n 10 n\u0103m qua, theo kh\u1ea3o s\u00e1t c\u1ee7a <\/i><\/b><a href=\"https:\/\/survey.stackoverflow.co\/2025\/#technology\" target=\"_blank\" rel=\"noreferrer noopener\"><i><i><strong>Stackoverflow<\/strong><\/i><\/i><\/a><b><i>. \u0110\u1ecdc b\u00e0i vi\u1ebft sau \u0111\u1ec3 bi\u1ebft n\u00ean h\u1ecdc JavaScript th\u1ebf n\u00e0o, ph\u00e1t tri\u1ec3n s\u1ef1 nghi\u1ec7p IT v\u1edbi ng\u00f4n ng\u1eef n\u00e0y ra sao \u0111\u1ec3 th\u0103ng ti\u1ebfn v\u00e0 c\u00f3 m\u1ee9c thu nh\u1eadp h\u1ea5p d\u1eabn.<\/i><\/b><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">B\u00e0i vi\u1ebft n\u00e0y cung c\u1ea5p:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">L\u1ed9 tr\u00ecnh ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 JavaScript cho ng\u01b0\u1eddi m\u1edbi: c\u00e1ch ho\u1ea1t \u0111\u1ed9ng, \u1ee9ng d\u1ee5ng, c\u00e1c thu\u1eadt ng\u1eef.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00e1c th\u01b0 vi\u1ec7n v\u00e0 framework JavaScript ph\u1ed5 bi\u1ebfn v\u00e0 \u0111\u00e1ng h\u1ecdc nh\u1ea5t\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"JavaScript_la_gi\"><\/span><b>JavaScript l\u00e0 g\u00ec?<\/b><b><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-javascript-la-gi-0\"><b>JavaScript l\u00e0 g\u00ec?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\"><strong>JavaScript<\/strong>, c\u00f2n \u0111\u01b0\u1ee3c vi\u1ebft t\u1eaft l\u00e0 <strong>JS<\/strong>, l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh, ch\u1ea1y d\u01b0\u1edbi d\u1ea1ng <strong>ng\u00f4n ng\u1eef k\u1ecbch b\u1ea3n ph\u00eda m\u00e1y kh\u00e1ch<\/strong> trong m\u00f4i tr\u01b0\u1eddng hosting. M\u00f4i tr\u01b0\u1eddng hosting ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 tr\u00ecnh duy\u1ec7t web, d\u00f9ng ng\u00f4n ng\u1eef n\u00e0y \u0111\u1ec3 t\u1ea1o t\u00ednh t\u01b0\u01a1ng t\u00e1c cho trang web.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n v\u00e0o nh\u1eefng n\u0103m 1990 b\u1edfi <\/span><a href=\"https:\/\/twitter.com\/BrendanEich\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Brendan Eich<\/span><\/a><span style=\"font-weight: 400;\"> &#8211; ng\u01b0\u1eddi c\u0169ng l\u00e0 co-founder c\u1ee7a Mozilla &amp; Firefox. K\u1ec3 t\u1eeb \u0111\u00f3, ng\u00f4n ng\u1eef n\u00e0y \u0111\u00e3 tr\u1edf th\u00e0nh m\u1ed9t trong nh\u1eefng c\u00f4ng ngh\u1ec7 c\u1ed1t l\u00f5i duy tr\u00ec World Wide Web.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cac-d\u1eb7c-di\u1ec3m-c\u1ee7a-ngon-ng\u1eef-l\u1eadp-trinh-javascript-la-gi\"><strong>C\u00e1c \u0111\u1eb7c \u0111i\u1ec3m c\u1ee7a ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh JavaScript l\u00e0 g\u00ec?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef k\u1ecbch b\u1ea3n (scripting language) h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef nh\u1eadp \u0111\u1ed9ng (dynamic typing) d\u1ef1a tr\u00ean prototype.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef lightweight (d\u1ec5 h\u1ecdc v\u00e0 vi\u1ebft code nhanh)<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef \u0111a m\u00f4 h\u00ecnh (multi-paradigm) v\u00e0 \u0111\u01a1n lu\u1ed3ng (single threaded).\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><span style=\"font-weight: 400;\">Theo <a href=\"https:\/\/radixweb.com\/blog\/top-javascript-usage-statistics\" target=\"_blank\" rel=\"noopener\">Radixweb<\/a>, g\u1ea7n nh\u01b0 c\u00e1c thi\u1ebft b\u1ecb hi\u1ec7n nay (Windows, Linux, macOS, Android, iOS, smart TV,&#8230;) \u0111\u1ec1u \u0111ang s\u1eed d\u1ee5ng c\u00e1c framework JavaScript ph\u1ed5 bi\u1ebfn. T\u00ednh \u0111\u1ebfn n\u0103m 2022, 98% trong s\u1ed1 1,8 t\u1ef7 trang web tr\u00ean th\u1ebf gi\u1edbi s\u1eed d\u1ee5ng ng\u00f4n ng\u1eef n\u00e0y l\u00e0m ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ph\u00eda m\u00e1y kh\u00e1ch, \u0111i\u1ec1u n\u00e0y cho th\u1ea5y m\u1ee9c \u0111\u1ed9 ph\u1ed5 bi\u1ebfn ng\u00e0y c\u00e0ng t\u0103ng c\u1ee7a n\u00f3.<\/span><\/p>\n\n\n\n<p>T\u00ecm hi\u1ec3u ngay: Vi\u1ec7c l\u00e0m <a href=\"https:\/\/itviec.com\/it-jobs\/web-developer?utm_medium=anchor_text_high&amp;utm_source=blog&amp;utm_campaign=viec_lam_web_developer&amp;utm_content=javascript_la_gi\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Web Developer<\/strong><\/a> h\u1ea5p d\u1eabn tr\u00ean ITviec<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-ho\u1ea1t-d\u1ed9ng-th\u1ebf-nao\"><span class=\"ez-toc-section\" id=\"JavaScript_hoat_dong_the_nao\"><\/span><b>JavaScript ho\u1ea1t \u0111\u1ed9ng th\u1ebf n\u00e0o?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">M\u00e3 JavaScript \u0111\u01b0\u1ee3c th\u00f4ng d\u1ecbch tr\u1ef1c ti\u1ebfp sang m\u00e3 ng\u00f4n ng\u1eef m\u00e1y c\u01a1 b\u1ea3n b\u1eb1ng c\u00f4ng c\u1ee5 JavaScript.&nbsp;<\/span><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-d\u1ed1i-v\u1edbi-javascript-phia-may-khach-client-side\"><b>\u0110\u1ed1i v\u1edbi JavaScript ph\u00eda m\u00e1y kh\u00e1ch (client-side)<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00f4ng c\u1ee5 JavaScript \u0111\u01b0\u1ee3c t\u00edch h\u1ee3p s\u1eb5n b\u00ean trong h\u1ea7u h\u1ebft c\u00e1c tr\u00ecnh duy\u1ec7t web ph\u1ed5 bi\u1ebfn.&nbsp;<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Tr\u00ecnh duy\u1ec7t th\u1ef1c hi\u1ec7n t\u1ea3i trang web khi c\u00f3 ng\u01b0\u1eddi truy c\u1eadp.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Tr\u00ecnh duy\u1ec7t chuy\u1ec3n \u0111\u1ed5i trang web \u0111\u00f3 v\u00e0 t\u1ea5t c\u1ea3 c\u00e1c ph\u1ea7n t\u1eed c\u1ee7a n\u00f3 (button, nh\u00e3n d\u00e1n, h\u1ed9p th\u1ea3 xu\u1ed1ng,&#8230;) th\u00e0nh d\u1ea1ng c\u1ea5u tr\u00fac d\u1eef li\u1ec7u g\u1ecdi l\u00e0 DOM (t\u1ea1m d\u1ecbch: M\u00f4 h\u00ecnh \u0110\u1ed1i t\u01b0\u1ee3ng T\u00e0i li\u1ec7u).<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00f4ng c\u1ee5 JavaScript c\u1ee7a tr\u00ecnh duy\u1ec7t th\u1ef1c hi\u1ec7n chuy\u1ec3n m\u00e3 JavaScript th\u00e0nh m\u00e3 byte.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Khi c\u00f3 s\u1ef1 ki\u1ec7n x\u1ea3y ra, v\u00ed d\u1ee5 nh\u01b0 nh\u1ea5p v\u00e0o button, vi\u1ec7c th\u1ef1c thi code block JavaScript li\u00ean k\u1ebft s\u1ebd \u0111\u01b0\u1ee3c k\u00edch ho\u1ea1t.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00f4ng c\u1ee5 JavaScript di\u1ec5n gi\u1ea3i m\u00e3 byte v\u00e0 t\u1ea1o thay \u0111\u1ed5i \u0111\u1ed1i v\u1edbi DOM.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Tr\u00ecnh duy\u1ec7t hi\u1ec3n th\u1ecb DOM m\u1edbi.<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-d\u1ed1i-v\u1edbi-javascript-phia-may-ch\u1ee7-server-side\"><b>\u0110\u1ed1i v\u1edbi JavaScript ph\u00eda m\u00e1y ch\u1ee7 (server-side)<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00f4ng c\u1ee5 JavaScript n\u1eb1m tr\u1ef1c ti\u1ebfp tr\u00ean server. JavaScript ph\u00eda m\u00e1y ch\u1ee7 c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Truy c\u1eadp c\u01a1 s\u1edf d\u1eef li\u1ec7u<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Th\u1ef1c hi\u1ec7n c\u00e1c t\u00ednh to\u00e1n logic kh\u00e1c nhau<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ph\u1ea3n h\u1ed3i c\u00e1c s\u1ef1 ki\u1ec7n kh\u00e1c nhau do h\u1ec7 \u0111i\u1ec1u h\u00e0nh c\u1ee7a m\u00e1y ch\u1ee7 k\u00edch ho\u1ea1t.\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-d\u01b0\u1ee3c-dung-d\u1ec3-lam-gi\"><span class=\"ez-toc-section\" id=\"JavaScript_duoc_dung_de_lam_gi\"><\/span><b>JavaScript \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec?<\/b><b><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-trang-web-s\u1ebd-th\u1ebf-nao-n\u1ebfu-khong-co-javascript\"><b>Trang web s\u1ebd th\u1ebf n\u00e0o n\u1ebfu kh\u00f4ng c\u00f3 JavaScript?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">N\u1ebfu kh\u00f4ng c\u00f3 JavaScript, trang web s\u1ebd ch\u1ec9 c\u00f3 HTML v\u00e0 CSS. Khi \u0111\u00f3, 90% website s\u1ebd \u1edf d\u1ea1ng t\u0129nh nh\u01b0 m\u1ed9t cu\u1ed1n s\u00e1ch.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0y \u0111\u01b0\u1ee3c t\u1ea1o ra \u0111\u1ec3 web developer c\u00f3 th\u1ec3 nh\u00fang m\u00e3 th\u1ef1c thi v\u00e0o trang web, cho ph\u00e9p tr\u00ecnh duy\u1ec7t web ph\u1ea3n h\u1ed3i t\u01b0\u01a1ng t\u00e1c c\u1ee7a ng\u01b0\u1eddi d\u00f9ng v\u00e0 thay \u0111\u1ed5i b\u1ed1 c\u1ee5c, n\u1ed9i dung tr\u00ean trang web nh\u01b0:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">N\u00fat c\u00f3 th\u1ec3 nh\u1ea5p v\u00e0o, menu th\u1ea3 xu\u1ed1ng\u00a0<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">N\u1ed9i dung b\u1ed5 sung khi l\u00e0m m\u1edbi trang<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">M\u00e0u s\u1eafc c\u1ee7a c\u00e1c ph\u1ea7n t\u1eed thay \u0111\u1ed5i linh ho\u1ea1t tr\u00ean trang.<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vai-tro-c\u1ee7a-html-css-javascript\"><b>Vai tr\u00f2 c\u1ee7a HTML-CSS-JavaScript<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">T\u00f3m l\u1ea1i, vai tr\u00f2 c\u1ee7a <\/span>HTML-CSS-JavaScript<span style=\"font-weight: 400;\"> \u0111\u01b0\u1ee3c ph\u00e2n \u0111\u1ecbnh nh\u01b0 sau:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>HTML<\/b><span style=\"font-weight: 400;\"> x\u00e1c \u0111\u1ecbnh c\u1ea5u tr\u00fac v\u00e0 n\u1ed9i dung c\u1ee7a trang web.<\/span><\/li>\n\n\n\n<li><b>CSS <\/b><span style=\"font-weight: 400;\">\u0111\u1eb7t c\u00e1ch tr\u00ecnh b\u00e0y v\u00e0 thi\u1ebft k\u1ebf giao di\u1ec7n trang web.<\/span><\/li>\n\n\n\n<li><b>JavaScript <\/b><span style=\"font-weight: 400;\">b\u1ed5 sung t\u00ednh t\u01b0\u01a1ng t\u00e1c cho trang web, t\u1ea1o ra c\u00e1c \u1ee9ng d\u1ee5ng web phong ph\u00fa h\u01a1n.<\/span><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/html-js-css.jpg\" alt=\"javascript-html-css\" class=\"wp-image-39591\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/html-js-css.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/html-js-css-300x169.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/html-js-css-200x112.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/html-js-css-100x56.jpg 100w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><i><span style=\"font-weight: 400;\">Minh ho\u1ea1 d\u1ec5 hi\u1ec3u v\u1ec1 vai tr\u00f2 c\u1ee7a <\/span><\/i><b><i>HTML-CSS-JavaScript <\/i><\/b><i>(<\/i><i><span style=\"font-weight: 400;\">n\u1ebfu v\u00ed trang web l\u00e0 m\u1ed9t chi\u1ebfc xe h\u01a1i). Ngu\u1ed3n @Scrimba<\/span><\/i><b><\/b><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-9-\u1ee9ng-d\u1ee5ng-n\u1ed5i-b\u1eadt-c\u1ee7a-javascript\"><span class=\"ez-toc-section\" id=\"9_ung_dung_noi_bat_cua_JavaScript\"><\/span><b>9 \u1ee9ng d\u1ee5ng n\u1ed5i b\u1eadt c\u1ee7a JavaScript<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-phat-tri\u1ec3n-\u1ee9ng-d\u1ee5ng-web\"><b>1. Ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng web<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e1c framework JavaScript gi\u00fap ph\u00e1t tri\u1ec3n c\u00e1c \u1ee9ng d\u1ee5ng web nh\u01b0 React Native, React, Angular, Vue\u2026&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">M\u1ed9t v\u00ed d\u1ee5 \u1ee9ng d\u1ee5ng web m\u1ea1nh m\u1ebd \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 b\u1edfi ng\u00f4n ng\u1eef n\u00e0y l\u00e0 Google Maps, ng\u01b0\u1eddi d\u00f9ng ch\u1ec9 c\u1ea7n nh\u1ea5p v\u00e0 k\u00e9o chu\u1ed9t \u0111\u1ec3 xem chi ti\u1ebft b\u1ea3n \u0111\u1ed3, m\u00e0 kh\u00f4ng c\u1ea7n giao ti\u1ebfp v\u1edbi m\u00e1y ch\u1ee7.&nbsp;<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-t\u1ea1o-t\u01b0\u01a1ng-tac-cho-trang-web\"><b>2. T\u1ea1o t\u01b0\u01a1ng t\u00e1c cho trang web<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript cho ph\u00e9p t\u1ea1o c\u00e1c thao t\u00e1c \u0111\u1ed9ng gi\u00fap ng\u01b0\u1eddi d\u00f9ng t\u01b0\u01a1ng t\u00e1c v\u1edbi c\u00e1c trang web nh\u01b0:&nbsp;<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Hi\u1ec3n th\u1ecb ho\u1eb7c \u1ea9n th\u00f4ng tin b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o n\u00fat<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Thay \u0111\u1ed5i m\u00e0u c\u1ee7a m\u1ed9t n\u00fat khi di chu\u1ed9t qua n\u00f3<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ph\u00f3ng to ho\u1eb7c thu nh\u1ecf h\u00ecnh \u1ea3nh<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ph\u00e1t \u00e2m thanh v\u00e0 video tr\u00ean m\u1ed9t trang web<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Hi\u1ec3n th\u1ecb h\u00ecnh \u1ea3nh \u0111\u1ed9ng<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng menu hamburger\u00a0<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">T\u1ea3i n\u1ed9i dung trong t\u00e0i li\u1ec7u m\u00e0 kh\u00f4ng c\u1ea7n t\u1ea3i l\u1ea1i trang web.<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-phat-tri\u1ec3n-\u1ee9ng-d\u1ee5ng-di-d\u1ed9ng\"><b>3. Ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng di \u0111\u1ed9ng<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng <a href=\"https:\/\/itviec.com\/blog\/framework-la-gi-top-framework-pho-bien-nhat\/\" target=\"_blank\" rel=\"noopener\">framework React Native<\/a>, b\u1ea1n c\u00f3 th\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c \u1ee9ng d\u1ee5ng di \u0111\u1ed9ng cho c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh kh\u00e1c nhau. B\u1ea1n kh\u00f4ng c\u1ea7n vi\u1ebft c\u00e1c m\u00e3 kh\u00e1c nhau cho h\u1ec7 \u0111i\u1ec1u h\u00e0nh iOS v\u00e0 Android m\u00e0 ch\u1ec9 c\u1ea7n vi\u1ebft n\u00f3 m\u1ed9t l\u1ea7n v\u00e0 ch\u1ea1y n\u00f3 tr\u00ean c\u00e1c n\u1ec1n t\u1ea3ng kh\u00e1c nhau.<\/span><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-phat-tri\u1ec3n-game\"><b>4. Ph\u00e1t tri\u1ec3n game<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript c\u00f3 nhi\u1ec1u th\u01b0 vi\u1ec7n v\u00e0 framework kh\u00e1c nhau \u0111\u1ec3 t\u1ea1o tr\u00f2 ch\u01a1i 2D ho\u1eb7c 3D. B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 d\u00f9ng game engine nh\u01b0 PhysicsJS, Pixi.js \u0111\u1ec3 t\u1ea1o game, d\u00f9ng th\u01b0 vi\u1ec7n \u0111\u1ed3 h\u1ecda WebGL, EaselJS \u0111\u1ec3 hi\u1ec3n th\u1ecb h\u00ecnh \u1ea3nh 2D v\u00e0 3D tr\u00ean tr\u00ecnh duy\u1ec7t.<\/span><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-t\u1ea1o-b\u1ea3n-trinh-bay\"><b>5. T\u1ea1o b\u1ea3n tr\u00ecnh b\u00e0y<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript gi\u00fap t\u1ea1o c\u00e1c trang tr\u00ecnh b\u00e0y t\u01b0\u01a1ng t\u00e1c v\u00e0 \u0111\u1eb9p m\u1eaft d\u01b0\u1edbi d\u1ea1ng trang web, v\u1edbi s\u1ef1 tr\u1ee3 gi\u00fap c\u1ee7a HTML v\u00e0 c\u00e1c th\u01b0 vi\u1ec7n nh\u01b0 RevealJs v\u00e0 BespokeJs.<\/span><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-xay-d\u1ef1ng-web-server-va-phat-tri\u1ec3n-\u1ee9ng-d\u1ee5ng-may-ch\u1ee7\"><b>6. X\u00e2y d\u1ef1ng web server v\u00e0 ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng m\u00e1y ch\u1ee7<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Developer c\u0169ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0y \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c server web \u0111\u01a1n gi\u1ea3n v\u00e0 ph\u00e1t tri\u1ec3n c\u01a1 s\u1edf h\u1ea1 t\u1ea7ng back-end b\u1eb1ng <a href=\"https:\/\/itviec.com\/blog\/hoc-nodejs\/\" target=\"_blank\" rel=\"noopener\">Node.js<\/a>.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-ngh\u1ec7-thu\u1eadt\"><b>7. Ngh\u1ec7 thu\u1eadt<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">M\u1ed9t t\u00ednh n\u0103ng g\u1ea7n \u0111\u00e2y c\u1ee7a HTML5 trong JavaScript l\u00e0 ph\u1ea7n t\u1eed canvas, cho ph\u00e9p d\u1ec5 d\u00e0ng v\u1ebd \u0111\u1ed3 h\u1ecda 2D v\u00e0 3D tr\u00ean trang web. \u0110i\u1ec1u n\u00e0y \u0111\u00e3 gi\u00fap m\u1edf ra c\u00e1nh c\u1eeda cho c\u00e1c d\u1ef1 \u00e1n ngh\u1ec7 thu\u1eadt k\u1ef9 thu\u1eadt s\u1ed1 tr\u00ean tr\u00ecnh duy\u1ec7t.&nbsp;<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-8-\u1ee9ng-d\u1ee5ng-d\u1ed3ng-h\u1ed3-thong-minh\"><b>8. \u1ee8ng d\u1ee5ng \u0111\u1ed3ng h\u1ed3 th\u00f4ng minh<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Pebble.js l\u00e0 m\u1ed9t framework cho ph\u00e9p developer t\u1ea1o \u1ee9ng d\u1ee5ng cho \u0111\u1ed3ng h\u1ed3 th\u00f4ng minh Pebble th\u00f4ng qua m\u00e3 JavaScript \u0111\u01a1n gi\u1ea3n.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-9-robot-bay\"><b>9. Robot bay<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u1edbi h\u1ec7 sinh th\u00e1i Node.js, gi\u1edd \u0111\u00e2y c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng JavaScript trong l\u1eadp tr\u00ecnh robot bay, m\u00e1y bay kh\u00f4ng hay thi\u1ebft b\u1ecb <a href=\"https:\/\/itviec.com\/blog\/iot-la-gi\/\" target=\"_blank\" rel=\"noopener\">IoT<\/a>.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cac-\u01b0u-di\u1ec3m-amp-h\u1ea1n-ch\u1ebf-dang-l\u01b0u-y-c\u1ee7a-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"Cac_uu_diem_han_che_dang_luu_y_cua_JavaScript_la_gi\"><\/span><b>C\u00e1c \u01b0u \u0111i\u1ec3m &amp; h\u1ea1n ch\u1ebf \u0111\u00e1ng l\u01b0u \u00fd c\u1ee7a JavaScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-\u01b0u-di\u1ec3m-n\u1ed5i-b\u1eadt-nh\u1ea5t-c\u1ee7a-javascript\"><b>7 \u01b0u \u0111i\u1ec3m n\u1ed5i b\u1eadt nh\u1ea5t c\u1ee7a JavaScript<\/b><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Kh\u00f4ng c\u1ea7n b\u1ea5t k\u1ef3 thi\u1ebft l\u1eadp m\u00f4i tr\u01b0\u1eddng n\u00e0o.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ch\u1ea1y tr\u00ean c\u1ea3 m\u00e1y kh\u00e1ch v\u00e0 m\u00e1y ch\u1ee7.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ch\u1ea1y tr\u00ean h\u1ea7u h\u1ebft c\u00e1c thi\u1ebft b\u1ecb.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Cho ph\u00e9p ph\u00e1t tri\u1ec3n c\u1ea3 front-end v\u00e0 back-end<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00f3 c\u00e1c phi\u00ean b\u1ea3n c\u1eadp nh\u1eadt th\u01b0\u1eddng xuy\u00ean.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00f3 m\u00e3 ngu\u1ed3n m\u1edf.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u00f3 nhi\u1ec1u framework &amp; th\u01b0 vi\u1ec7n.<\/span><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-h\u1ea1n-ch\u1ebf-n\u1ed5i-b\u1eadt-nh\u1ea5t-c\u1ee7a-javascript\"><b>3 h\u1ea1n ch\u1ebf n\u1ed5i b\u1eadt nh\u1ea5t c\u1ee7a JavaScript<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>R\u1ee7i ro b\u1ea3o m\u1eadt:\u00a0<\/b><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 t\u1ea3i d\u1eef li\u1ec7u b\u1eb1ng <a href=\"https:\/\/itviec.com\/blog\/ajax-la-gi\/\" target=\"_blank\" rel=\"noopener\">AJAX<\/a> ho\u1eb7c b\u1eb1ng c\u00e1ch thao t\u00e1c v\u1edbi c\u00e1c th\u1ebb t\u1ea3i d\u1eef li\u1ec7u nh\u01b0 &lt;img&gt;, &lt;object&gt;, &lt;script&gt;. C\u00e1c cu\u1ed9c t\u1ea5n c\u00f4ng n\u00e0y \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 t\u1ea5n c\u00f4ng t\u1eadp l\u1ec7nh ch\u00e9o trang.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Hi\u1ec7u su\u1ea5t:<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript c\u00f3 hi\u1ec7u su\u1ea5t h\u1ea1n ch\u1ebf h\u01a1n c\u00e1c ng\u00f4n ng\u1eef truy\u1ec1n th\u1ed1ng. M\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh ph\u1ee9c t\u1ea1p n\u1ebfu vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef n\u00e0y s\u1ebd ch\u1ea1y t\u01b0\u01a1ng \u0111\u1ed1i ch\u1eadm. D\u00f9 v\u1eady, n\u00f3 th\u01b0\u1eddng \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 \u0111\u01a1n gi\u1ea3n trong tr\u00ecnh duy\u1ec7t, do \u0111\u00f3 hi\u1ec7u su\u1ea5t kh\u00f4ng \u0111\u01b0\u1ee3c coi l\u00e0 m\u1ed9t h\u1ea1n ch\u1ebf qu\u00e1 l\u1edbn.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u0110\u1ed9 ph\u1ee9c t\u1ea1p:<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 c\u00f3 th\u1ec3 vi\u1ebft c\u00e1c t\u1eadp l\u1ec7nh n\u00e2ng cao b\u1eb1ng JavaScript, developer c\u1ea7n c\u00f3 ki\u1ebfn \u200b\u200bth\u1ee9c s\u00e2u v\u1ec1 t\u1ea5t c\u1ea3 c\u00e1c kh\u00e1i ni\u1ec7m l\u1eadp tr\u00ecnh, c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng ng\u00f4n ng\u1eef c\u1ed1t l\u00f5i, c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng ph\u00eda m\u00e1y kh\u00e1ch v\u00e0 m\u00e1y ch\u1ee7.<\/span><\/p>\n\n\n\n<p><b><i>Ph\u1ea7n d\u01b0\u1edbi \u0111\u00e2y s\u1ebd cung c\u1ea5p l\u1ed9 tr\u00ecnh ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 JavaScript \u0111\u1ec3 b\u1ea1n b\u1eaft \u0111\u1ea7u l\u00e0m quen ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0y.<\/i><\/b><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cac-ki\u1ec3u-d\u1eef-li\u1ec7u-trong-javascript-la-gi-nbsp\"><span class=\"ez-toc-section\" id=\"Cac_kieu_du_lieu_trong_Javascript_la_gi\"><\/span><b>C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u trong Javascript l\u00e0 g\u00ec?&nbsp;<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript c\u00f3 2 nh\u00f3m ki\u1ec3u d\u1eef li\u1ec7u l\u00e0:&nbsp;<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Ki\u1ec3u nguy\u00ean thu\u1ef7 (Primitive types): l\u00e0 ki\u1ec3u d\u1eef li\u1ec7u \u201clevel th\u1ea5p\u201d, gi\u00e1 tr\u1ecb kh\u00f4ng th\u1ec3 s\u1eeda \u0111\u1ed5i trong bi\u1ebfn.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Ki\u1ec3u Object: C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u kh\u00e1c kh\u00f4ng thu\u1ed9c ki\u1ec3u nguy\u00ean thu\u1ef7.<\/span><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"8334\" height=\"5938\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro.png\" alt=\"\" class=\"wp-image-39594\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro.png 8334w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-300x214.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-640x456.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-200x143.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-768x547.png 768w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-1536x1094.png 1536w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-2048x1459.png 2048w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-100x71.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-632x450.png 632w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-vippro-1600x1140.png 1600w\" sizes=\"auto, (max-width: 8334px) 100vw, 8334px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u trong Javascript. Ngu\u1ed3n tham kh\u1ea3o: StackOverflow<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-ki\u1ec3u-d\u1eef-li\u1ec7u-nguyen-th\u1ee7y\"><span style=\"font-weight: 400;\">\u200b\u200b<\/span><b>7 ki\u1ec3u d\u1eef li\u1ec7u nguy\u00ean th\u1ee7y:<\/b><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><b>Ki\u1ec3u d\u1eef li\u1ec7u<\/b><\/td><td><b>Gi\u1ea3i th\u00edch<\/b><\/td><td><b>V\u00ed d\u1ee5<\/b><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Number\/ S\u1ed1<\/span><\/td><td><span style=\"font-weight: 400;\">T\u1ea5t c\u1ea3 c\u00e1c gi\u00e1 tr\u1ecb s\u1ed1 nguy\u00ean v\u00e0 s\u1ed1 th\u1ef1c, ngo\u1ea1i tr\u1eeb c\u00e1c s\u1ed1 nguy\u00ean r\u1ea5t l\u1edbn.<\/span><\/td><td><span style=\"font-weight: 400;\">6, 7, 8,9<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">BigInt<\/span><\/td><td><span style=\"font-weight: 400;\">D\u00f9ng cho s\u1ed1 nguy\u00ean r\u1ea5t l\u1edbn, \u0111\u1ed9 d\u00e0i tu\u1ef3 \u00fd.<\/span><\/td><td>&nbsp;<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">String\/ Chu\u1ed7i<\/span><\/td><td><span style=\"font-weight: 400;\">&#8211; D\u00f9ng \u0111\u1ec3 l\u01b0u tr\u1eef d\u1eef li\u1ec7u d\u1ea1ng v\u0103n b\u1ea3n.<\/span>\n<p><span style=\"font-weight: 400;\">&#8211; L\u00e0 b\u1ea5t c\u1ee9 d\u1eef li\u1ec7u g\u00ec n\u1eb1m gi\u1eefa d\u1ea5u nh\u00e1y \u0111\u01a1n (&#8216;&#8230;&#8217;), ho\u1eb7c d\u1ea5u nh\u00e1y k\u00e9p (&#8220;&#8230;&#8221;), ho\u1eb7c d\u1ea5u g\u1ea1ch ng\u01b0\u1ee3c (`&#8230;`).<\/span><\/p>\n<\/td><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">&#8220;l\u1eadp tr\u00ecnh&#8221;<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">&#8216;c\u00e2u d\u00e0i&#8217;<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">`c\u00e2u ng\u1eafn`<\/span><\/p>\n<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Boolean<\/span><\/td><td><span style=\"font-weight: 400;\">&#8211; Ch\u1ec9 c\u00f3 hai gi\u00e1 tr\u1ecb: <\/span><b>true<\/b><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><b>false<\/b>\n<p><span style=\"font-weight: 400;\">&#8211; Th\u01b0\u1eddng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng cho logic c\u00f3 \u0111i\u1ec1u ki\u1ec7n.<\/span><\/p>\n<\/td><td>&nbsp;<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Symbol\/ Bi\u1ec3u t\u01b0\u1ee3ng<\/span><\/td><td><span style=\"font-weight: 400;\">\u0110\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 t\u1ea1o c\u00e1c gi\u00e1 tr\u1ecb duy nh\u1ea5t, kh\u00f4ng th\u1ec3 s\u1eeda \u0111\u1ed5i.<\/span><\/td><td>&nbsp;<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Undefined<\/span><\/td><td><span style=\"font-weight: 400;\">\u0110\u01b0\u1ee3c g\u00e1n cho bi\u1ebfn \u0111\u00e3 \u0111\u01b0\u1ee3c khai b\u00e1o nh\u01b0ng ch\u01b0a \u0111\u01b0\u1ee3c g\u00e1n gi\u00e1 tr\u1ecb, m\u1ed9t c\u00e1ch tr\u1ef1c ti\u1ebfp ho\u1eb7c ng\u1ea7m \u0111\u1ecbnh.<\/span><\/td><td><span style=\"font-weight: 400;\">Ch\u1ec9 c\u00f3 m\u1ed9t gi\u00e1 tr\u1ecb duy nh\u1ea5t l\u00e0 <\/span><b>undefined<\/b><span style=\"font-weight: 400;\">.<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Null<\/span><\/td><td><span style=\"font-weight: 400;\">\u0110\u01b0\u1ee3c g\u00e1n cho bi\u1ebfn kh\u00f4ng bi\u1ebft gi\u00e1 tr\u1ecb (r\u1ed7ng). Null gi\u1eef m\u1ed9t gi\u00e1 tr\u1ecb, nh\u01b0ng kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t gi\u00e1 tr\u1ecb th\u1ef1c.<\/span><\/td><td><span style=\"font-weight: 400;\">Ch\u1ec9 c\u00f3 m\u1ed9t gi\u00e1 tr\u1ecb duy nh\u1ea5t l\u00e0 null<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ki\u1ec3u-object\"><b>Ki\u1ec3u Object:<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Object (\u0111\u1ed1i t\u01b0\u1ee3ng) l\u00e0 ki\u1ec3u d\u1eef li\u1ec7u tham chi\u1ebfu, c\u00f3 t\u00ednh ph\u1ee9c h\u1ee3p, cho ph\u00e9p l\u01b0u c\u00e1c t\u1eadp h\u1ee3p d\u1eef li\u1ec7u d\u01b0\u1edbi d\u1ea1ng 1 c\u1eb7p <\/span><b>key:value, <\/b><span style=\"font-weight: 400;\">g\u1ecdi l\u00e0 thu\u1ed9c t\u00ednh.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Trong \u0111\u00f3:&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">&#8211; <\/span><b>key<\/b><span style=\"font-weight: 400;\"> l\u00e0 m\u1ed9t chu\u1ed7i (string) ho\u1eb7c symbol<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">&#8211; <\/span><b>value <\/b><span style=\"font-weight: 400;\">l\u00e0 gi\u00e1 tr\u1ecb thu\u1ed9c b\u1ea5t k\u1ef3 lo\u1ea1i d\u1eef li\u1ec7u n\u00e0o, k\u1ec3 c\u1ea3 m\u1ed9t object kh\u00e1c.<\/span><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><i><span style=\"font-weight: 400;\">V\u00ed d\u1ee5: {name: &#8216;lap trinh&#8217;, age: 5}<\/span><\/i><\/p>\n<\/blockquote>\n\n\n\n<p><span style=\"font-weight: 400;\">Kh\u00f4ng gi\u1ed1ng nh\u01b0 \u0111\u1ed1i t\u01b0\u1ee3ng trong c\u00e1c ng\u00f4n ng\u1eef nh\u1eadp t\u0129nh, c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng trong JavaScript kh\u00f4ng c\u1ed1 \u0111\u1ecbnh \u2014 c\u00e1c thu\u1ed9c t\u00ednh c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c th\u00eam, x\u00f3a, s\u1eafp x\u1ebfp l\u1ea1i, thay \u0111\u1ed5i ho\u1eb7c truy v\u1ea5n \u0111\u1ed9ng b\u1ea5t k\u1ef3 l\u00fac n\u00e0o.&nbsp;<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cac-ki\u1ec3u-object-ph\u1ed5-bi\u1ebfn\"><b>C\u00e1c ki\u1ec3u Object ph\u1ed5 bi\u1ebfn:<\/b><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">Array\/ M\u1ea3ng<\/span><\/p>\n<\/td><td><span style=\"font-weight: 400;\">Array l\u00e0 m\u1ed9t nh\u00f3m d\u1eef li\u1ec7u thu\u1ed9c b\u1ea5t k\u1ef3 ki\u1ec3u n\u00e0o, l\u01b0u tr\u1eef trong m\u1ed9t bi\u1ebfn duy nh\u1ea5t, \u0111\u01b0\u1ee3c ph\u00e2n t\u00e1ch b\u1eb1ng d\u1ea5u ph\u1ea9y.&nbsp;<\/span><\/td><td><span style=\"font-weight: 400;\"> [1, 2, &#8220;hello&#8221;, false]<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Function\/ H\u00e0m<\/span><\/td><td><span style=\"font-weight: 400;\">H\u00e0m l\u00e0 m\u1ed9t ki\u1ec3u d\u1eef li\u1ec7u g\u1ecdi m\u1ed9t code block khi \u0111\u01b0\u1ee3c g\u1ecdi.<\/span>\n<p><span style=\"font-weight: 400;\">Ph\u1ea7n th\u00e2n c\u1ee7a h\u00e0m c\u00f3 th\u1ec3 ch\u1ee9a bao nhi\u00eau c\u00e2u l\u1ec7nh t\u00f9y th\u00edch v\u00e0 c\u00f3 th\u1ec3 khai b\u00e1o c\u00e1c bi\u1ebfn ri\u00eang c\u1ee7a n\u00f3 l\u00e0 c\u1ee5c b\u1ed9 c\u1ee7a h\u00e0m \u0111\u00f3.<\/span><\/p>\n<\/td><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">function(){ console.log(&#8220;function&#8221;) }<\/span><\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>T\u00ecm hi\u1ec3u ngay: <strong><a href=\"https:\/\/itviec.com\/it-jobs\/javascript?utm_medium=anchor_text_mid&amp;utm_source=blog&amp;utm_campaign=viec_lam_javascript&amp;utm_content=javascript_la_gi\" target=\"_blank\" rel=\"noreferrer noopener\">Vi\u1ec7c l\u00e0m JavaScript<\/a><\/strong> h\u1ea5p d\u1eabn tr\u00ean ITviec<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-quy-t\u1eafc-cu-phap-trong-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"Quy_tac_cu_phap_trong_JavaScript_la_gi\"><\/span><b>Quy t\u1eafc c\u00fa ph\u00e1p trong JavaScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p l\u00e0 t\u1eadp h\u1ee3p c\u00e1c quy t\u1eafc, c\u00e1ch ch\u01b0\u01a1ng tr\u00ecnh JavaScript \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng. <\/span><span style=\"font-weight: 400;\">C\u00fa ph\u00e1p JavaScript x\u00e1c \u0111\u1ecbnh hai lo\u1ea1i gi\u00e1 tr\u1ecb:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb h\u1eb1ng (Literals)<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Gi\u00e1 tr\u1ecb bi\u1ebfn (Variables)<\/span><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cac-quy-t\u1eafc-cu-phap-trong-javascript\"><b>C\u00e1c quy t\u1eafc c\u00fa ph\u00e1p trong JavaScript<\/b><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong> C\u00e1c s\u1ed1 \u0111\u01b0\u1ee3c vi\u1ebft c\u00f3 ho\u1eb7c kh\u00f4ng c\u00f3 ph\u1ea7n th\u1eadp ph\u00e2n:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">10.50<\/span>\n\n<span style=\"font-weight: 400;\">1001<\/span><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong> D\u1ea5u b\u1eb1ng \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 g\u00e1n gi\u00e1 tr\u1ecb cho bi\u1ebfn.<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let x;<\/span>\n\n<span style=\"font-weight: 400;\">x = 6;<\/span><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong> JavaScript s\u1eed d\u1ee5ng to\u00e1n t\u1eed s\u1ed1 h\u1ecdc ( + &#8211; * \/ ) \u0111\u1ec3 t\u00ednh gi\u00e1 tr\u1ecb:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">(5 + 6) * 10<\/span><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong> C\u00e1c t\u1eeb kh\u00f3a \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh c\u00e1c h\u00e0nh \u0111\u1ed9ng s\u1ebd \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n.<\/strong><\/li>\n<\/ol>\n\n\n\n<p><i><span style=\"font-weight: 400;\">VD: T\u1eeb kh\u00f3a let y\u00eau c\u1ea7u tr\u00ecnh duy\u1ec7t t\u1ea1o c\u00e1c bi\u1ebfn:<\/span><\/i><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let x, y;<\/span>\n\n<span style=\"font-weight: 400;\">x = 5 + 6;<\/span>\n\n<span style=\"font-weight: 400;\">y = x * 10;<\/span><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li><strong> JavaScript ph\u00e2n bi\u1ec7t ch\u1eef hoa ch\u1eef th\u01b0\u1eddng:<\/strong><\/li>\n<\/ol>\n\n\n\n<p><i><span style=\"font-weight: 400;\">VD:&nbsp;<\/span><\/i><\/p>\n\n\n\n<p><i><span style=\"font-weight: 400;\">C\u00e1c bi\u1ebfn lastName v\u00e0 lastname l\u00e0 hai bi\u1ebfn kh\u00e1c nhau<\/span><\/i><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let lastname, lastName;<\/span>\n\n<span style=\"font-weight: 400;\">lastName = \"Doe\";<\/span>\n\n<span style=\"font-weight: 400;\">lastname = \"Peterson\";<\/span><\/pre>\n\n\n\n<p><i><span style=\"font-weight: 400;\">Ho\u1eb7c c\u00f3 th\u1ec3 hi\u1ec3u, JavaScript kh\u00f4ng di\u1ec5n gi\u1ea3i LET ho\u1eb7c Let l\u00e0 t\u1eeb kh\u00f3a let.<\/span><\/i><\/p>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\"><strong> D\u1ea5u g\u1ea1ch n\u1ed1i kh\u00f4ng \u0111\u01b0\u1ee3c ph\u00e9p trong JavaScript<\/strong>. Ch\u00fang \u0111\u01b0\u1ee3c d\u00e0nh ri\u00eang cho c\u00e1c ph\u00e9p tr\u1eeb.<\/span><\/li>\n<\/ol>\n\n\n\n<p><span style=\"font-weight: 400;\">Do \u0111\u00f3, JavaScript developer c\u00f3 xu h\u01b0\u1edbng s\u1eed d\u1ee5ng Camel Case (Ch\u1eef c\u00e1i \u0111\u1ea7u ti\u00ean l\u00e0 ch\u1eef th\u01b0\u1eddng, ch\u1eef c\u00e1i \u0111\u1ea7u ti\u00ean c\u1ee7a m\u1ed7i t\u1eeb sau \u0111\u00f3 l\u00e0 ch\u1eef hoa) \u0111\u1ec3 n\u1ed1i nhi\u1ec1u t\u1eeb th\u00e0nh m\u1ed9t t\u00ean bi\u1ebfn:<\/span><\/p>\n\n\n\n<p><i><span style=\"font-weight: 400;\">VD:&nbsp;<\/span><\/i><\/p>\n\n\n\n<p><i><span style=\"font-weight: 400;\">FirstName, LastName, masterCard, interCity.<\/span><\/i><\/p>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\"><strong> C\u00e1c t\u00ean \u0111\u1ecbnh danh c\u00f3 th\u1ec3 ch\u1ee9a c\u00e1c k\u00fd t\u1ef1 Unicode<\/strong>, nh\u01b0ng ch\u00fang kh\u00f4ng th\u1ec3 l\u00e0 m\u1ed9t trong nh\u1eefng <\/span><a href=\"https:\/\/www.w3schools.com\/js\/js_reserved.asp\"><span style=\"font-weight: 400;\">t\u1eeb \u0111\u1eb7t s\u1eb5n<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\"><strong> \u0110\u1ec3 comment th\u01b0\u1eddng d\u00f9ng d\u1ea5u \/\/ ho\u1eb7c \/* *\/<\/strong> (kh\u00e1c v\u1edbi c\u00e1c ng\u00f4n ng\u1eef k\u1ecbch b\u1ea3n l\u1ec7nh nh\u01b0 Perl, Python v\u00e0 Bash d\u00f9ng #).<\/span><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Comment m\u1ed9t d\u00f2ng:<\/span><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">\/\/ c\u00e2u ch\u00fa th\u00edch m\u1ed9t d\u00f2ng<\/span><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Comment nhi\u1ec1u d\u00f2ng:<\/span><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">\/*<\/span>\n\n<span style=\"font-weight: 400;\">c\u00e2u ch\u00fa th\u00edch<\/span>\n\n<span style=\"font-weight: 400;\">nhi\u1ec1u d\u00f2ng<\/span>\n\n<span style=\"font-weight: 400;\">*\/<\/span><\/pre>\n\n\n\n<ol start=\"9\" class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\"><strong> D\u1ea5u ch\u1ea5m ph\u1ea9y l\u00e0 t\u00f9y ch\u1ecdn <\/strong>\u2014 ng\u00f4n ng\u1eef s\u1ebd t\u1ef1 \u0111\u1ed9ng ch\u00e8n ch\u00fang khi c\u1ea7n. Tuy nhi\u00ean, kh\u00f4ng gi\u1ed1ng nh\u01b0 Python, d\u1ea5u ch\u1ea5m ph\u1ea9y v\u1eabn l\u00e0 m\u1ed9t ph\u1ea7n c\u1ee7a c\u00fa ph\u00e1p.<\/span><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-bi\u1ebfn-trong-javascript-la-gi-cach-khai-bao-va-gan-gia-tr\u1ecb-cho-bi\u1ebfn\"><span class=\"ez-toc-section\" id=\"Bien_trong_JavaScript_la_gi_Cach_khai_bao_va_gan_gia_tri_cho_bien\"><\/span><b>Bi\u1ebfn trong JavaScript l\u00e0 g\u00ec? C\u00e1ch khai b\u00e1o v\u00e0 g\u00e1n gi\u00e1 tr\u1ecb cho bi\u1ebfn<\/b><b><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-bi\u1ebfn-trong-javascript-la-gi\"><b>Bi\u1ebfn trong JavaScript l\u00e0 g\u00ec?<\/b><b><\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Bi\u1ebfn l\u00e0 n\u01a1i ch\u1ee9a c\u00e1c gi\u00e1 tr\u1ecb c\u1ee7a b\u1ea5t k\u1ef3 ki\u1ec3u d\u1eef li\u1ec7u n\u00e0o. Khi bi\u1ebfn \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng, JavaScript s\u1ebd d\u00f9ng gi\u00e1 tr\u1ecb m\u00e0 bi\u1ebfn \u0111\u1ea1i di\u1ec7n.<\/span><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cac-thao-tac-co-th\u1ec3-lam-v\u1edbi-bi\u1ebfn\"><b>C\u00e1c thao t\u00e1c c\u00f3 th\u1ec3 l\u00e0m v\u1edbi bi\u1ebfn<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Khai b\u00e1o bi\u1ebfn<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let name;<\/span><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">G\u00e1n m\u1ed9t gi\u00e1 tr\u1ecb cho bi\u1ebfn\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let name;<\/span>\n\n<span style=\"font-weight: 400;\">name = \"JavaScript\";<\/span><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Khai b\u00e1o v\u00e0 g\u00e1n gi\u00e1 tr\u1ecb cho bi\u1ebfn tr\u00ean m\u1ed9t d\u00f2ng:<\/span><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><span style=\"font-weight: 400;\">let name = &#8220;JavaScript&#8221;;<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"8334\" height=\"1684\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro.png\" alt=\"\" class=\"wp-image-39592\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro.png 8334w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-300x61.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-640x129.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-200x40.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-768x155.png 768w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-1536x310.png 1536w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-2048x414.png 2048w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-100x20.png 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-700x141.png 700w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-2-vippro-1600x323.png 1600w\" sizes=\"auto, (max-width: 8334px) 100vw, 8334px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><br><em>C\u00fa ph\u00e1p k<span style=\"font-weight: 400;\">hai b\u00e1o v\u00e0 g\u00e1n gi\u00e1 tr\u1ecb cho bi\u1ebfn tr\u00ean m\u1ed9t d\u00f2ng. Ngu\u1ed3n: DEV Community<\/span><\/em><b><\/b><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-ph\u01b0\u01a1ng-phap-khai-bao-bi\u1ebfn-trong-javascript\"><b>3 ph\u01b0\u01a1ng ph\u00e1p khai b\u00e1o bi\u1ebfn trong JavaScript<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript cho ph\u00e9p khai b\u00e1o bi\u1ebfn b\u1eb1ng m\u1ed9t trong ba t\u1eeb kh\u00f3a: <\/span><b>let<\/b><span style=\"font-weight: 400;\">, <\/span><b>const<\/b><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><b>var<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>let<\/b><span style=\"font-weight: 400;\">: cho ph\u00e9p b\u1ea1n khai b\u00e1o v\u00e0 g\u00e1n gi\u00e1 tr\u1ecb c\u00e1c bi\u1ebfn c\u1ea5p \u0111\u1ed9 kh\u1ed1i. Gi\u00e1 tr\u1ecb c\u1ee7a bi\u1ebfn c\u00f3 th\u1ec3 thay \u0111\u1ed5i sau trong code.<\/span><\/li>\n\n\n\n<li><b>var: <\/b><span style=\"font-weight: 400;\">gi\u1ed1ng nh\u01b0 let. Nh\u01b0ng var c\u00f3 th\u1ec3 hoist (chuy\u1ec3n l\u00ean \u0111\u1ea7m h\u00e0m) c\u00e1c bi\u1ebfn \u0111\u01b0\u1ee3c khai b\u00e1o, c\u00f2n let th\u00ec kh\u00f4ng.\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">var name = \"JavaScript\";<\/span>\n\n<span style=\"font-weight: 400;\">name = \"Ng\u00f4n ng\u1eef\";<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Tuy nhi\u00ean, hoisting c\u00f3 th\u1ec3 g\u00e2y ra l\u1ed7i. Do \u0111\u00f3 khai b\u00e1o var kh\u00f4ng \u0111\u01b0\u1ee3c khuy\u1ebfn kh\u00edch trong m\u00e3 JavaScript hi\u1ec7n \u0111\u1ea1i.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>const:<\/b><span style=\"font-weight: 400;\"> cho ph\u00e9p b\u1ea1n khai b\u00e1o c\u00e1c bi\u1ebfn c\u00f3 gi\u00e1 tr\u1ecb kh\u00f4ng bao gi\u1edd thay \u0111\u1ed5i.\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let name = \"JavaScript\"<\/span>\n\n<span style=\"font-weight: 400;\">name = \"Language\" \/\/ no errors<\/span>\n\n<span style=\"font-weight: 400;\">const age = 5<\/span>\n\n<span style=\"font-weight: 400;\">age = 6 \/\/ error, cannot reassign variable<\/span><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"https:\/\/itviec.com\/blog\/khai-bao-bien-trong-javascript\/\" target=\"_blank\" rel=\"noreferrer noopener\">Chi ti\u1ebft c\u00e1c c\u00e1ch khai b\u00e1o bi\u1ebfn trong JavaScript<\/a><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-toan-t\u1eed-trong-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"Toan_tu_trong_JavaScript_la_gi\"><\/span><b>To\u00e1n t\u1eed trong JavaScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e1c to\u00e1n t\u1eed v\u00e0 ch\u1ee9c n\u0103ng c\u1ee7a ch\u00fang bao g\u1ed3m:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">+,-, *, **, \/, %, ++, \u2014&nbsp;<\/span><\/p>\n<\/td><td><span style=\"font-weight: 400;\">To\u00e1n t\u1eed s\u1ed1 h\u1ecdc<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">=<\/span><\/td><td><span style=\"font-weight: 400;\">To\u00e1n t\u1eed g\u00e1n, d\u00f9ng \u0111\u1ec3 g\u00e1n gi\u00e1 tr\u1ecb<\/span><\/td><\/tr><tr><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">+=<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">&nbsp;-=<\/span><\/p>\n<\/td><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u1ed1i t\u00e1c g\u00e1n ph\u1ee9c h\u1ee3p c\u1ee7a to\u00e1n t\u1eed nh\u1ecb ph\u00e2n.<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">VD:&nbsp;<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">x += 5;<\/span><\/p>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">(x = x + 5;)<\/span><\/p>\n<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">+<\/span><\/td><td><span style=\"font-weight: 400;\">Th\u1ef1c hi\u1ec7n n\u1ed1i chu\u1ed7i<\/span>\n<p><span style=\"font-weight: 400;\">VD:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8220;hello&#8221; + &#8221; world&#8221;; \/\/ &#8220;hello world\u201d<\/span><\/p>\n<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">==, ===, !=, !==, &gt;, &lt;,<\/span><\/td><td><span style=\"font-weight: 400;\">To\u00e1n t\u1eed so s\u00e1nh, d\u00f9ng cho c\u1ea3 chu\u1ed7i v\u00e0 s\u1ed1<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">&amp;&amp;, II, !<\/span><\/td><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">To\u00e1n t\u1eed logic<\/span><\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ham-trong-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"Ham_trong_JavaScript_la_gi\"><\/span><b>H\u00e0m trong JavaScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">H\u00e0m l\u00e0 n\u01a1i b\u1ea1n c\u00f3 th\u1ec3 l\u01b0u tr\u1eef m\u1ed9t \u0111o\u1ea1n code \u0111\u1ec3 s\u1eed d\u1ee5ng \u1edf nh\u1eefng n\u01a1i kh\u00e1c trong code c\u1ee7a m\u00ecnh.&nbsp;<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>V\u00ed d\u1ee5 1 v\u1ec1 h\u00e0m:<\/strong><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">Gi\u1ea3 s\u1eed b\u1ea1n mu\u1ed1n in &#8220;JavaScript&#8221; v\u00e0 &#8220;Ng\u00f4n ng\u1eef&#8221; \u1edf c\u00e1c v\u1ecb tr\u00ed kh\u00e1c nhau trong code. Thay v\u00ec l\u00e0m \u0111i\u1ec1u n\u00e0y:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">console.log(\"JavaScript\")<\/span>\n\n<span style=\"font-weight: 400;\">console.log(\"Ng\u00f4n ng\u1eef\")\n<\/span>\n<span style=\"font-weight: 400;\">\/\/ m\u1ed9t \u0111o\u1ea1n code n\u00e0o \u0111\u00f3<\/span>\n\n<span style=\"font-weight: 400;\">console.log(\"JavaScript\")<\/span>\n\n<span style=\"font-weight: 400;\">console.log(\"Ng\u00f4n ng\u1eef\")<\/span>\n\n\n<span style=\"font-weight: 400;\">\/\/ m\u1ed9t \u0111o\u1ea1n code kh\u00e1c<\/span>\n\n<span style=\"font-weight: 400;\">console.log(\"JavaScript\")<\/span>\n\n<span style=\"font-weight: 400;\">console.log(\"Ng\u00f4n ng\u1eef\")<\/span>\n\n<\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng h\u00e0m<\/span><b> print()<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">function print() {<\/span>\n\n<span style=\"font-weight: 400;\">&nbsp;&nbsp;&nbsp;&nbsp;console.log(\"JavaScript\")<\/span>\n\n<span style=\"font-weight: 400;\">&nbsp;&nbsp;&nbsp;&nbsp;console.log(\"Ng\u00f4n ng\u1eef\")<\/span>\n\n<span style=\"font-weight: 400;\">}<\/span>\n\n<span style=\"font-weight: 400;\">print()<\/span>\n\n<span style=\"font-weight: 400;\">\/\/ th\u00eam \u0111o\u1ea1n code kh\u00e1c<\/span>\n\n<span style=\"font-weight: 400;\">print()<\/span>\n\n<span style=\"font-weight: 400;\">\/\/ th\u00eam \u0111o\u1ea1n code kh\u00e1c<\/span>\n\n<span style=\"font-weight: 400;\">print()\n\n<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">B\u1eb1ng c\u00e1ch n\u00e0y, b\u1ea1n c\u00f3 th\u1ec3 l\u01b0u tr\u1eef \u0111o\u1ea1n code c\u1ea7n l\u1eb7p l\u1ea1i trong m\u1ed9t h\u00e0m \u0111\u1ec3 s\u1eed d\u1ee5ng n\u00f3 \u1edf b\u1ea5t c\u1ee9 n\u01a1i n\u00e0o kh\u00e1c trong code.&nbsp;<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>V\u00ed d\u1ee5 2:<\/strong><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">N\u1ebfu mu\u1ed1n t\u00ecm trung b\u00ecnh c\u1ed9ng c\u1ee7a ba s\u1ed1, thay v\u00ec vi\u1ebft nh\u01b0 n\u00e0y:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">let num1 = 5<\/span>\n\n<span style=\"font-weight: 400;\">let num2 = 6<\/span>\n\n<span style=\"font-weight: 400;\">let num3 = 8<\/span>\n\n<span style=\"font-weight: 400;\">let average = (num1 + num2 + num3) \/ 3\n\n<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">S\u1ebd d\u1ec5 d\u00e0ng h\u01a1n n\u1ebfu d\u00f9ng h\u00e0m findAverage ():<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span style=\"font-weight: 400;\">function findAverage(n1, n2, n3) {<\/span>\n\n<span style=\"font-weight: 400;\">&nbsp;&nbsp;&nbsp;&nbsp;let aver = (n1 + n2 + n3) \/ 3<\/span>\n\n<span style=\"font-weight: 400;\">&nbsp;&nbsp;&nbsp;&nbsp;return aver<\/span>\n\n<span style=\"font-weight: 400;\">}<\/span>\n\n<span style=\"font-weight: 400;\">let num1 = 5<\/span>\n\n<span style=\"font-weight: 400;\">let num2 = 6<\/span>\n\n<span style=\"font-weight: 400;\">let num3 = 8<\/span>\n\n<span style=\"font-weight: 400;\">let average = findAverage(num1, num2, num3)<\/span>\n\n\n<span style=\"font-weight: 400;\">\/\/ sau c\u00e1c \u0111o\u1ea1n code kh\u00e1c<\/span>\n\n<span style=\"font-weight: 400;\">let average2 = findAverage(...)<\/span>\n\n\n<span style=\"font-weight: 400;\">\/\/ sau c\u00e1c \u0111o\u1ea1n code kh\u00e1c<\/span>\n\n<span style=\"font-weight: 400;\">let average3 = findAverage(...)\n\n<\/span><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">Trong khai b\u00e1o c\u1ee7a findAverage, n1, n2, n3 trong ngo\u1eb7c \u0111\u01a1n l\u00e0 c\u00e1c tham s\u1ed1 \u0111\u00f3ng vai tr\u00f2 \u201cgi\u1eef ch\u1ed7\u201d (placeholder) cho c\u00e1c gi\u00e1 tr\u1ecb s\u1ebd \u0111\u01b0\u1ee3c cung c\u1ea5p khi h\u00e0m \u0111\u01b0\u1ee3c g\u1ecdi. \u0110o\u1ea1n code s\u1eed d\u1ee5ng c\u00e1c placeholder \u0111\u00f3 \u0111\u1ec3 t\u00ecm gi\u00e1 tr\u1ecb trung b\u00ecnh v\u00e0 t\u1eeb kh\u00f3a return tr\u1ea3 v\u1ec1 gi\u00e1 tr\u1ecb trung b\u00ecnh t\u1eeb h\u00e0m.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Placeholder gi\u00fap c\u00e1c h\u00e0m c\u1ee7a b\u1ea1n c\u00f3 th\u1ec3 t\u00e1i s\u1eed d\u1ee5ng, sao cho c\u00e1c gi\u00e1 tr\u1ecb kh\u00e1c nhau t\u1ea1i c\u00e1c th\u1eddi \u0111i\u1ec3m kh\u00e1c nhau c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c truy\u1ec1n v\u00e0o c\u00e1c h\u00e0m \u0111\u1ec3 s\u1eed d\u1ee5ng c\u00f9ng m\u1ed9t logic.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-th\u01b0-vi\u1ec7n-javascript-c\u01a1-b\u1ea3n\"><span class=\"ez-toc-section\" id=\"Thu_vien_JavaScript_co_ban\"><\/span><b>Th\u01b0 vi\u1ec7n JavaScript c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Th\u01b0 vi\u1ec7n JavaScript l\u00e0 t\u1eadp h\u1ee3p c\u00e1c \u0111o\u1ea1n code vi\u1ebft s\u1eb5n m\u00e0 developer c\u00f3 th\u1ec3 d\u00f9ng l\u1ea1i \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c h\u00e0m JavaScript ti\u00eau chu\u1ea9n.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e1c nh\u00f3m th\u01b0 vi\u1ec7n JavaScript c\u01a1 b\u1ea3n:<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-th\u01b0-vi\u1ec7n-d\u1ec3-tr\u1ef1c-quan-hoa-d\u1eef-li\u1ec7u\"><b>Th\u01b0 vi\u1ec7n \u0111\u1ec3 Tr\u1ef1c quan h\u00f3a d\u1eef li\u1ec7u<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 ph\u1ed5 bi\u1ebfn: Chart.js, ApexCharts, Algolia Places\u00a0<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">D\u00f9ng \u0111\u1ec3: T\u1ea1o web hi\u1ec3n th\u1ecb d\u1eef li\u1ec7u trong bi\u1ec3u \u0111\u1ed3, b\u1ea3n \u0111\u1ed3.\u00a0<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-th\u01b0-vi\u1ec7n-thao-tac-dom\"><b>Th\u01b0 vi\u1ec7n thao t\u00e1c DOM<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 ph\u1ed5 bi\u1ebfn: jQuery, Umbrella JS\u00a0<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">D\u00f9ng \u0111\u1ec3: T\u1ea1o c\u00e1c ch\u1ee9c n\u0103ng web nh\u01b0 n\u00fat, menu \u0111\u1ed9ng, th\u01b0 vi\u1ec7n \u1ea3nh, h\u1ed9p \u0111\u00e8n, v.v.<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-th\u01b0-vi\u1ec7n-bi\u1ec3u-m\u1eabu\"><b>Th\u01b0 vi\u1ec7n bi\u1ec3u m\u1eabu<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 ph\u1ed5 bi\u1ebfn: wForms, LiveValidation, Validanguage, qForms<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">D\u00f9ng \u0111\u1ec3: T\u1ea1o c\u00e1c ch\u1ee9c n\u0103ng bi\u1ec3u m\u1eabu nh\u01b0 x\u00e1c th\u1ef1c bi\u1ec3u m\u1eabu, b\u1ed1 c\u1ee5c, \u0111i\u1ec1u ki\u1ec7n v\u00e0 chuy\u1ec3n \u0111\u1ed5i.<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-th\u01b0-vi\u1ec7n-ham-toan-h\u1ecdc-va-van-b\u1ea3n\"><b>Th\u01b0 vi\u1ec7n H\u00e0m to\u00e1n h\u1ecdc v\u00e0 v\u0103n b\u1ea3n<\/b><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 ph\u1ed5 bi\u1ebfn: Date.js, Sylvester, URL JavaScript<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">D\u00f9ng \u0111\u1ec3: x\u1eed l\u00fd m\u1ed9t s\u1ed1 y\u00eau c\u1ea7u to\u00e1n h\u1ecdc, ng\u00e0y, gi\u1edd v\u00e0 v\u0103n b\u1ea3n \u1edf ph\u00eda m\u00e1y kh\u00e1ch, thay v\u00ec g\u1eedi t\u1ea5t c\u1ea3 y\u00eau c\u1ea7u \u0111\u1ebfn m\u00e1y ch\u1ee7.<\/span><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-12-framework-javascript-ph\u1ed5-bi\u1ebfn-nh\u1ea5t-2023\"><span class=\"ez-toc-section\" id=\"12_framework_Javascript_pho_bien_nhat_2023\"><\/span><b>12 framework Javascript ph\u1ed5 bi\u1ebfn nh\u1ea5t 2023<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/itviec.com\/blog\/framework-la-gi-top-framework-pho-bien-nhat\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Framework<\/span><\/a><span style=\"font-weight: 400;\"> JavaScript c\u0169ng l\u00e0 m\u1ed9t t\u1eadp h\u1ee3p c\u00e1c \u0111o\u1ea1n code vi\u1ebft s\u1eb5n, c\u00f3 th\u1ec3 t\u00e1i s\u1eed d\u1ee5ng. Tuy nhi\u00ean, n\u1ebfu th\u01b0 vi\u1ec7n \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c y\u00eau c\u1ea7u nh\u1ea5t \u0111\u1ecbnh, th\u00ec framework l\u00e0 m\u1ed9t b\u1ed9 khung ho\u00e0n ch\u1ec9nh \u0111\u1ec3 x\u00e2y d\u1ef1ng b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng web n\u00e0o.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">D\u01b0\u1edbi \u0111\u00e2y l\u00e0 nh\u1eefng framework JavaScript ph\u1ed5 bi\u1ebfn nh\u1ea5t 2023:<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-front-end-javascript-framework-ph\u1ed5-bi\u1ebfn-nh\u1ea5t-2023\"><b>4 <\/b><b>front-end<\/b><b> JavaScript framework ph\u1ed5 bi\u1ebfn nh\u1ea5t 2023<\/b><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/itviec.com\/blog\/cau-hoi-phong-van-reactjs-la-gi\/\" target=\"_blank\" rel=\"noopener\">React.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itviec.com\/blog\/angular-la-gi?utm_source=blog_26052023&amp;utm_medium=anchor_text&amp;utm_campaign=daily\">Angular<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vuejs.org\/\" target=\"_blank\" rel=\"noopener\">Vue.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/nextjs.org\/\" target=\"_blank\" rel=\"noopener\">Next.js<\/a><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-back-end-javascript-framework-ph\u1ed5-bi\u1ebfn-nh\u1ea5t-2023\"><b>4 back-end JavaScript framework ph\u1ed5 bi\u1ebfn nh\u1ea5t 2023<\/b><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/itviec.com\/blog\/hoc-nodejs\/\" target=\"_blank\" rel=\"noopener\">Node.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expressjs.com\/\" target=\"_blank\" rel=\"noopener\">Express.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/backbonejs.org\/\" target=\"_blank\" rel=\"noopener\">Backbone.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.meteor.com\/\" target=\"_blank\" rel=\"noopener\">Meteor.js<\/a><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-framework-javascript-ph\u1ed5-bi\u1ebfn-cho-mobile-development\"><b>4 framework JavaScript ph\u1ed5 bi\u1ebfn cho Mobile development<\/b><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.electronjs.org\/\" target=\"_blank\" rel=\"noopener\">Electron.js<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itviec.com\/blog\/react-native-la-gi\/\" target=\"_blank\" rel=\"noopener\">React Native<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cordova.apache.org\/\" target=\"_blank\" rel=\"noopener\">Cordova<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expo.dev\/\" target=\"_blank\" rel=\"noopener\">Expo<\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cac-cau-h\u1ecfi-th\u01b0\u1eddng-g\u1eb7p-v\u1ec1-javascript-la-gi\"><span class=\"ez-toc-section\" id=\"Cac_cau_hoi_thuong_gap_ve_JavaScript_la_gi\"><\/span><b>C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 JavaScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-javascript-co-ph\u1ea3i-la-java-khong\"><b>JavaScript c\u00f3 ph\u1ea3i l\u00e0 Java kh\u00f4ng?<\/b><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"https:\/\/www.crockford.com\/about.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Douglas Crockford <\/span><\/a><span style=\"font-weight: 400;\">tr\u1ea3 l\u1eddi v\u1ec1 hi\u1ec3u l\u1ea7m ph\u1ed5 bi\u1ebfn n\u00e0y: \u201cJavaScript c\u00f3 s\u1ef1 t\u01b0\u01a1ng \u0111\u1ed3ng v\u1ec1 c\u00fa ph\u00e1p v\u1edbi Java, gi\u1ed1ng nh\u01b0 Java \u0111\u1ed1i v\u1edbi C. Nh\u01b0ng n\u00f3 kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t t\u1eadp h\u1ee3p con c\u1ee7a Java.\u201d<\/span><\/p>\n<\/blockquote>\n\n\n\n<p><span style=\"font-weight: 400;\">JavaScript c\u0169ng tu\u00e2n theo h\u1ea7u h\u1ebft c\u00fa ph\u00e1p bi\u1ec3u th\u1ee9c Java, quy \u01b0\u1edbc \u0111\u1eb7t t\u00ean v\u00e0 c\u1ea5u tr\u00fac lu\u1ed3ng \u0111i\u1ec1u khi\u1ec3n c\u01a1 b\u1ea3n, \u0111\u00f3 l\u00e0 l\u00fd do t\u1ea1i sao n\u00f3 \u0111\u01b0\u1ee3c \u0111\u1ed5i t\u00ean t\u1eeb LiveScript th\u00e0nh JavaScript.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Nh\u00ecn chung, l\u1eadp tr\u00ecnh Java ph\u1ee9c t\u1ea1p h\u01a1n l\u1eadp tr\u00ecnh JavaScript. So s\u00e1nh JavaScript v\u00e0 Java:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><b>Java<\/b><\/td><td><b>JavaScript<\/b><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng (object-oriented language)&nbsp;<\/span><\/td><td>\n<p style=\"text-align: left;\"><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef k\u1ecbch b\u1ea3n (scripting language)<\/span><\/p>\n<\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Ch\u1ee7 y\u1ebfu \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ph\u00e1t tri\u1ec3n c\u00e1c \u1ee9ng d\u1ee5ng doanh nghi\u1ec7p ph\u1ee9c t\u1ea1p<\/span><\/td><td><span style=\"font-weight: 400;\">Ch\u1ee7 y\u1ebfu \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 t\u1ea1o c\u00e1c trang web \u0111\u1ed9ng v\u00e0 t\u01b0\u01a1ng t\u00e1c<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">D\u00f9ng ch\u1ee7 y\u1ebfu cho back-end<\/span><\/td><td><span style=\"font-weight: 400;\">D\u00f9ng ch\u1ee7 y\u1ebfu cho front-end<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">Ch\u1ee7 y\u1ebfu l\u00e0 ng\u00f4n ng\u1eef bi\u00ean d\u1ecbch<\/span><\/td><td><span style=\"font-weight: 400;\">Ch\u1ee7 y\u1ebfu l\u00e0 ng\u00f4n ng\u1eef th\u00f4ng d\u1ecbch<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef strong-typying: C\u00e1c bi\u1ebfn ph\u1ea3i \u0111\u01b0\u1ee3c khai b\u00e1o tr\u01b0\u1edbc<\/span><\/td><td><span style=\"font-weight: 400;\">L\u00e0 ng\u00f4n ng\u1eef loose-typing: C\u00e1c c\u00fa ph\u00e1p v\u00e0 quy t\u1eafc tho\u1ea3i m\u00e1i h\u01a1n.<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">C\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ee7a Java d\u1ef1a tr\u00ean l\u1edbp (class)<\/span><\/td><td><span style=\"font-weight: 400;\">C\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng c\u1ee7a Java d\u1ef1a tr\u00ean m\u1eabu (prototype)<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\">C\u00f3 th\u1ec3 ch\u1ea1y trong b\u1ea5t k\u1ef3 m\u00e1y \u1ea3o (JVM) ho\u1eb7c tr\u00ecnh duy\u1ec7t n\u00e0o.&nbsp;<\/span><\/td><td><span style=\"font-weight: 400;\">Tr\u01b0\u1edbc \u0111\u00e2y ch\u1ec9 ch\u1ea1y tr\u00ean tr\u00ecnh duy\u1ec7t, nh\u01b0ng b\u00e2y gi\u1edd c\u00f3 th\u1ec3 ch\u1ea1y tr\u00ean m\u00e1y ch\u1ee7 th\u00f4ng qua Node.js.<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-javascript-la-ngon-ng\u1eef-thong-d\u1ecbch-hay-bien-d\u1ecbch\"><b>JavaScript l\u00e0 ng\u00f4n ng\u1eef th\u00f4ng d\u1ecbch hay bi\u00ean d\u1ecbch?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Hi\u1ec7n nay, JavaScript v\u1eeba l\u00e0 ng\u00f4n ng\u1eef bi\u00ean d\u1ecbch v\u00e0 th\u00f4ng d\u1ecbch.&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Trong c\u00e1c phi\u00ean b\u1ea3n tr\u01b0\u1edbc c\u1ee7a JavaScript, n\u00f3 ch\u1ec9 s\u1eed d\u1ee5ng tr\u00ecnh th\u00f4ng d\u1ecbch th\u1ef1c thi t\u1eebng d\u00f2ng m\u00e3 v\u00e0 hi\u1ec3n th\u1ecb k\u1ebft qu\u1ea3 ngay l\u1eadp t\u1ee9c. Nh\u01b0ng theo th\u1eddi gian, hi\u1ec7u su\u1ea5t tr\u1edf th\u00e0nh m\u1ed9t v\u1ea5n \u0111\u1ec1 v\u00ec vi\u1ec7c th\u00f4ng d\u1ecbch kh\u00e1 ch\u1eadm.&nbsp;&nbsp;<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Do \u0111\u00f3, c\u00e1c c\u00f4ng c\u1ee5 JavaScript hi\u1ec7n \u0111\u1ea1i \u0111\u1ec1u t\u00edch h\u1ee3p tr\u00ecnh bi\u00ean d\u1ecbch t\u1ee9c th\u1eddi (JIT &#8211; Just-In-Time), bi\u00ean d\u1ecbch JavaScript th\u00e0nh m\u00e3 byte th\u1ef1c thi ngay khi n\u00f3 chu\u1ea9n b\u1ecb ch\u1ea1y \u0111\u1ec3 c\u1ea3i thi\u1ec7n hi\u1ec7u su\u1ea5t.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-typescript-la-gi\"><b>TypeScript l\u00e0 g\u00ec?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/itviec.com\/blog\/typescript-la-gi\" target=\"_blank\" rel=\"noopener\">TypeScript<\/a> l\u00e0 m\u1ed9t superset (t\u1eadp m\u1eabu) c\u1ee7a JavaScript, th\u00eam c\u00fa ph\u00e1p b\u1ed5 sung v\u00e0o JavaScript \u0111\u1ec3 s\u1edbm ph\u00e1t hi\u1ec7n nh\u1eefng l\u1ed7i vi\u1ebft m\u00e3. TypeScript l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef nh\u1eadp t\u0129nh (statical typed) v\u00e0 h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng (object oriented), kh\u00e1c v\u1edbi JavaScript l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef k\u1ecbch b\u1ea3n (scripting language).<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Tr\u00ecnh duy\u1ec7t s\u1ebd kh\u00f4ng th\u1ec3 hi\u1ec3u v\u00e0 th\u1ef1c thi tr\u1ef1c ti\u1ebfp m\u00e3 TypeScript nh\u01b0 \u0111\u1ed1i v\u1edbi JavaScript. Do \u0111\u00f3, c\u00e1c t\u1ec7p .ts tr\u01b0\u1edbc h\u1ebft c\u1ea7n \u0111\u01b0\u1ee3c bi\u00ean d\u1ecbch sang JavaScript thu\u1ea7n, th\u00f4ng qua tr\u00ecnh bi\u00ean d\u1ecbch tsc, sau \u0111\u00f3 m\u1edbi \u0111\u01b0\u1ee3c th\u1ef1c thi b\u1edfi n\u1ec1n t\u1ea3ng \u0111\u00edch.<\/span><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Tham kh\u1ea3o: <a href=\"https:\/\/itviec.com\/it-jobs\/typescript?utm_source=blog_16082023&amp;utm_medium=anchor_text&amp;utm_campaign=daily\" target=\"_blank\" rel=\"noopener\">Vi\u1ec7c l\u00e0m Type<\/a><a href=\"https:\/\/itviec.com\/it-jobs\/typescript?utm_medium=anchor_text_low&amp;utm_source=blog&amp;utm_campaign=viec_lam_typescript&amp;utm_content=javascript_la_gi\" target=\"_blank\" rel=\"noreferrer noopener\">S<\/a><a href=\"https:\/\/itviec.com\/it-jobs\/typescript?utm_source=blog_16082023&amp;utm_medium=anchor_text&amp;utm_campaign=daily\" target=\"_blank\" rel=\"noopener\">cript<\/a> h\u1ea5p d\u1eabn tr\u00ean ITviec<\/em><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-t\u1ed5ng-k\u1ebft\"><span class=\"ez-toc-section\" id=\"Tong_ket\"><\/span><b>T\u1ed5ng k\u1ebft<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">Ki\u1ebfn th\u1ee9c li\u00ean quan \u0111\u1ebfn JavaScript c\u00f2n r\u1ea5t nhi\u1ec1u. Tuy nhi\u00ean n\u1eafm v\u1eefng ki\u1ebfn th\u1ee9c trong b\u00e0i vi\u1ebft n\u00e0y, b\u1ea1n s\u1ebd c\u00f3 n\u1ec1n t\u1ea3ng c\u01a1 b\u1ea3n \u0111\u1ec3 hi\u1ec3u r\u00f5 JavaScript l\u00e0 g\u00ec \u0111\u1ec3 c\u00f3 th\u1ec3&nbsp; h\u1ecdc ng\u00f4n ng\u1eef n\u00e0y \u1edf m\u1ee9c \u0111\u1ed9 cao c\u1ea5p h\u01a1n.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u1edbi m\u1ee9c \u0111\u1ed9 ph\u1ed5 bi\u1ebfn v\u00e0 nhu c\u1ea7u tuy\u1ec3n d\u1ee5ng cao, \u0111\u1ea7u t\u01b0 v\u00e0o JavaScript v\u1eabn l\u00e0 m\u1ed9t l\u1ef1a ch\u1ecdn an to\u00e0n v\u00e0 \u0111\u00fang \u0111\u1eafn cho b\u1ea5t c\u1ee9 l\u1eadp tr\u00ecnh vi\u00ean n\u00e0o. Ti\u1ebfp t\u1ee5c \u0111\u00f3n ch\u1edd c\u00e1c b\u00e0i vi\u1ebft v\u1ec1 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0y tr\u00ean ITviec blog nh\u00e9! <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript l\u00e0 g\u00ec? JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c d\u00f9ng nhi\u1ec1u nh\u1ea5t trong h\u01a1n 10 n\u0103m qua, theo kh\u1ea3o s\u00e1t c\u1ee7a Stackoverflow. \u0110\u1ecdc b\u00e0i vi\u1ebft sau \u0111\u1ec3 bi\u1ebft n\u00ean h\u1ecdc JavaScript th\u1ebf n\u00e0o, ph\u00e1t tri\u1ec3n s\u1ef1 nghi\u1ec7p IT v\u1edbi ng\u00f4n ng\u1eef n\u00e0y ra sao \u0111\u1ec3 th\u0103ng ti\u1ebfn v\u00e0 c\u00f3 m\u1ee9c thu nh\u1eadp h\u1ea5p d\u1eabn. [&hellip;]<\/p>\n","protected":false},"author":114,"featured_media":39593,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-39519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JavaScript l\u00e0 g\u00ec? JavaScript c\u01a1 b\u1ea3n d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec? - ITviec Blog<\/title>\n<meta name=\"description\" content=\"JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh web ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay. \u0110\u1ecdc \u0111\u1ec3 hi\u1ec3u ngay c\u00e1ch ho\u1ea1t \u0111\u1ed9ng, \u1ee9ng d\u1ee5ng v\u00e0 c\u00e1c thu\u1eadt ng\u1eef JavaScript c\u01a1 b\u1ea3n.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript l\u00e0 g\u00ec? H\u1ecdc JavaScript c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh d\u1ec5 hi\u1ec3u nh\u1ea5t\" \/>\n<meta property=\"og:description\" content=\"JavaScript l\u00e0 g\u00ec? JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c d\u00f9ng nhi\u1ec1u nh\u1ea5t trong h\u01a1n 10 n\u0103m qua, theo kh\u1ea3o s\u00e1t c\u1ee7a Stackoverflow. \u0110\u1ecdc b\u00e0i vi\u1ebft sau \u0111\u1ec3 bi\u1ebft\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-17T06:10:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-01T04:51:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"337\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Linh Khanh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Linh Khanh\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JavaScript l\u00e0 g\u00ec? JavaScript c\u01a1 b\u1ea3n d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec? - ITviec Blog","description":"JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh web ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay. \u0110\u1ecdc \u0111\u1ec3 hi\u1ec3u ngay c\u00e1ch ho\u1ea1t \u0111\u1ed9ng, \u1ee9ng d\u1ee5ng v\u00e0 c\u00e1c thu\u1eadt ng\u1eef JavaScript c\u01a1 b\u1ea3n.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itviec.com\/blog\/javascript-la-gi\/","og_locale":"vi_VN","og_type":"article","og_title":"JavaScript l\u00e0 g\u00ec? H\u1ecdc JavaScript c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh d\u1ec5 hi\u1ec3u nh\u1ea5t","og_description":"JavaScript l\u00e0 g\u00ec? JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c d\u00f9ng nhi\u1ec1u nh\u1ea5t trong h\u01a1n 10 n\u0103m qua, theo kh\u1ea3o s\u00e1t c\u1ee7a Stackoverflow. \u0110\u1ecdc b\u00e0i vi\u1ebft sau \u0111\u1ec3 bi\u1ebft","og_url":"https:\/\/itviec.com\/blog\/javascript-la-gi\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2023-08-17T06:10:54+00:00","article_modified_time":"2025-10-01T04:51:42+00:00","og_image":[{"width":640,"height":337,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png","type":"image\/png"}],"author":"Linh Khanh","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Linh Khanh","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"19 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/"},"author":{"name":"Linh Khanh","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/594512af658d9faba8a7c046a5d8589b"},"headline":"JavaScript l\u00e0 g\u00ec? H\u1ecdc JavaScript c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh d\u1ec5 hi\u1ec3u nh\u1ea5t","datePublished":"2023-08-17T06:10:54+00:00","dateModified":"2025-10-01T04:51:42+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/"},"wordCount":5116,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/","url":"https:\/\/itviec.com\/blog\/javascript-la-gi\/","name":"JavaScript l\u00e0 g\u00ec? JavaScript c\u01a1 b\u1ea3n d\u00f9ng \u0111\u1ec3 l\u00e0m g\u00ec? - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png","datePublished":"2023-08-17T06:10:54+00:00","dateModified":"2025-10-01T04:51:42+00:00","description":"JavaScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh web ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay. \u0110\u1ecdc \u0111\u1ec3 hi\u1ec3u ngay c\u00e1ch ho\u1ea1t \u0111\u1ed9ng, \u1ee9ng d\u1ee5ng v\u00e0 c\u00e1c thu\u1eadt ng\u1eef JavaScript c\u01a1 b\u1ea3n.","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/javascript-la-gi\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2023\/08\/Javascript-thumb.png","width":640,"height":337,"caption":"javascript-la-gi"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/javascript-la-gi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"JavaScript l\u00e0 g\u00ec? H\u1ecdc JavaScript c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh d\u1ec5 hi\u1ec3u nh\u1ea5t"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/594512af658d9faba8a7c046a5d8589b","name":"Linh Khanh","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2022\/08\/IMG_2677-120x120.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2022\/08\/IMG_2677-120x120.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2022\/08\/IMG_2677-120x120.jpg","caption":"Linh Khanh"},"url":"https:\/\/itviec.com\/blog\/author\/linh-khanh\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/39519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=39519"}],"version-history":[{"count":2,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/39519\/revisions"}],"predecessor-version":[{"id":91888,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/39519\/revisions\/91888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/39593"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=39519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=39519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=39519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}