JAVASCRIPT PLEASE
vi. Write function initializeGrid to do the following 1. Parameter list includes one parameter, arg 2. Initialize variable gridsize equal to zero (i.e. 0) 3. Initialize variable setLength equal to zero (i.e. 0) 4. If the typeof parameter arg is identical to 'number' a. Set property gridsize equal to parameter arg 5. Else if Object.prototype.toString.call(arg) is identical to '[object Array]' a. Set variable isCustomGrid equal to true b. Set variable customGrid equal to parameter arg c. Error checking and exception handling code is provided, do not remove (!important) d. Set property gridsize equal to parameter arg's length property 6. Error checking and exception handling code is provided, do not remove (!important) 7. Referencing object settings, set property gridsize equal to variable gridsize 8. Return object settings
JAVASCRIPT PLEASE
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am