This repository is created to record, share, and review what I have learned through Wes Bos' JavaScript30 exercises. I have summarized the key concepts discussed in each lesson with a link to the MDN documentation or other relevant resources for easier access in the future.
The original JavaScript30 exercises and the repository can be found here: https://javascript30.com/ and https://github.com/wesbos/JavaScript30.
- setInterval Web API method
- transform CSS Property
- transform-origin CSS Property
- transition-timing-function CSS Property
- CSS Variables
- :root pseudo-class 2a. CSS pseudo-class
- Data-attributes
- JavaScript fallback value
- documentElement
- CSS Style Declaration - setProperty method
- flexbox
- translateY CSS function
- :first-child and :last-child pseudo-class
- cubic-bezier easing-function 4a. cubic-bezier generator
- classList.toggle()
- transitionend event
- fetch() method
- response.json() method
- Spread syntax
- filter() method
- new RegExp()
- regex modifiers such as g and i
- String.prototype.match() method
- String.prototype.replace() method
- HTML5 tag and the canvas element
- canvas.getContext() method
- Different context methods and properties such as strokeStyle, lineJoin, lineCap, beginPath(), moveTo(), lineTo(), stroke()
- Array destructuring
- hsl colors - hue, saturation, lightness
- Scroll Event
- Debounce Function
- Debounce vs Throttle Demo and CSS Tricks - Debounce vs Throttle - Throttle is not mentioned in this lesson but it is often discussed with debounce
- window.scrollY
- window.innerHeight
- HTMLElement.offsetTop
- JavaScript Data Types
- Pass by Value vs. Pass by Reference
- slice()
- concat()
- Spread syntax
- Array.from()
- Object.assign()
- Shallow vs. Deep copy
- JSON.stringify and JSON.parse
- localStorage
- MDN Docs on Event Delegation and How JavaScript Event Delegation Works
- Persist Logs in Dev Tools
- Event.preventDefault()
- Attribute Selectors
- HTMLFormElement.reset()
- Element.innerHTML
- Templating HTML with JS Template Strings
- Styling native checkbox with emojis
- Element.matches()
- Data-attributes
- offsetWidth and offsetHeight
- clientX vs pageX vs screenX vs offsetX - only offsetXY property was discussed, but knowing the differences between different properties seems useful.
- Object Destructuring and Renaming
- text-shadow CSS property
- Array.from()
- Nodelist
- String split() method
- Array destructuring
- Array map() method and only passing in a function without arguments and also tricky use case with a function that accepts optional arguments
- Array reduce() method
- Math.floor() method
- Remainder/Modulo (%) Operator
- npm install without arguments
- navigator.mediaDevices.getUserMedia()
- Promise and Using Promises
- then() method on Promise
- catch() method on Promise
- setting srcObject property instead of src on video
- setInterval Web API method
- getImageData
- Web Speech API - SpeechRecognition
- SpeechRecognition interface - interimResults property
- result and end events of SpeechRecognition
- isFinal property
- contenteditable attribute on HTML element
- Xcode simulator
- Navigator.geolocation
- getCurrentPosition()
- watchPosition()
- GeolocationCoordinates interface
- speed and heading properties
- Element.getBoundingClientRect() method
- window.scrollX and window.scrollY properties
- transform CSS Property
- translate() CSS function
- SpeechSynthesis
- SpeechSynthesis.getVoices(), speak() method, cancel() method, and voiceschanged event
- SpeechSynthesisUtterance
- Attribute Selectors (example: [attr=value])
- Array.prototype.find() method
- HTMLElement.offsetTop - Distance of the outer border of the current element relative to the inner border of the top of the offsetParent node.
- HTMLElement.offsetHeight - Height of an element, including vertical padding and borders. In the lesson, it was used to add extra space for the fixed positioned nav element.
- Window.scrollY - Number of pixels that the document is currently scrolled vertically.
- Fixed Position - The element is removed from the normal document flow, and no space is created for the element in the page layout.
- CSS Descendant Combinators - Combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
- width vs. max-width - To add the transition effect,
max-width
should be used instead of thewidth
property. - transform: scale() - Resizes an element on the 2D plane.
- Event Bubbling, Capture, stopPropagation
- Event Capture and Once options
- e.stopPropagation()
- Event Propagation MDN Example
- FreeCodeCamp article about Event Propagation
- setTimeout and "this" keyword
- arrow function scope
- CSS display and opacity properties - these two properties can remain in two different classes to create a transition effect
- Element.getBoundingClientRect() method - this method cannot be used with display: none
- Different DOM Events such as mousedown, mouseup, mouseleave, mousemove
- Cursor types such as grabbing
- MouseEvent.pageX - Returns the horizontal (x) coordinate, in pixels, at which the mouse was clicked, relative to the left edge of the entire document.
- Element.offsetLeft - Returns the number of pixels that the upper left corner of the current element is offset to the left within the HTMLElement.offsetParent node.
- Element.scrollLeft - The number of pixels that an element's content is scrolled from its left edge.
- Naming logged variables with curly braces
- mousemove event
- MouseEvent.pageY - Returns the vertical (y) coordinate in pixels of the event relative to the whole document.
- Element.offsetTop - Returns the distance of the outer border of the current element relative to the inner border of the top of the offsetParent node.
- Element.offsetHeight - Returns the height of an element, including vertical padding and borders, as an integer.
- Number.prototype.toFixed() - Formats a number using fixed-point notation and returns a string.
- HTMLMediaElement.playbackRate
- Date.now() - Returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC.
- setInterval()
- clearInterval()
- new Date()
- Data-attributes
- HTMLFormElement.reset() - Restores a form element's default values
- Math.random()
- Recursion
- Multiple CSS Class Selectors - Targets an element that has all of the multiple classes.
<h1 class="three four">Double Class</h1>
.three.four { color:red }
- window.setTimeout() - Sets a timer that executes a function after the specified amount of time (in milliseconds) is over.
- Event.isTrusted property - Boolean property that returns true when the event was generated by a user action, and false otherwise.