![javascript linkedin assessment answers_theanswershome](https://theanswershome.com/wp-content/uploads/2023/02/javascript-linkedin-assessment-answers_theanswershome-1-1024x229.png)
javascript linkedin assessment answers
2. What will be logged to the console?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.39.39-AM.png)
- love
I
JavaScript! - The output may change with each execution of the code and cannot be determined.
- I
JavaScript!
love - I
love
JavaScript!
4. What is the outout of this code?
var obj:
console.log(obj)
- ReferenceError: obj is not defined
- undefined
- null
- {}
5. How would you add a data item named animal with a value of sloth to local storage for the current domain?
- localStorage.setItem({animal:”sloth”}):
- localStorage.setItem(“animal”,”sloth”):
- LocalStorage.setItem (“animal”, “sloth”) ;
- document.localstorage.setItem(“animal”, “sloth”) ;
6. Which snippet could you add to this code to print "("type": "tiger"'" to the console?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.44.33-AM.png)
- JSON.stringify(cat);
- JSON.stringify(cat, /type/) ;
- cat. toJSON ( “type” ) ;
- JSON.stringify(cat, [“type”]) ;
7. Which line could you add to this code to print "jaguar" to the console?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.45.49-AM.png)
- animals.filter(e => e === “jaguar”);
- animals.shift();
- animals.reverse();
- animals.pop();
8. Which document method is not used to get a reference to a DOM node?
- document. getNode();
- document.getElementsByClassName()
- document.querySelectorAll()
- document.querySelector()
9. Which statement prints "roar" to the console?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.48.17-AM.png)
- roar.bind (bear);
- bear[roar]() ;
- bear. bind (roar);
- roar.apply (bear);
11. What type of function can have its execution suspended and then resumed at a later point?
- Async/Await function
- Generator function
- Arrow function
- Promise function
12. What does this code print to the console?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.50.42-AM.png)
- Nothing is printed to the console.
- grunt
- undefined
- roar
13. Which collection object allows a unique value to be inserted only once?
- Array
- Map
- Obiect
- Set
14. What will be the value of result after running this code?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.52.15-AM.png)
- [“Name”, “Age”, “HairColor”]
- [“NAME”, “AGE”, “HAIRCOLOR”]
- it will throw a TypeError.
- [“DAVE”, 40, “BLUE”]
15. Which statement correctly imports this code from some-file.is?
![](https://theanswershome.com/wp-content/uploads/2023/02/Screenshot-2023-02-19-at-10.53.38-AM.png)
- const printMe = import ‘./some-file’;
- import { printMe } from ‘./some-file’;
- import default as printMe from ‘./some-file’;
- import printMe from ‘. /some-file’;