
Set up your JavaScript environment with Visual Studio Code, install the Koca extension, and start Koca to view output in the browser, optimizing single-monitor workflows.
Create an HTML file in your editor (index.html), outline the head and body, and use the script tag to run JavaScript, noting its difference from the link tag.
Explore the string method endsWith, which returns a boolean for whether a string ends with a given substring. The lecture uses 'world' in examples and notes off-by-one considerations.
Explore the indexOf function in ECMAScript strings, learning how it returns the first matching index, starting position, and negative one when a character does not exist.
Explore how includes() checks for a substring in a string and returns a boolean, with case sensitivity, and learn to use indexOf as a fallback for browsers like Internet Explorer.
Explore the padEnd method to pad a string to a target length by appending a chosen ending, such as ellipses, with practical examples.
Demonstrate the replace() string method in JavaScript, using a regular expression and a replacement to swap hello with goodbye, showing both global and single-match behavior.
Explore the string search method that uses regular expressions to locate the index of the first match, returning -1 if not found, with examples like hello and world.
discover how to slice strings with start and end indices to extract parts, copy values, and obtain substrings for flexible string handling.
Learn how to use trim, trimLeft, and trimRight to remove whitespace from strings, explore left and right trimming, and understand browser considerations and manual looping approaches.
Explain number properties such as max value, max safe integer, min safe integer, and infinity and negative infinity concepts, guiding what you can do with numbers.
Explore the isNaN() function and its behavior in JavaScript: determine if a value is not a number, noting that NaN is a number type and isNaN returns true or false.
Instantiate arrays with [], inspect their length, and test for arrays with Array.isArray, noting that arrays are objects that hold booleans, strings, and objects.
Explore how the entries() method converts an array into key-value pairs, then iterate with next().value to print the index and value for each element using a for loop.
Learn how to use findIndex in ECMAScript to locate the index of the first array element that passes a test (greater than three), returning the index rather than the value.
Use the forEach method to iterate through an array, printing each element and optionally accessing the index and the original array, offering a cleaner alternative to a for loop.
Learn how indexOf finds the first occurrence of a value in an array, returning its index or -1 if not found, with optional start position and simple true/false checks.
Learn how the array pop method removes the last element and how to capture that value by storing it in a variable, while still altering the original array.
Discover how push adds values to the end of an array, push multiple values like 10 and 11, and understand that the opposite of pop is push.
Learn how the shift() method removes the first element of an array and shifts the rest, and how to store that removed value in a variable.
JavaScript provides a toString function for arrays, converting the array values into a comma separated string. Compare the join functionality to toString for a similar comma separated array representation.
Explore relational operators in JavaScript, using <, >, <=, >= and equality to return booleans, and learn how the in operator checks for a property in an object.
Master the conditional (ternary) operator in JavaScript, using condition ? true : false to replace simple if/else. See examples with 2+2 and learn nesting and readability tips.
Explore increment and decrement operators in JavaScript: understand prefix and postfix forms, how they affect return values, and why using them in return statements can be tricky.
Learn how to duplicate objects without linking to the original by using Object.assign to create a new object with the same values, preventing unintended mutations.
Learn how to check if an object is frozen using isFrozen, following the freeze method. See how isFrozen returns true when an object is frozen.
Learn how to use Object.keys() to extract an object's keys into an array, returning just the key names for easy access.
Explore how events in vanilla JavaScript drive dynamic web pages through user interactions like clicks, hovers, and entering text.
Explore onmouseenter and onmouseleave with mobile-first design, learn how hover effects translate to touch devices, and implement multiple event listeners to adjust element height dynamically.
Learn javascript mouse events: use on mouse enter to start tracking, on mouse move to fire with every pixel change, and on mouse out to stop when leaving.
Explain drag events in javascript, showing continuous firing during drag and a final event on release with ondrag and ondragend, and discuss potential mobile use.
See how the ondragenter event fires when you drag over the drop area, updating the inner text and invoking a test function to simulate drag-and-drop behavior.