home.social

#30daysofjavascript — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #30daysofjavascript, aggregated by home.social.

  1. #100DaysOfCode : #VanillaJS

    #Day36 : Promises and Async/Await Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Prom

    Learned :
    - Promises are based on `resolve and reject`, if it `resolves` the `.then` executes, if it `rejects` we `.catch` the error
    - `Async/Await` : `async` make the function a promise, two blocks similar as `resolve` and `reject` : `try` and `catch`

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  2. #100DaysOfCode : #VanillaJS

    #Day35 : #JSON Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/JSON

    Learning :
    - basic JSON structure : double quotes
    - change JSON to object with JSON.parse(const, (key, value))
    - change something JS in JSON with JSON.stringify(obj, replacer, space)

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  3. #100DaysOfCode : #VanillaJS

    #Day34 : Destructuring & Spreading Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Dest

    Learning :
    - destructuring arrays and objects
    - destructuring in for... of loop
    partial destructuring with , ,
    - structuredClone() to create non superficial copies of objects
    - complex treatments in array nested in object

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  4. #100DaysOfCode : #VanillaJS

    #Day33 :Classes Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Clas

    Learning :
    - class allows to create an object with built in properties
    - class `constructor` is the better way to add properties
    - this
    - class extending to create child objects of the class that herits properties
    - `constructor` and `super` to rewrite or add properties to the child class

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  5. #100DaysOfCode : #VanillaJS

    #Day32 : Sets and Maps Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Sets

    - `Set` to get unique elements from an array
    - `Map` to organize array in objects using as we want keys
    - find unique values in a big array combinating `map` array method, flattening and `Set`

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  6. #100DaysOfCode : #VanillaJS

    #Day31 : Higher Order Functions Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/High

    - concatenate strings with reduce
    - some, every array method
    -populating an object : using a combination of storing object, for...of loop, sort, slice, map
    -create object with bracket notation storingObject[key] = value

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  7. #100DaysOfCode : #VanillaJS

    #Day30 : Object Exercices from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Obje

    - using for in loops and understanding that it requireds the [index] of the item

    - using .every() array method that return a true or false

    - structuredClone() to deep copy an object

    using Object.keys, Object.values, Object.entries and array destructuring

    .find() array method

    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #LearnJavascript #JS

  8. #100DaysOfCode : #VanillaJS

    #Day28 : Array Exercices part III from #30DaysOfJavascript

    Source Code : github.com/teotimepacreau/Arra

    - array destructuring with... in order to use Math.min() and Math.max() (because they only works on numbers and not on an array)
    - reduce in order to calculate a sum of elements necessary to an average
    #WebDev #Frontend #WebDesign #LearnWebDev #Javascript #LearnToCode #CodingDay #FrontendDevelopment #CodingChallenge #LearnCode #WebDevelopment #LearnJavascript #JS