---
# System prepended metadata

title: 新版前端面試問題 第二版
tags: [前端, 問題, 面試]

---

# 新版前端面試問題 第二版

### css 切版
- [codepen](https://codepen.io/wallasehuang/pen/GRjRxdJ?editors=1100)
- [桌面版畫面](https://app.zeplin.io/project/5aced2c1553bdae0669217ed/screen/5fbcd25c9e1eb9568f16f552)
- [手機版畫面](https://app.zeplin.io/project/5aced2c1553bdae0669217ed/screen/5fbcd25c25a53a57a35adf4f)


### 以一個畫面來說會如何切割 compoent
[會以 zeplin 的 pickone 搜尋畫面來作為例題](https://app.zeplin.io/project/5aced2c1553bdae0669217ed/screen/5e980aa54789ba53b35c829e)

- 怎麼切？結構設計？
- 如何設定 data?
- 如何設定 props?
- api 的呼叫？


### 同步與非同步解釋？使用情境？

### FizzBuzz 問題，針對自己寫的 code review
Write a program that outputs the string representation of numbers from 1 to n.

But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”. For numbers which are multiples of both three and five output “FizzBuzz”.

```javascript=
var FizzBuzz = function(n) {
    // some code.
}
```

```javascript=
var FizzBuzz = function(n) {
    let result = [];
    
    for(var i = 1; i <= n; i++) {
        result.push(i.toString())
        
        if(i%3 == 0) result[i-1] = 'Fizz'
        
        if(i%5 == 0) result[i-1] = 'Buzz'
        
        if(i%15 == 0) result[i-1] = 'FizzBuzz'
    }
    
    return result
}
```

```javascript=
var FizzBuzz = function(n) {
    let result = [];
    
    for(var i = 1; i <= n; i++) {
        result.push('');
        if(i%3 == 0) result[i-1] += 'Fizz'
        
        if(i%5 == 0) result[i-1] += 'Buzz'
        
        if(result[i-1].length == 0) result[i-1] = i.toString()
    }
    
    return result
}
```

### 前端效能優化問題（各項目優化著手）如何衡量效能優化是否有效？

###### tags: `前端` `面試` `問題`