matlab火炮射击问题_15个快速射击前端面试问题

matlab火炮射击问题

重点 (Top highlight)

HTML中的DOM是什么? (What is the DOM in HTML?)

The Document Object Model (DOM) is a programming interface for HTML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects.

文档对象模型(DOM)是HTML文档的编程接口。 它代表页面,以便程序可以更改文档的结构,样式和内容。 DOM将文档表示为节点和对象。

spandiv什么区别? (What is the difference between span and div?)

span is an inline element

span是内联元素

div is a block element

div是一个块元素

Divs should be used to wrap sections of a document, while spans should be used to wrap small portions of text, images, etc.

Divs应该用于包装文档的各个部分,而spans应该用于包装文本,图像等的一小部分。

Bonus point, it is illegal to place a block-level element within an inline element.

奖励点是,将块级元素放入内联元素中是非法的。

Example:

例:

<div>Hi<span>I'm the start of the span element <div>I'm illegal</div> I'm the end of the span</span> Bye I'm the end of the div</div>

什么是元标记? (What are Meta Tags?)

Meta tags are snippets of text that describe a page’s content; the meta tags don’t appear on the page itself, but only in the page’s source code.

元标记是描述页面内容的文本片段; 元标记不会显示在页面本身上,而只会显示在页面的源代码中。

Meta tags are essentially little content descriptors that help tell search engines what a web page is about.

元标记本质上是很少的内容描述符,可帮助告诉搜索引擎网页的含义。

Examples:

例子:

<head>
<meta charset="UTF-8">
<meta name="description" content="Description search engines use">
<meta name="keywords" content="Keywords, of, your, page">
<meta name="author" content="Me">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

CSS中的ID选择器和Class选择器有什么区别? (What is the difference between an ID selector and the Class selector in CSS?)

IDs are unique. Each element can have only one ID and the HTML page can only have one element with that ID

ID是唯一的。 每个元素只能有一个ID,HTML页面只能有一个具有该ID的元素

Classes are not unique. You can use the same class on multiple elements and an element can have many classes.

不是唯一的。 您可以在多个元素上使用同一类,并且一个元素可以具有多个类。

Any styling information that needs to be applied to multiple objects on a page should be done with a class.

任何需要应用于页面上多个对象的样式信息都应使用一个类来完成。

您如何应用特定于媒体CSS规则? (How could you apply CSS rules specific to a media?)

The @media rule is used in media queries to apply different styles for different media types/devices.

@media规则在媒体查询中用于为不同的媒体类型/设备应用不同的样式。

Example:

例:

/* Change the background color of the any <div> element to "red" when the browser window is 600px wide or less */
@media only screen and (max-width: 600px) {
div {
background-color: red;
}
}

在CSS中,什么是伪类? (In CSS what are Pseudo-classes?)

A Pseudo class in CSS is used to define the special state of an element. It can be combined with a CSS selector to add an effect to existing elements based on their states.

CSS中的伪类用于定义元素的特殊状态。 可以将其与CSS选择器结合使用,以根据其状态为现有元素添加效果。

Example(s):

例子):

/* 
Any <a> element which the user's pointer is hovering will go green
*/
a:hover {
color: green;
}/* Selects any <a> that has been visited and makes the text purple*/
a:visited {
color: purple;
}

Bonus point can they name any? It’s quite a big list https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

奖励积分他们能说什么吗? 这是一个很大的列表https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

相对,固定,绝对和静态放置的元素有什么区别? (What’s the difference between a relative, fixed, absolute and statically positioned element?)

  • Relative the element is positioned relative to its normal position.

    对于元素相对于其正常位置定位。

  • Fixed the element is positioned related to the browser window.

    修复了元素与浏览器窗口相关的位置。

  • Absolute the element is positioned absolutely to its first positioned parent.

    绝对元素绝对定位到其第一个定位的父级。

  • Static this is the default value, all elements are in order as they appear in the document.

    静态的,这是默认值,所有元素均按其在文档中显示的顺序排列。

PUT和POST有什么区别? (What is the difference between PUT and POST?)

PUT: Replaces target resource with the request payload. Can be used to update or create a new resource.

PUT :用请求有效负载替换目标资源。 可用于更新或创建新资源。

POST: Performs resource-specific processing on the payload. Can be used for different actions including creating a new resource, uploading a file or submitting a web form.

POST :对有效负载执行特定于资源的处理。 可用于不同的操作,包括创建新资源,上传文件或提交Web表单。

Bonus point:

奖励积分:

One other difference is that PUT should be idempotent — multiple PUTs of the same data to the same URL should be fine, whereas multiple POSTs might create multiple objects or whatever it is your POST action does.

另一个不同之处在于,PUT应该是幂等的-将相同数据的多个PUT放入相同的URL应该没问题,而多个POST可能会创建多个对象,或者您的POST操作会执行任何操作。

长轮询,Websocket和服务器发送事件之间有什么区别? (What are the differences between Long-Polling, Websockets and Server-Sent Events?)

Long-polling opens an HTTP request and remains open until an update is received. Upon receiving an update, a new request is immediately opened awaiting the next update.

长轮询会打开HTTP请求,并保持打开状态,直到收到更新。 收到更新后,将立即打开一个新请求,等待下一次更新。

WebSockets The WebSocket protocol allows for constant, bi-directional communication between the server and client. For this test, Primus is used to abstract multiple implementations of the protocol.

WebSockets WebSocket协议允许服务器和客户端之间进行恒定的双向通信。 对于此测试,Primus用于抽象协议的多种实现。

Server-sent events rely on a long-lived HTTP connection, where updates are continuously sent to the client

服务器发送的事件依赖于长期存在的HTTP连接,在该连接中不断将更新发送给客户端

解释Cookie,会话存储和本地存储之间的区别吗? (Explain the difference between cookies, session storage, and local storage?)

Local Storage as it’s called its local storage for your browsers, it can save up to 10MB, Session Storage does the same, but as its name saying, it’s session based and will be deleted after closing your browser. Sessions storage saves less up to 5mb.

本地存储,因为它被称为浏览器的本地存储,它最多可以节省10MB会话存储也可以这样做,但是顾名思义,它是基于会话的,在关闭浏览器后将被删除。 会话存储最多可节省5mb。

Cookies are very tiny data storing in your browser, that can save up 4KB and can be accessed through server or browser both

Cookies是存储在浏览器中的非常小的数据,可以节省4KB,并且可以通过服务器或浏览器访问

什么是CORS? (What is CORS?)

CORS stands for Cross-Origin Resource Sharing.

CORS代表跨域资源共享。

CORS is a browser mechanism which enables controlled access to resources located outside of a given domain. It extends and adds flexibility to the same-origin policy

CORS是一种浏览器机制,可实现对位于给定域外部的资源的受控访问。 它扩展了同源策略,并增加了灵活性

什么是诺言? (What is a promise?)

They are used to handle asynchronous operations. They can handle multiple asynchronous operations easily and provide better error handling than callbacks and events.

它们用于处理异步操作。 它们可以轻松地处理多个异步操作,并且比回调和事件提供更好的错误处理。

许诺中有哪些不同的状态? (What are the different states in promises?)

A Promise has three states:

一个Promise具有三个状态:

  1. fulfilled: Action related to the promise succeeded

    实现 :与承诺有关的行动成功

  2. rejected: Action related to the promise failed

    被拒绝 :与承诺相关的操作失败

  3. pending: Promise is still pending i.e not fulfilled or rejected yet

    待处理 :承诺仍在处理中,即尚未实现或被拒绝

什么是JavaScript吊装? (What is Hoisting in JavaScript?)

Hoisting is the term used to describe the moving of variables and functions to the top of their (global or function) scope on where we define that variable or function.

吊装是一个术语,用于描述在定义变量或函数的位置将变量函数移至其(全局或函数)作用域的顶部。

JavaScript中的虚假值是什么? (What are the falsy values in JavaScript?)

Falsy values are values that when converted to boolean becomes false.

Falsy值是值,当转换成布尔变为

Any of the below:

以下任何一项:

'' 
0
null
undefined
NaN
false
-0
0n // BigInt, when used as a boolean, follows the same rule as a Number

结论 (Conclusion)

I’ve asked and been asked a mixture of the above questions in interviews. A combination of a coding challenge(s) with some quick-fire questions is a good way to see a candidates potential.

在面试中,我已经询问并被问及上述问题的混合体。 结合编码挑战和一些速发问题,是发现候选人潜力的好方法。

I think for frontend developer interviews you will need more JavaScript questions than above. Below are some JavaScript & TypeScript questions.

我认为,对于前端开发人员面试,您将需要比上述更多JavaScript问题。 以下是一些JavaScript和TypeScript问题。

JavaScript questions:

JavaScript问题:

TypeScript questions:

TypeScript问题:

I think also including questions on any relevant frameworks you use. Hope you’ve enjoyed reading

我认为还包括有关您使用的任何相关框架的问题。 希望你喜欢阅读

普通英语JavaScript (JavaScript In Plain English)

Did you know that we have three publications and a YouTube channel? Find links to everything at plainenglish.io!

您知道我们有三个出版物和一个YouTube频道吗? 在plainenglish.io上找到所有内容的链接!

翻译自: https://medium.com/javascript-in-plain-english/15-quick-fire-front-end-interview-questions-bb4d83d0817c

matlab火炮射击问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值