Web Development for Beginners

  • hasURL https://docs.microsoft.com/en-us/learn/paths/web-development-101/

  • Accessibility

    • ARIA
    • "The controls for your page should be listed in the HTML source in the order in which you expect the page to be browsed, while relying on CSS to lay out the page visually to users."
  • javascript

    • let is for block variables
    • var is for function-scoped variables
    • initialize = declare + assign
    • const should get UPPER'd
      • The presence of const means the reference is protected from reassignment. But the value is not immutable and can change, especially if it's a complex construct like an object.
  • Readability

    • camelCase your beautiful names
    • why not use verbs?
  • Callbacks

    • no parens! including parens means call it now (and pass return value?)
  • Anonymous Functions

    • use when the func wouldn't be used anywhere else
    • presumably programmers occasionally convert anonymous functions into named functions
  • Arrow functions

  • Loops (Programming)

    • The for and forEach() loops both let you loop over the array's items, but the difference between them is that the for loop lets you exit if a certain condition is fulfilled
    • numbers.forEach((number, index) => console.log(Number ${number} ${index}));
  • Arrays

    • find()
      • e.g. iceCreamFlavors.find(flavor => flavor === "Chocolate") // "Chocolate"
      • runs the function that you provided as input for each item. If the operation finds the searched-for element, it returns the element. If it doesn't find the element, it returns undefined.
  • filter()

    • e.g. iceCreamFlavors.filter(flavor => flavor.type === "Chocolate")
  • map() (a projection)

    • "The map() method creates a new array with the results of calling a provided function on every element in this array."
  • reduce()

    • reduces a long list of items into a single item