1.border which color is used by default when no color is specified?
Answer: Border color is inherited if color is not specified otherwise RGB (0,0,0)
What's the device-width of 2.iphone6?
Answer: 375px
What is the difference between this in the arrow function in 3.ES6 and this in the normal function?
Answer:
This in the normal function
1.this always stands for its immediate callers
The object in the object is pointed to by this
This in the function points to the window
The This in the event points to the DOM
2. The direct caller is not found by default (non-strict mode, use strict not used), this points to window
3. This in a function that does not have a direct caller in strict mode points to the window
4. Using the call apply bind binding, this points to the bound object.
* * Global variables are mounted under the Window object
* * In the normal function this points to its immediate caller, if the caller is not found the window
* * Our common window properties and methods are: alert, location,document,parseint,settimeout,setinterval, etc., window's properties by default can omit the window prefix!
11.function Test () {
Console.log (This)
}
Test ()
The result is window
Reason: Test () is a global function, which means that it is hung under the Window object, so test () is equivalent to Window.test () so this time this point is pointing to the window
22.
var obj = {
say: function () {
setTimeout(function () {
console.log(this)
});
}
}
obj.say();
The result is window
anonymous function, the function in the timer, because there is no default host object, so the default this point to the window
This in the arrow function
The default is to point to the object that it is in when it is defined, not the object at the time it is executed, possibly the window
Web front End--face question