1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
JavaScript's built-in bind()method allows an object to borrow another object's ______. | method | method | |
In the following statement, what goes into the blank is a _______. | let _______ = nationCA.calcDensity.bind(nationMX); | variable | variable |
The object nationMX is borrowing from nationCA. Fill in the blank. | let calcMXDensity = nationCA.calcDensity.bind_________ | (nationMX); | \(nationMX\); |
The object nationMX is borrowing from nationCA. Fill in the blank. | let calcMXDensity = nationCA.calcDensity__________________ | .bind(nationMX); | \.bind\(nationMX\); |
The object nationMX is borrowing the method add() from nationCA. Fill in the blank. | let calcMXDensity = nationCA___________________________ | .add.bind(nationMX); | \.add\.bind\(nationMX\); |
The object x is borrowing the method y() from the object z. Make up the variable. | let v = z.y.bind(x); | let[a-z_$][a-zA-Z0-9_$]*=z\.y\.bind\(x\); | |
Code a bind() statement. Make up everything. | let x = z.y.bind(p); | let[a-z_$][a-zA-Z0-9_$]*=[a-z_$][a-zA-Z0-9_$]*\.[a-z_$][a-zA-Z0-9_$]*\.bind\([a-z_$][a-zA-Z0-9_$]*\); | |
Below is a bind() statement. Call the borrower's method. | let calc = nationCA.calcDensity.bind(nationMX); | calc(); | calc\(\); |
|
|||
|