- Solve all problems using JavaScript
-
Write a function that returns an array with the first
npowers of 2. Call ittwoPow. -
Use
twoPowandArray.prototype.reduceto the sum of the first 10 powers of 2. -
Describe this call signature:
| // For each of the following code fragments: | |
| // a. what does the code do? | |
| // b. what did the author intend for it to do? | |
| // c. how would you fix it? | |
| // NOTE: all code samples work exactly the same in all browsers | |
| // 1. object literals | |
| var data = [ { high: 100, low: 81 }, { high: 93, low: 73 }, { high: 60, low: 32 } ]; | |
| function getAverages(data) { | |
| var avgs = []; |
| #!/bin/bash | |
| # /etc/init.d/selenium | |
| # debian-compatible selenium-grid startup script. | |
| # Based on jenkins startups | |
| # Praneeth Bodduluri <lifeeth[at]gmail.com> | |
| # update-rc.d -n -f selenium start 90 2 3 4 5 . stop 10 0 1 6 . | |
| ### BEGIN INIT INFO | |
| # Provides: selenium-grid | |
| # Required-Start: $remote_fs $syslog $network | |
| # Required-Stop: $remote_fs $syslog $network |