
Explore JavaScript fundamentals, including syntax, string methods, and algorithms for returning unique values. Learn to set up a portfolio with Markdown and GitHub, and practice solving problems with multiple solutions.
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 how JavaScript functions as the language of the web, an event-driven, object-based, dynamically typed, interpreted language that runs in the browser and beyond, guided by ECMAScript standards.
Explore strings as a data type in JavaScript, using quotes for simple text and backticks for multiline strings and template literals. Practice string interpolation with variables to create dynamic phrases.
Explore string properties in JavaScript, using the length property, charAt for character access, and for loops to iterate strings and arrays, including last character retrieval via length minus 1.
Learn how the concat method concatenates strings, accepts multiple arguments, can chain, and, with the spread operator, joins an array of strings into a single output.
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 lastIndexOf and indexOf in JavaScript, learn how lastIndexOf searches from the end, use positive and negative offsets, and identify the correct index of a character.
Apply the match method with a regular expression to extract and return an array of values that match a pattern, illustrating uppercase and lowercase values from a string.
Explore the padEnd method to pad a string to a target length by appending a chosen ending, such as ellipses, with practical examples.
Explore how padStart pads the front of a string by specifying a target length and a pad string, such as dots, swapping from back padding to front padding.
Learn the repeat function in JavaScript and EcmaScript, which repeats a string a whole number of times; decimals are floored, infinity triggers an error, and zero yields an empty string.
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.
Split converts a string into an array by defining a separator, such as a space or comma, and you can use join to reassemble the original text.
Explore the JavaScript string method startsWith, which checks if a string begins with a given value and returns a boolean. Learn how the optional offset shifts the starting comparison.
Learn how substring extracts a part of a string by specifying start and end indices, enabling you to store or output that part.
Learn how to convert strings with toLowerCase and toUpperCase, explore lowercase and uppercase transforms, and place these string prototype methods within the JavaScript ECMA Script toolkit.
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.
Explore the toString method in JavaScript, converting values such as numbers and booleans into strings, with visible color cues and a type check to verify the result.
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.
Use isFinite to check if a value is a finite number, returning a boolean. Pass finite numbers like 0 to get true, while infinity or non-numeric inputs yield false.
Explore the isInteger() check in ECMAScript: pass a number as a parameter, confirm that integers are whole numbers, and see that 0.1 or decimal values return false as booleans.
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.
Discover how the isSafeInteger function determines if a number lies within JavaScript's safe integer bounds. See how infinity and out-of-bounds values return false, while smaller numbers like 25 return true.
Explore parseFloat in JavaScript, which parses an argument and returns a floating point number, demonstrated by extracting 0.1 from a value.
Learn how JavaScript parses numbers from strings using parseInt and parseFloat, including starting-with-number behavior and partial parsing until non-numeric characters. See how the parser returns NaN for invalid inputs.
Learn how toExponential converts a number to exponential notation in JavaScript, with an optional decimal places parameter, defaulting to the input value and supporting up to four places.
Explore the toFixed method to format numbers to a fixed decimal place, specify up to two digits, and observe how it rounds up or down based on the value.
Learn how to use toPrecision() in JavaScript to format a number to a fixed number of decimal places, with rounding to the specified precision.
Instantiate arrays with [], inspect their length, and test for arrays with Array.isArray, noting that arrays are objects that hold booleans, strings, and objects.
Use the concat function to join arrays, including multiple and nested arrays, and store the result in a new array or overwrite an existing one in the specified order.
Explore copyWithin, an array method that copies a range of elements within the same array without changing its length. Use start and end indices and negative directions to control copying.
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.
Understand the every() method in JavaScript by passing a callback to test if all array elements satisfy a condition, returning true or false based on the test.
Explore the array fill method in JavaScript, which overwrites an array with a given value across the full length or from a start index to an end index.
Explore the filter method on arrays by using a callback to select elements that pass a boolean test, producing a new array of values like numbers less than four.
Explore the array method find, a callback function that searches for the first value that satisfies a condition and returns it; if nothing matches, it returns undefined.
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 the array method includes checks for a value and returns a boolean, with an optional starting index to search only from that position.
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 to use the join() method to combine all values in an array into a single string using a chosen separator, such as a dot, comma space, or dash.
Learn how lastIndexOf finds the last matching value in an array, mirroring indexOf but from the end, with practical examples using repeated values.
Explore how the map method creates a new array by applying a callback to each element, leaving the original array unchanged, and see why it’s a cleaner solution than forEach.
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.
Explore how the array reduce method uses a callback with an accumulator and current value to add all elements and produce a final total.
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.
Use the slice method to copy a portion of an array, either the whole array or from a start index. The operation creates a new array without modifying the original.
The some function checks if at least one element passes the callback test and returns a boolean; it yields true if any element passes, otherwise false.
Learn how to sort arrays in JavaScript using sort, why numbers sort incorrectly without a callback, and how a minus b callback enforces numeric ordering.
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.
Learn how to add an element to the front of an array using unshift, add multiple elements at once, and understand how it differs from push and shift.
Explore JavaScript's arithmetic operators, including add, subtract, divide, multiply, modulo for remainders, and the exponent operator to compute powers, with examples of parameters and results.
Explore relational operators in JavaScript, using <, >, <=, >= and equality to return booleans, and learn how the in operator checks for a property in an object.
Explore how the equality operator compares values and types, including strict and non-strict equality, and why using strict equality helps manage dynamic types in JavaScript.
Explore binary logical operators, focusing on the and operator that requires all conditions true, and the or operator that returns true when at least one condition is true, including chaining.
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.
This lecture explains assignment operators in javascript, showing plus equals, minus equals, times equals, divide equals, and modulo, and their equivalence to long-form expressions, with notes on upcoming dot dot operator.
Explore objects as the core building block of web development, learn to access properties with dot and bracket notation, and navigate nested objects to retrieve values.
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.
Explore how object entries convert an object's keys and values into a nested array of key-value pairs, and see examples with nested objects turning into arrays of arrays.
Learn how to freeze objects in JavaScript to prevent changes, with silent overwrites in non-strict mode. See how strict mode and TypeScript may flag edits, and discuss potential deprecation.
Explore how Object.is compares two values in JavaScript, returning true or false for primitives and objects; learn that new objects with identical values are not equal and string case matters.
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.
Learn how to use hasOwnProperty to quickly check if a property exists on an object, returning true or false without iterating keys or nested structures.
Discover how to use Object.values to extract values from a JavaScript object into an array, illustrated with a simple object and a comparison to keys.
Explore how var, let, and const declare variables, compare function scope with block scope, and reveal var hoisting and undefined initialization, guiding you toward modern JavaScript practices.
Learn how const creates a read-only variable in JavaScript and why primitive values cannot be reassigned. See how objects and arrays can be mutated without changing their data type.
Understand control flow via if statements, evaluating booleans to run code. See how true and false conditions, boolean logic, and simple functions drive if, else, and else if.
Learn how if statements evaluate booleans and run code when true, then use else and else if to handle failures and chain multiple conditions before a default path.
Learn how switch statements route code by matching an input to cases. Use break to stop execution and default as a fallback when none match.
Master for loops in JavaScript by implementing initialization, condition, and final expression, using i++ or plus equals to iterate and print values with zero-based indexing.
Use a while loop to iterate when iterations are unknown, initialize and increment a counter, and break out when a condition such as nine is reached to prevent infinite loops.
Explore how a do while loop runs the body at least once, even when the condition is false, unlike a traditional while loop.
Learn how to throw errors to test code paths within a try catch finally block, using a throw expression to trigger a specific error such as 42.
Learn how to use the throw syntax to simulate and test errors in try/catch/finally blocks, including throwing specific values like 42 to verify error handling.
Explore how events in vanilla JavaScript drive dynamic web pages through user interactions like clicks, hovers, and entering text.
Demonstrates wiring an onclick event to a button, defining a function in a script tag, and logging test or hello world to show how a click triggers JavaScript code.
Master the ondblclick event in JavaScript by triggering actions on double clicks. Apply it to any element, test with headings or paragraphs, and see how click speed influences event firing.
Demonstrates on mouse down, which fires when you hold the button. Contrast with on click and on mouse up, showing events fire on release.
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.
Demonstrate onkeydown on an input box to fire a function at every keystroke and reveal the keyboard event properties such as code and key.
Explore the onkeyup input event and learn how to run a function after you release a key, not on every keystroke, with examples showing pressing and releasing keys.
Explore the window resize event and how onresize fires a function when the window is resized; learn to handle the event and update content accordingly.
Attach the onscroll event to the body, page, or window to fire a function as you scroll. Learn why these scrolling events matter in your JavaScript toolkit.
Explore onpageshow and onpagehide events that fire when the page loads or refreshes, triggering a log action. Note cross-browser compatibility with Internet Explorer and pre-close handling.
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.
Demonstrate tracking drag events in JavaScript by using ondragenter and ondragleave, showing how leaving and re-entering fires events for interactive drag interfaces.
Demonstrate clipboard events in JavaScript by using oncopy, oncut, and onpaste to respond to copy, cut, and paste actions in the browser.
Master essential clean code practices in JavaScript by using let instead of var, adopting camelCase for variables, avoiding global variables, and naming constants in uppercase.
Master clean JavaScript by avoiding unnecessary type creation and conversions, using strict equality, and formatting control flow, spacing, semicolons, and object literals for readability.