This file contains 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
/** | |
Declaring Person class, its constructor and methods. | |
This class will be inherited by GetPerson class later to access its properties and methods. | |
*/ | |
class Person { | |
constructor(person) { | |
this.name = person.name; | |
this.jobTitle = person.jobTitle; |
This file contains 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
/** | |
The following example is a simple use case of Object.keys and Array.map functions | |
to loop through a nested JavScript array with object nested into it. | |
Steps: | |
1. Used a map() method on the main array, i.e. examResult | |
2. Started looping through the mapped object | |
3. If the loop encounters a JavaScript Object (marks in this case) it applied Object.keys method on it | |
Structure of examResult array: |
This file contains 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
/** | |
* Custom Column control | |
* Reference: https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/columns/index.js | |
*/ | |
import { times } from 'lodash'; | |
import classnames from 'classnames' | |
import memoize from 'memize'; | |
/** |
OlderNewer