
Explore how JavaScript powers the web as a versatile language for front-end and back-end development, including Node and Lambda on AWS, with ECMA standardization and functional, imperative, and object-oriented paradigms.
Embed JavaScript in HTML using the script tag and run scripts in the browser. Store behavior in external .js files with a script src attribute and practice optional semicolons.
Install node.js from nodejs.org to run JavaScript outside the browser, then choose the long-term support version and follow the setup wizard on Windows or Mac.
Install the Code Runner extension in VS Code to run JavaScript with node, using the run button. Set up node and npm, and execute simple .js files without HTML.
Learn to test and run JavaScript quickly in the playground, using templates like empty JavaScript and script.js on playcode.io, with real-time console output.
File course_material.pdf contains slides used in this course. Use this as reference material for this course.
Learn how to work with variables in JavaScript using const, let, and var to store values and reference memory. Understand how block scope versus function or global scope affects variables.
Discover how hoisting moves declarations to the top of the current scope, making var undefined until initialization while let is hoisted but not initialized.
Understand JavaScript identifiers: allowed characters include letters, digits, underscores, and dollar signs; start with a letter, dollar, or underscore; identifiers are case sensitive and reserved words are not allowed.
Learn how to enable strict mode in JavaScript with use strict, understand its benefits for beginners and experienced programmers, and avoid undeclared variables and duplicate parameters.
Learn about JavaScript operators, including arithmetic, modulus, exponentiation with double star, and relational and equality comparisons, plus the ternary operator, logical operators, and typeof for type checking.
Learn to use JavaScript with an HTML form to read a number, convert it to integer, compute its square, and display the result via DOM and on click events.
Build a page that accepts a price input, applies a 10 percent discount, and displays the net price when the show net price button is clicked.
Explains the javascript if statement, where a true condition triggers an action and a false condition triggers an alternative. Covers braces usage, multiple statements, and else if chains improve programs.
Learn to implement conditional discounts with if statements, starting with 20% off for prices over 1000 and 10% off for prices less than or equal to 1000, then add thresholds.
Explore switch statements in JavaScript to execute code based on a variable's value. Learn how break prevents fall-through and how default handles unmatched cases.
Build a simple html net amount calculator that uses a switch statement to apply 5%, 10%, 15%, or 20% discounts based on quantity and price and compute the final amount.
Validate input by checking if data is empty, display an alert, and terminate the function; format the code with shift alt F to improve readability and follow formatting conventions.
Explore while and for loops in JavaScript, see a for loop printing numbers 1 to 10 and their squares with a template string, and learn block-scoped let usage.
In this example, learn how to compute factors of a number using DOM manipulation, display them as bullets in a UL, and handle prime numbers with a clear no-factors message.
Master the while loop by starting at one, using a condition to print numbers and their squares with a template string, and incrementing to avoid infinite loops.
Use a loop to build a multiplication table from a user-entered number, up to ten rows, three columns (number, multiplier, result), triggered by a table button.
Explore strings in JavaScript: how to create, concatenate with plus, and use template literals. Learn string methods like includes, indexOf, split, substring, slice, trim, and the concept of immutability.
Practice string manipulation in JavaScript by extracting the server from an email address and validating its format, then parse comma-separated marks to compute a total.
Learn dynamic JavaScript arrays, created with square brackets or new Array, with zero-based indexing, empty slots, and basic loops for-in and for-of to access keys and values.
Associative array is an array where indexes are of type string.
However in JavaScript there is no concept of Associative array.
When you use string indexes ( as shown in this lecture), internally JavaScript will convert the Array to an Object and it behaves like an Object with properties and not as an Array.
Explore JavaScript array methods, including push, splice, indexOf, and in-place sort, and learn how string sorting follows dictionary order with case sensitivity and ASCII values.
Compute a student's total marks from a comma-separated input using a simple HTML and JavaScript setup. Convert inputs to numbers, ignore non-numbers with isNaN, and log for debugging.
Learn how sets store unique values and ignore duplicates, use add, delete, and has to manage elements, and iterate with forEach or access values for processing.
Explore maps as key-value data structures, where unique keys map to values, allow overwriting on duplicate keys, and support retrieving entries or undefined when missing.
Master regular expressions to construct patterns, validate input, and extract matches using test and exec, with digits, anchors, and meta characters for practical validation tasks.
Validate passwords with a regular expression that enforces at least one uppercase letter, one digit, and six characters. Display valid or invalid messages as users check.
Build a simple HTML page to enter, store, and display names. Learn to add and delete names using JavaScript array methods like push, indexOf, and splice, with proper not-found handling.
Create and manipulate a JavaScript date object using system or explicit year, month, and day values (remember month is 0–11), milliseconds since 1970, and various get/set methods, plus locale formatting.
Explore creating functions in JavaScript, learn about formal and actual parameters, return values, and callbacks, with examples like max, compare, and totaling positive numbers in an array.
Create an anonymous function and store it in a variable, then invoke it via that variable, a function expression.
Explore how default parameters make arguments optional by assigning default values, such as B has a default value of one. Call a function with fewer arguments to see defaults apply.
Learn how JavaScript rest parameters collect any number of arguments into a formal parameter as an array using three dots, enabling variable arguments across functions.
Explore rest parameters in JavaScript by passing a message as the first argument and gathering all remaining values into a single names parameter, with only one rest parameter allowed.
Explore passing a function as a parameter in JavaScript, using an operation function that invokes add or multiply; each function takes two parameters and returns a value.
A function is called as first-class object, because it can be passed to other function, returned from function, and assigned to a variable.
Learn how arrow functions provide a compact, shorthand alternative to regular functions, supporting a single expression or multiple statements, with shared parameters and no own this reference.
Learn how to use the array filter method with predicates to select odd numbers, using regular and arrow functions, and how filter returns a new array of selected elements.
Learn how to use the array find method in JavaScript to locate the first element that satisfies a predicate, with an optional index, and compare it to filter.
Explore the map method of arrays in JavaScript, learning how it takes a callback to convert each element into a new value and returns a new array of mapped results.
Learn how to use the array forEach method to process every element with a callback function, print results, or perform actions like squaring numbers, while contrasting map, filter, and find.
Explore how JavaScript handles function arguments: missing parameters become undefined, extra parameters are ignored, and use the arguments object to inspect all passed values.
Discover nested functions in JavaScript, where inner functions access outer function parameters and variables, stay private to the outer function, and are callable from within, illustrated with a React context.
Learn how a nested function becomes a closure by returning from an outer function, preserving the outer function's arguments and variables for later calls.
Learn how the spread operator uses three dots to spread arrays, creating copies rather than aliases, and apply the same concept to objects for immutable updates.
Learn how to use the spread operator with functions to pass array elements as parameters, see how extra or missing values behave, and compare spreading with explicit one, two, three.
Destructuring assignment for arrays copies elements into independent variables, using defaults and the three-dots rest operator to capture, ignore, or leave values undefined.
Create and modify object literals in JavaScript without classes, access properties like name and job, and add or update fields such as salary or skills (an array).
Learn how to use the spread operator with objects to create true copies, not aliases, by spreading an existing object and adding or updating properties, with a React context.
Practice destructuring objects by extracting name and company into variables, set a default age of 30 when missing, and optionally alias properties to different variable names like n and C.
Discover how JSON became the default format for data transfer and storage, its integration with JavaScript, and the two key methods stringify and parse to convert between JSON and JavaScript.
Explore how a class serves as a template to create objects with properties and methods, using a constructor to initialize data and compute a selling price with tax.
Explain that fields are public by default and become private with a hash prefix. Demonstrate that private fields cannot be accessed from outside class, and accessing them triggers an error.
Explore how static fields, like the tax rate, belong to the class rather than objects, and how static methods are called with the class name to compute selling price.
Learn how inheritance creates a subclass from a superclass using extends and super, establishing an is-a relationship, with examples like product and discounted product, and student and person.
Explore how JavaScript modules export and import classes, functions, and variables across files, using ES modules or CommonJS, with .js and .mjs extensions.
Master error handling in JavaScript using try, catch, and finally. Access error details, show user-friendly messages, and ensure code runs after both success and failure.
Explore the browser object model and the window object, showing how global variables become window members and how to access properties like inner height, inner width, and local storage.
Learn how the location object exposes the page URL and details like host name, path name, and protocol, and use assign to load a new document into the current window.
Explore the history object in the browser object model, using history.back and history.forward to navigate back and forth with page buttons.
Explore how to use alert, confirm, and prompt dialog boxes on the window object to interact with users, return boolean results, and handle user input.
Learn how the browser's local storage stores data as key-value pairs, using setItem, getItem, removeItem, and length, and compare it with session storage for persistent versus temporary data.
Explore timing events with setInterval and setTimeout, scheduling repeated or single actions, manage their IDs, and clear them to update the UI or fetch data.
Create a simple html page that displays a running digital clock using JavaScript. Update the time every second with setInterval and a date object, displaying the first eight characters.
This course is designed to teach how to use JavaScript language so that you are ready to build Back End and Front End applications using other libraries and frameworks based on JavaScript.
It covers all concepts of JavaScript language including Object Oriented Programming and Functional Programming.
The topics covered in this course:
How to use Visual Studio Code and its extension related to JavaScript
How to embed JavaScript in HTML pages
How to run JavaScript using Node
How to use variables, datatypes and hoisting
How to use arithmetic, relational and logical operators
How to use conditional statements - if and switch
How to access and validate data entered in HTML forms
How to use looping structures - for and while
How to use Strings and related methods
How to use Arrays and related methods
How to use Set and Map
How to use Regular Expressions to extract and validate data
How to use Date object and related methods
How to create simple function with parameters
How to use default and rest parameters
How to pass a function as parameter to another function and implement callbacks
How to implement arrow function
How to use Array methods that depend on callbacks - filter(), forEach(), find() and map()
How to use spread operator with Arrays and Objects
How to use destructuring assignment with Arrays and Objects
How to implement Object Oriented Programming using Classes and Objects
How to create static and private fields and methods
How to implement inheritance
How to override methods of superclass in subclass
How to create a module and export and import its members
How to handle runtime error using try and catch
How to use object in Browser Object Model (BOM) - window, location, history
How to use built-in popup windows - alert, confirm and prompt
How to store data in browser using localstorage
How to handle timing events - timeout and interval
How to handle events in DOM
Understand the difference between event bubbling and event capturing
How to use JQuery
What is AJAX and how to implement AJAX using jQuery