« first day (4947 days earlier)   
04:00 - 11:0013:00 - 15:00

1:35 PM
@CommonMan What's to comment? You've accepted an answer lol
 
@matt thanks
 
@underscore Are all the typos to catch the plagiarism bots? 😂
 
What i noticed from people who are not understanding the immutable vs mutable is that they are just think var name = "something", string ( value ) will be assigned to the variable . Even with the obj, arrays or function ( which is mutable by default ) also think right part will be assigned to left
@matt also i have created a mind map for React miro.com/app/board/uXjVKNOzRK0=
Hi Guys, When creating a function with singleton design patten, is there any other way to optimised this code ?
const Config = (function() {
  "use strict";
  let instance;

  function init() {

    let config = {
      name: "samitha",
      age: 35
    }

    return {
      getConfig: function() {
        let freezedCopy = {}

        for (const key in config) {
          Object.defineProperty(freezedCopy, key, {
            value: config[key],
            configurable: false,
            writable: false,
            enumerable: false
          })
        }

        return freezedCopy
      },
      updateConfig: function(data) {
 
2:21 PM
@underscore, it depends what youre intending to do with it, can you give an example of how you intend to use it?
 
 
is there any usecase where instance can be null
if (!instance) {
        instance = init()
      }k
 
04:00 - 11:0013:00 - 15:00

« first day (4947 days earlier)