
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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