{"id":7732,"date":"2025-07-23T16:03:33","date_gmt":"2025-07-23T16:03:33","guid":{"rendered":"https:\/\/beproblemsolver.com\/?p=7732"},"modified":"2025-07-25T04:54:10","modified_gmt":"2025-07-25T04:54:10","slug":"javascript-101-fundamentals","status":"publish","type":"post","link":"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/","title":{"rendered":"JavaScript 101: JavaScript Fundamentals Tutorial"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 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\">Table of Contents<\/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:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%94%B0_Why_Learn_JavaScript\" >\ud83d\udd30 Why Learn JavaScript?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%E2%9C%851_Variables_Data_Types\" >\u27051.&nbsp;Variables &amp; Data Types<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%94%842_Operators_in_JS\" >\ud83d\udd042.&nbsp;Operators in JS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%A7%AA3_IfElse_Statements\" >\ud83e\uddea3. If\/Else Statements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%94%814_Loops\" >\ud83d\udd014. Loops<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB5_Functions_in_JS\" >\ud83e\uddd1\u200d\ud83d\udcbb5. Functions in JS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%93%A66_Arrays_and_Methods\" >\ud83d\udce66.&nbsp;Arrays and Methods<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%97%83%EF%B8%8F_7_Objects_in_JavaScript\" >\ud83d\uddc3\ufe0f 7. Objects in JavaScript<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%A7%B5_8_String_Handling\" >\ud83e\uddf5 8. String Handling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%A7%AE_9_Number_Handling\" >\ud83e\uddee 9. Number Handling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%E2%8F%B3_Extra_Working_with_Dates\" >\u23f3 Extra: Working with Dates<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%E2%AD%90_Follow_and_Star_our_GitHub_Repository\" >\u2b50 Follow and Star our GitHub Repository<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/beproblemsolver.com\/javascript-101-fundamentals\/#%F0%9F%A7%BEConclusion_of_JavaScript_101\" >\ud83e\uddfeConclusion of JavaScript 101<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">Today,<strong> JavaScript<\/strong>&nbsp;is the heartbeat of modern web development. Without JavaScript 101 basics, we cannot develop websites.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you&#8217;re building interactive websites, web applications, or learning front-end frameworks like React or Angular, JavaScript is where it all begins. In this post, we\u2019ll walk through the fundamental concepts of JavaScript.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And if you love WordPress and want to <a href=\"https:\/\/beproblemsolver.com\/boost-wordpress-website-speed-in-7-steps\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/beproblemsolver.com\/boost-wordpress-website-speed-in-7-steps\/\" rel=\"noreferrer noopener\">speed up your WordPress website<\/a>, try this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s break down these concepts, walk through examples, and have JavaScript basics explained in detail!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B0_Why_Learn_JavaScript\"><\/span>\ud83d\udd30 Why Learn JavaScript?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript is a&nbsp;<strong>versatile<\/strong>,&nbsp;<strong>event-driven<\/strong>, and&nbsp;<strong>object-based language<\/strong>&nbsp;that powers the dynamic behavior you see in websites. Learning JavaScript will open many doors for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Without JavaScript 101, you will struggle with popular libraries like React.js, Next.js or Angular.js.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/be-problem-solver\/image\/upload\/v1753285502\/javascript_data_types_clwvxj.png\" alt=\"Educational illustration showing JavaScript variables and data types, with code snippets and icons for string, number, boolean, object, array, undefined, and null.\" title=\"JavaScript Variables and Data Types Educational Illustration\"\/><figcaption class=\"wp-element-caption\">JavaScript variables and data types<\/figcaption><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E2%9C%851_Variables_Data_Types\"><\/span>\u27051.&nbsp;Variables &amp; Data Types<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript supports different ways of declaring variables:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var name = \"John\";      \/\/ function scoped\nlet age = 25;           \/\/ block scoped\nconst PI = 3.14;        \/\/ constant, can't be reassigned<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Data Types in JS<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>String:&nbsp;<code>\"Hello\"<\/code><\/li>\n\n\n\n<li>Number:&nbsp;<code>42<\/code><\/li>\n\n\n\n<li>Boolean:&nbsp;<code>true\/false<\/code><\/li>\n\n\n\n<li>Undefined: a variable declared but not assigned<\/li>\n\n\n\n<li>Null: assignment value denoting absence<\/li>\n\n\n\n<li>Object, Array: complex data structures<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udccc&nbsp;<strong>Tip<\/strong>: As we go through JavaScript basics explained remember to use&nbsp;<code>let<\/code>&nbsp;and&nbsp;<code>const<\/code>. <strong><em>Avoid&nbsp;<code>var<\/code>&nbsp;in modern context<\/em><\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%842_Operators_in_JS\"><\/span>\ud83d\udd042.&nbsp;Operators in JS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While we learn JavaScript step by step. Operators are key.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Arithmetic<\/strong>:&nbsp;<code>+<\/code>,&nbsp;<code>-<\/code>,&nbsp;<code>*<\/code>,&nbsp;<code>\/<\/code>,&nbsp;<code>%<\/code><\/li>\n\n\n\n<li><strong>Assignment<\/strong>:&nbsp;<code>=<\/code>,&nbsp;<code>+=<\/code>,&nbsp;<code>-=<\/code>, etc.<\/li>\n\n\n\n<li><strong>Comparison<\/strong>:&nbsp;<code>==<\/code>,&nbsp;<code>===<\/code>,&nbsp;<code>!=<\/code>,&nbsp;<code>&lt;<\/code>,&nbsp;<code>&gt;=<\/code><\/li>\n\n\n\n<li><strong>Logical<\/strong>:&nbsp;<code>&amp;&amp;<\/code>,&nbsp;<code>||<\/code>,&nbsp;<code>!<\/code><\/li>\n\n\n\n<li><strong>Unary<\/strong>:&nbsp;<code>typeof<\/code>,&nbsp;<code>!<\/code>,&nbsp;<code>++<\/code>,&nbsp;<code>--<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let x = 10;\nlet y = 5;\nlet sum = x + y;    \/\/ 15<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%AA3_IfElse_Statements\"><\/span>\ud83e\uddea3. If\/Else Statements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this JavaScript fundamentals tutorial, we must discuss <strong>control flow or conditional statements<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These allow us as programmer to make decisions via code. For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let age = 18;\n\nif (age >= 18) {\n  console.log(\"Eligible to vote\");\n} else {\n  console.log(\"Underage\");\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>else if<\/code><\/li>\n\n\n\n<li><code>switch<\/code>&nbsp;statements<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%814_Loops\"><\/span>\ud83d\udd014. Loops<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In JavaScript 101, we use <strong>Loops<\/strong> for repeating a block of code or to do repetitive task.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">for (let i = 1; i &lt;= 5; i++) {\n  console.log(\"Step:\", i);\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also commonly used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>while<\/code>&nbsp;loop<\/li>\n\n\n\n<li><code>do...while<\/code>&nbsp;loop<\/li>\n\n\n\n<li><code>for...in<\/code>&nbsp;(object iteration)<\/li>\n\n\n\n<li><code>for...of<\/code>&nbsp;(array iteration)<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%91%E2%80%8D%F0%9F%92%BB5_Functions_in_JS\"><\/span>\ud83e\uddd1\u200d\ud83d\udcbb5. Functions in JS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript functions allow us to reuse blocks of code. They are one of the core principle of JavaScript.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function greet(name) {\n  return `Hello, ${name}!`;\n}\n\nconsole.log(greet(\"Alice\")); \/\/ Hello, Alice!<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also covered:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Function expressions<\/li>\n\n\n\n<li>Arrow functions&nbsp;<code>() =&gt; {}<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">const add = (a, b) => a + b;\nconsole.log(add(5, 3)); \/\/ 8<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%93%A66_Arrays_and_Methods\"><\/span>\ud83d\udce66.&nbsp;Arrays and Methods<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Arrays are collection-type data structures.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let fruits = [\"apple\", \"banana\", \"mango\"];\nconsole.log(fruits[1]); \/\/ banana<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Common array methods:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>push()<\/code>,&nbsp;<code>pop()<\/code><\/li>\n\n\n\n<li><code>shift()<\/code>,&nbsp;<code>unshift()<\/code><\/li>\n\n\n\n<li><code>forEach()<\/code>,&nbsp;<code>map()<\/code>,&nbsp;<code>filter()<\/code>,&nbsp;<code>reduce()<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">const doubled = [1, 2, 3].map(num => num * 2); \/\/ [2, 4, 6]<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%97%83%EF%B8%8F_7_Objects_in_JavaScript\"><\/span>\ud83d\uddc3\ufe0f 7. Objects in JavaScript<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Objects are key-value pairs:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let person = {\n  name: \"John\",\n  age: 30,\n  greet: function() {\n    return `Hello, I'm ${this.name}`;\n  }\n};\n\nconsole.log(person.greet()); \/\/ Hello, I'm John<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also learn:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Accessing properties (<code>.<\/code>&nbsp;and&nbsp;<code>[]<\/code>)<\/li>\n\n\n\n<li>Nested objects<\/li>\n\n\n\n<li>Object destructuring<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%B5_8_String_Handling\"><\/span>\ud83e\uddf5 8. String Handling<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Working with text in JS:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let message = \"Hello, World!\";\nconsole.log(message.length);           \/\/ 13\nconsole.log(message.toUpperCase());    \/\/ HELLO, WORLD!\nconsole.log(message.includes(\"World\"));\/\/ true<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Template literals:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let name = \"Alice\";\nlet output = `Hello, ${name}`;<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%AE_9_Number_Handling\"><\/span>\ud83e\uddee 9. Number Handling<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Understand numeric operations and methods:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let x = 42;\nconsole.log(x.toString());      \/\/ \"42\"\nconsole.log(Number(\"123\"));     \/\/ 123\nconsole.log(Math.sqrt(16));     \/\/ 4\nconsole.log(Math.random());     \/\/ Random number<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E2%8F%B3_Extra_Working_with_Dates\"><\/span>\u23f3 Extra: Working with Dates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"monokai\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">const today = new Date();\nconsole.log(today.toDateString()); \/\/ E.g., Sun Jun 1 2025\nconsole.log(today.getFullYear()); \/\/ 2025<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E2%AD%90_Follow_and_Star_our_GitHub_Repository\"><\/span>\u2b50 Follow and Star our GitHub Repository<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udc49&nbsp;<a href=\"https:\/\/github.com\/PawanKumar-Dev\/JS-Revision\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/PawanKumar-Dev\/JS-Revision<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Feel free to read and show some love by starring the repository \u2b50.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Know that to learn JavaScript is like learning the language of the web.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every interactive and dynamic element you experience in modern websites\u2014dropdowns, modals, sliders, API-powered content\u2014relies heavily on JavaScript.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%BEConclusion_of_JavaScript_101\"><\/span>\ud83e\uddfeConclusion of JavaScript 101<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog post, we walked through the&nbsp;<strong>core building blocks<\/strong>&nbsp;of JavaScript. From variables, data types, and conditionals to loops, functions, arrays, and objects<span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">, these&nbsp;<strong>fundamentals form the foundation<\/strong>&nbsp;of everything else you\u2019ll learn in JavaScript and<\/span> frameworks and libraries like React, Angular, and Vue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consistency beats complexity. Keep experimenting, building, and revisiting this repository whenever you want to improve your skills. Remember \u2013 every expert was once a beginner. \ud83d\udcaa\ud83d\udca5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Feel free to check out our <a href=\"https:\/\/beproblemsolver.com\/wp-admin\/admin.php?page=googlesitekit-dashboard&amp;permaLink=https%3A%2F%2Fbeproblemsolver.com%2Ftop-16-best-isekai-anime-with-op-mcs%2F\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/beproblemsolver.com\/wp-admin\/admin.php?page=googlesitekit-dashboard&amp;permaLink=https%3A%2F%2Fbeproblemsolver.com%2Ftop-16-best-isekai-anime-with-op-mcs%2F\" rel=\"noreferrer noopener\">Isekai Anime recommendation of year 2025<\/a>!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you found this post helpful, be sure to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udd16 Bookmark the&nbsp;<a href=\"https:\/\/github.com\/PawanKumar-Dev\/JS-Revision\" target=\"_blank\" rel=\"noopener\">JS Revision GitHub Repo<\/a><\/li>\n\n\n\n<li>\ud83d\udcac Share your feedback in the comments<\/li>\n\n\n\n<li>\ud83d\udd01 Share this post with fellow learners!<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Until next time,&nbsp;<strong>happy coding!<\/strong>&nbsp;\ud83d\udc68\u200d\ud83d\udcbb\ud83d\ude80<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is JavaScript? Master the basics from variables to DOM manipulation with step\u2011by\u2011step tutorials in this ultimate JavaScript 101 guide.<\/p>\n","protected":false},"author":1,"featured_media":8188,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAow6-e6DA:productID":"","footnotes":""},"categories":[45],"tags":[168,165,43,170,101,167,166,35],"class_list":["post-7732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-coding","tag-ecmascript","tag-javascript","tag-javascript-for-beginners","tag-js","tag-programming-language","tag-web-design","tag-web-development"],"_links":{"self":[{"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/posts\/7732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/comments?post=7732"}],"version-history":[{"count":0,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/posts\/7732\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/media\/8188"}],"wp:attachment":[{"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/media?parent=7732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/categories?post=7732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beproblemsolver.com\/wp-json\/wp\/v2\/tags?post=7732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}