---
# System prepended metadata

title: FE Software Engineer Assessment
tags: [Assessment]

---

# FE Software Engineer Assessment

###### tags: `Assessment`

> Just play, have fun & enjoy  :brain: :video_game: :rainbow: 

[toc]


##  Logic Questions

1. Before Mt. Everest was discovered, what was the tallest mountain in the world?
2. A cow weighs 800 kilograms, and the weight load of the bridge is 700 kilograms, how does the cow cross the bridge?
3. What is the largest possible number you can write using only 2 numbers - just 2 numbers, no other mathematical symbols?
4. There are 3 light bulbs in a hidden room and 3 switches outside the room that correspond to those light bulbs. You do not know which switch affects which bulb and you cannot see inside of the room. You are allowed to go inside of the room only one time. How do you find out which switch corresponds to which bulb?
5. You have two sand timers, which can show 4 minutes and 7 minutes respectively. Use both the sand timers (at a time or one after other or any other combination) and measure a time of 9 minutes.
6. A snail is at the bottom of a 30 foot well. Every hour the snail is able to climb up 3 feet, then immediately slide back down 2 feet. How many hours does it take for the snail to get out of the well?




## Web Development Questions

7. What’s the difference between GET and POST methods in HTTP requests?
8. List out the different ways of CSS code to style below html element to highlight it in RED.**
```
<p>This paragraph refers to two classes. </p>
```
9. List out the different ways an HTML element can be accessed in a JavaScript code.
10. What would be the result of 2+5+”3” in JavaScript?
11. What will be the output when the following code is executed? Explain.
 ```
console.log(false == '0')
console.log(false === '0')
```
12. In what order will the numbers 1-4 be logged to the console when the code below is executed? Why?
```
(function() {
    console.log(1); 
    setTimeout(function(){console.log(2)}, 1000); 
    setTimeout(function(){console.log(3)}, 0); 
    console.log(4);
})();
```
13. What would the following lines of code output to the console? Explain your answer.
```
console.log("0 ||  1 = "+(0 || 1));
console.log("1 || 2 = "+(1 || 2));
console.log("0 && 1 = "+(0 && 1));
console.log("1 && 2 = "+(1 && 2));
```

## Vue related Questions
14. Which Vue directive is used to conditionally display an element?
    A. v-bind
    B. v-for
    C. v-model
    D. v-show

15. Which Vue directive is used to conditionally render an element?
    A. v-model
    B. v-bind
    C. v-if
    D. v-for

16. The v-bind directive is used to attach an HTML attribute to a data property.
    A. Yes
    B. No

17. Please explain and elaborate with example for "beforeCreate", "created", "beforeMount" and "mounted" lifecycle hook in a Vue component.

18. When switching from one component to another component in Vue, which lifecycle hook is fired on the removed component?

19. We can make a 'watcher' in Vue to monitor a data property and create side effects.
    A.  No, watchers can only monitor data properties, never create side effects
    B.  Yes, watchers are made to create side effects when a monitored data property reaches a certain point, that is the intention
    C.  There is no such thing as watchers in Vue.

20. To display the value from the data property 'message' inside a 'p' tag with text interpolation, what is the correct syntax?
`<p> xxx </p>`
    What is the correct syntax should be replace for xxx

21. What is the main purpose of the 'mounted' lifecycle hook in a Vue component?
    A. To perform side effects after the component has been inserted into the DOM
    B. To define computed properties
    C. To define the component's slots before the component is rendered
    D. To watch data property changes

22. Vue uses a file to initialize the root Vue instance and mount it to the DOM, what is the file's name?
    A.  views.js
    B.  config.js
    C.  settings.js
    D.  main.js

23. In order to reduce the amount of assets required to be downloaded for the initial render by rendering for large bundles, which among the following methods should you implement to achieve this?
    A. Data Pre-Fetching
    B. Code-Splitting
    C. Routing
    D. Server store fetching

24. A container of a certain size and an image bigger than it in both dimensions are given:
    ![Screenshot 2023-11-17 at 14.10.41](https://hackmd.io/_uploads/SJhl4K4E6.png)
    If an IMG tag has to be fitted inside the container and the image has to be made as large as possible, maintaining its aspect ratio, how can you achieve this using CSS?
    A. width: 100%; height: 100%;
    B. max-width: 100%; height: 100%;
    C. width: 100%; max-height: 100%;
    D. max-width: 100%; max-height: 100%;
    E. width: 100%; height: auto;
    F. width: auto; height: 100%;

25. Please state the advantages and disadvantages of loading CSS inline, embedded and from external files.

26. How can we make our website responsive using CSS?




# Answer Method
Please submit your answer by:
1. Create a new hackmd page and list down your answer.
2. Generate the hackmd url and share accordingly.






