front end development linkedin assessment answers
1. What does the term "tree shaking" mean with regard to JavaScript performance?
- removing unused code from JavaScript files
- splitting code into various bundles so that decisions can be made on loading priority
- only using code that is supported by the newest browsers, and serving the site without JavaScript to old browsers
- allowing the browser to ignore code it believes will perform badly
2. Which array method should you apply to run a function for every item within an array, returning an array of all items for which the function is true?
- filter()
- map()
- every()
- forEach()
3. Lighthouse is a tool for auditing your website. Which choice is not a category of report offered by Lighthouse?
- UX design
- performance
- accessibility
- SEO
4. Which HTML element represents either a scalar value within a known range or a fractional value?
- <range>
- <datalist>
- <meter>
- <optgroup>
5. How would you change this code to make Vanilla selected by default?
- <input type=”radio” value=”vanilla” check>
- <input type=”radio” value=”vanilla” checked>
- <input type=”radio” value=”vanilla” selected>
- <input type=”radio” value=”vanilla” on>
6. Which color value will create a background color that is semitransparent?
- #128a7d
- hsl (174, 778, 318)
- rgba(18, 138, 125,.5)
- rgb(18, 138, 125)
7. Which line would you add to this code to add "Cosmos" to the list of currencies using JavaScript?
- currencies.add ( “Cosmos”) ;
- currencies (2) = “Cosmos”;
- Array.append (“Cosmos”, currencies);
- currencies.push ( “Cosmos”);
8. Which line of code, if applied to all flex items in a flex container, would cause each flex item to take up an equal share of the total width of the container? For example, if there are four items, they would get 25% of each.
- flex: 1 0 0;
- flex: 1 0 auto;
- flex: 1 1 auto;
- flex: initial;
9. You want to create striped table rows using CSS without adding a class to any element. Which CSS would correctly apply the background color to every odd row in your table?
10. Which choice is not a result of invoking strict mode in JavaScript?
- It forces the writing of valid HTML and CSS.
- It eliminates some JavaScript silent errors by changing them to throw errors.
- It prohibits some syntax likely to be defined in future versions of ECMAScript.
- It fixes mistakes that make it difficult for JavaScript engines to perform optimizations.
11. What does the CSS selector a[href$= "org" ] select?
- all <a> tags whose href attribute equals “org”
- all <a> tags whose href attribute contains “org”
- all <a> tags whose href attribute ends with “org”
- all <a> tags whose href attribute begins with “org”
12. Which pseudo-class allows you to selectively show a focus ring on elements only if keyboard navigation is detected?
- :focus-ring
- focus-keyboard
- :focus-visible
- focus-show
13. How would you round the value 11.354 to the nearest full integer?
- Math.rnd(11.354);
- Maths.round(11.354) :
- round (11.354) ;
- Math.round(11.354) ;
14. You find this code in a stylesheet. What is it being used for?
- creating a new block formatting context
- clearing floats in float-based layouts
- inserting content that cannot be seen by screen readers
- O fixing an Internet Explorer 11 bug
15. What is the JavaScript compiler Babel used for?
- It converts ECMAScript 2015+ code into a backwards-compatible version of JavaScript to support older browsers.
- It converts older JavaScript code into modern ECMAScript 2015+ code.
- It is an SSR library that can enhance the SEO and accessibility of your site.
- It is used to bundle individual JavaScript files for use in your website.