Teh Codez Flashcards
Webpack solves which fundamental problem?
bundling
What is the difference between /usr/bin and /usr/local/bin
/usr/local/bin is for locally compiled packages which upgrades may modify or delete without warning. /usr/bin is for distribution-managed programs.
Why use Webpack over a task runner such as Grunt or Gulp?
Webpack does all the preprocessing for you, and gives specified bundles based on configuration and the existing code.
npm: what is the difference between dependencies and devDependencies?
devDependencies are not installed in a directory with package.json with the –production flag. In other direcctories, they are not installed without the –dev flag. devDependencies are not installed transitively.
What is a source map?
A source map consists of information that can be used to map a compressed file back to its original sources.
Name several special characters in HTML.
& code ;
The shell: how do you go to the beginning of a line? To the end of the line? Delete everything right of the cursor?
CTRL-A, CTRL-E, CTRL-K
How do you provide a default file name for a downloaded file?
Place the name of the file in the download attribute.
What is a webpack loader?
A webpack loader is the equivalent of a task in most task runners. It preprocesses files as they are required.
How do you enforce order with webpack loaders?
Either use them right to left, bottom to top, or use the enforce flag in the rules, setting it either to pre or post.
Name two ways of passing parameters to loaders. Which is preferred?
Inline, and using the options object within the module rules. Options is preferred due to readability.
In webpack, how can you use more than one loader?
Place separate loader configurations in the use array.
Name at least four ways to blockquote HTML using tags.
blockquote, code, q, cite,
Name five tags for representing computer code.
code, pre, var , kbd, samp
What HTML tag is used to markup times and dates?
Use the time tag with the datetime attribute.
Describe how React’s event handling differs from HTML’s syntactically.
HTML inline will list the event in lower case, and set the event to the name of the method, with parentheses, between quotes. React will list the event inline to the name of the method, camelCase, between curly braces.
Can you return false to prevent default behavior in React?
No, you must call preventDefault explicitly.
What does the JavaScript bind() method do?
It creates a new function with the this keyword set to the provided value. If any other arguments are provided, they appear first in the new function. Habitually use bind whenever you refer to a method without () after it.