This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQINBF/qfKIBEAC+hrqpfUC8p3JJrI7iZWfjsRUm27dvKUYsXjfCb7ktPr+KY08Z | |
| L3pfAcWxJ7xm7uiVN9JV7Smk5RojmW11VPpl+YjmufJxVNbZGGNxDoCShb2ZxgMR | |
| J8Tba03ANQhaF9Ds4G2M1dtVelWZkjflQT2K145DEJv4S/yThL5MCm8+2rUa0Nlh | |
| ny/vvAzfYOk/qxrE0ogt1XfVxfeEqY+2fy/4bLpHvP91AynMZYyZ2DF0JlhMsaqW | |
| UoYfPUib+dMq+RC7O1Y4taQ6/bsfCeomO/oMQuOvggucF/4mRoATEjd96/nDpZdY | |
| q+P0F7PSpfHTuTrsTqO/ymQ5/uiBn2ImGMxLSdoSzRAyvxU1SJBFuyOfUEdAjxgM | |
| /5OWYi2BWQiexr0oRQp6UIDn/snt9tg9DCfHp2AobLsUVoBwZLst4EeElA4kme54 | |
| jgwP2Qs8tzzt4szeqcgfScvNzwah4X4rKUJ+OZX/1PwKDeBjBOLyXzLANT32WqP9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const childrenOf = (element) => { | |
| if (typeof element === 'string') { | |
| return []; | |
| } | |
| //element is always an object, if the value of props is 'undefined' it returns [], if string returns [children], if Array returns array, neither just returns the element inside an array | |
| //tip: its object desconstructuring after props: (because the extracted value of props is an object with children property) | |
| const { props: { children } } = element; | |
| if (!children) { | |
| return []; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| '$$typeof': Symbol(react.element), | |
| type: 'p', | |
| key: null, | |
| ref: null, | |
| props: { children: 'A' }, | |
| _owner: null, | |
| _store: {} | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| '$$typeof': Symbol(react.element), | |
| type: 'div', | |
| key: null, | |
| ref: null, | |
| props: { children: [ [Object], [Object], ' ' ] }, //the .children obj has always a array with children values + empty array in the end (' ') | |
| _owner: null, | |
| _store: {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| '$$typeof': Symbol(react.element), | |
| type: 'div', | |
| key: null, | |
| ref: null, | |
| props: | |
| { | |
| id: 'test', | |
| children: | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <h3 id="title" data-section-number="1633.1">Attriddffdbutes</h3> | |
| <h4 id="t3itddle" data-section-number="16.331">Attrffdibutes</h4> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Explanations: | |
| cache: If you include other words in the query, Google will highlight those words within | |
| the cached document. For instance, [cache:www.google.com web] will show the cached | |
| content with the word “web” highlighted. This functionality is also accessible by | |
| clicking on the “Cached” link on Google’s main results page. The query [cache:] will | |
| show the version of the web page that Google has in its cache. For instance, | |
| [cache:www.google.com] will show Google’s cache of the Google homepage. Note there | |
| can be no space between the “cache:” and the web page url. | |
| ------------------------------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const array = [] //empty array | |
| function fn() { | |
| return 'Hello from inside the array'; | |
| } | |
| //add function 'fn' to array position 0. | |
| array.push(fn); | |
| console.log(array[0]()); |