面试题目整理

2020-08-23  本文已影响0人  那个大螺丝

HTML题目

<header>  <nav> <section> <article> <aside> <figcaption> <figure> <footer>
<div> <h1>  <p>  <ul>  <table>

默认情况下,行内元素不会以新行开始(无法设置宽高上下外边距),而块级元素会新起一行)。
内联块同时具有区块和行内元素的特点(不会另起一行、但是可以设置宽高外边距)


CSS题目

:hover                   
:active                
:frist-child            
:last-child        
::before
::after
image.png
<div class="box">
  <div class="row">
    <span class="item"></span>
    <span class="item"></span>
    <span class="item"></span>
  </div>
  <div class="row">
    <span class="item"></span>
  </div>
  <div class="row">
     <span class="item"></span>
     <span class="item"></span>
  </div>
</div>
.box {
    display: flex;
    flex-wrap: wrap;
    width: 200px;
    height: 200px;
    background: #ccc;
    padding:10px;
    box-sizing: border-box;
}

.item{
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background: black;
}

.row{
    flex-basis: 100%;
    display:flex;
    align-items: center;
    justify-content: space-between;
}

.row:nth-child(2){
    justify-content: center;
}

.row:nth-child(3){
    justify-content: space-between;
}


JavaScript 题目

const arr = [1,2,3,4,5,1,2,3,4,7,8,9]
const arr2 = [...new Set(arr)]
const arr = [{a:1},{b:2},{c:3},{a:1},{d:4}]
const arr2= [... new Set(arr.map(item=>JSON.stringify(item)))].map(item=>JSON.parse(item))
const getData = async () => {
  const res1 = fetch('/author');
  const authorList = await res1.json();
  const res2 = await Promise.all(authorList.map(item=>fetch('/article?author='+item)))
  const articleList = await Promise.all(res2)
}
const getData = async () => {
  const res1 = fetch('/author');
  const authorList = await res1.json();
  const res2 = await Promise.all(authorList.map(item=>fetch('/article?author='+item)))
  const articleList = await Promise.all(res2)
}

React 题目


算法题目

const obj = {
  '0': { key1: 1, key2: 2, key3: 3, key4: 4, key5: 5, },
  '1': { key1: 11, key2: 12, key3: 13, key4: 14, key5: 15, },
  '2': { key1: 21, key2: 22, key3: 23, key4: 24, key5: 25, },
  '3': { key1: 31, key2: 32, key3: 33, key4: 34, key5: 35, },
}

// 转化以下格式
[ 'key1', 'key2', 'key3', 'key4', 'key5' ]
[
  [ 1, 2, 3, 4, 5 ],
  [ 11, 12, 13, 14, 15 ],
  [ 21, 22, 23, 24, 25 ],
  [ 31, 32, 33, 34, 35 ]
]

// 解答
const header  = Object.keys(obj[Object.keys(obj)[0]])
const body = Object.values(obj).map(item=>Object.values(item))


项目规划题目 (高级工程师的问题)


90%以上,并且能回答高级工程问题的,可以定位高级工程师
80%-90%为中级工程师,90%以上但是不能回答高级工程师的问题的
60% - 80 % 初级工程师
60%以下,待定吧,这套题目不太复杂。

上一篇下一篇

猜你喜欢

热点阅读