标签搜索
全栈-03-前端-1
程序员的自留地

全栈-03-前端-1

fiora
2026-10-21 / 0 评论 / 8 阅读
本段 585 题 | 来源:fullstack + general + design | 知识点:前端

1. 全栈开发者常用的热门语言是什么?

  • 知识点: 前端 / 后端 / 算法与数据结构 / 编程语言基础 (主题: javascript;标签: fullstack, javascript, backend-languages)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 695cc0351da553795622a79a | 官方: 是 | 付费: 否

答案:

TL;DR全栈需要前端的 HTML(HyperText Markup Language)/CSS(Cascading Style Sheets)/JavaScript,同时也要掌握若干后端语言(Backend Language);由于 Node.js 普及,JavaScript 常被认为是最流行的全栈语言之一。
全栈开发者需要同时精通前端(Frontend)与后端(Backend)开发,因此候选人需要熟悉 HTML(HyperText Markup Language)、CSS(Cascading Style Sheets)、JavaScript 等脚本语言(Scripting Language)。
除此之外,他们还需要掌握至少两到三种后端语言(backend language),例如 C++、C#、Java、Python、Ruby、PHP 等。不过,许多企业使用 Node.js 进行开发,使得 JavaScript 成为最受欢迎的语言之一。

2. 全栈程序员(full-stack programmer)的主要职责有哪些?

  • 知识点: 前端 / 后端 / 算法与数据结构 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: fullstack, responsibilities, frontend, backend)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 695cc0351da553795622a7e1 | 官方: 是 | 付费: 否

答案:

TL;DR全栈开发者(full-stack developer)负责从前端 UI(front-end UI)到后端服务(backend service)、集成(integration)、测试(testing)、调试(debugging)、协作(collaboration)以及持续学习新技术,确保应用稳定交付。
这是一道常见的全栈开发(full-stack development)面试题(interview question)。招聘方希望评估你对全栈开发及其职责的理解。你可以先解释全栈开发的概念,然后说明职责:

  • 设计与开发用户界面(UI)
  • 编写应用的服务端代码
  • 通过 API 与其他集成方式连接前端与后端
  • 测试 Web 应用以满足功能与性能要求
  • 出现问题时进行排查与调试
  • 与跨职能团队成员协作
  • 持续学习新技术与编程语言,确保应用采用最新最佳实践开发

3. 什么是 MEAN Stack?

  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 (主题: nodejs;标签: mean, mongodb, express, angular, nodejs)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 695cc0361da553795622a8f1 | 官方: 是 | 付费: 否

答案:

TL;DRMEAN 是 MongoDB、Express.js、AngularJS、Node.js 的组合,是基于 JavaScript 的全栈技术栈(full-stack technology stack),用于开发云端应用(cloud application)。
MEAN 是一种新的技术栈(technology stack),代表 MongoDB、Express.JS、Angular.JS 和 Node.Js。它是一个基于 JavaScript 的栈,用于开发云就绪(cloud-ready)的应用。它为构建动态网站(dynamic website)和应用提供从前端到后端的一站式解决方案,并因易用、开源(open-source)而流行。

4. What is the difference between responsive and adaptive design?

响应式设计和自适应设计有什么区别?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700624 | 官方: 是 | 付费: 否

答案:

Responsive and adaptive design is used to create websites that work smoothly across multiple devices. Both design techniques provide a better user interface but have many differences.

响应式和自适应设计用于创建能在多种设备上流畅运行的网站。这两种设计技术都提供了更好的用户界面,但有许多不同之处。

A responsive design technique that involves designing a website layout adjusts that can adjust to any screen size. This means the website will look and function well on any device, whether a large desktop computer or a mobile phone. Responsive design relies on fluid grids to resize and rearrange the layout based on percentage values.

响应式设计是一种涉及网站布局调整的设计技术,该布局可以适应任何屏幕尺寸。这意味着无论在大桌面电脑还是手机上,网站都能良好地显示和运行。响应式设计依赖于流体网格,根据百分比值调整和重新排列布局。

On the other hand, adaptive design is a design approach where a website is designed to have multiple layouts. Each layout is optimized for a specific screen size or device type. When users visit the website, it detects their device and displays the appropriate layout. Adaptive design uses fixed layout sizes for specific screen dimensions. This approach requires developers to create multiple layouts that correspond to predefined screen sizes or device capabilities.

另一方面,自适应设计是一种设计方法,其中网站被设计为具有多种布局。每种布局都针对特定的屏幕尺寸或设备类型进行优化。当用户访问网站时,它会检测他们的设备并显示相应的布局。自适应设计使用针对特定屏幕尺寸的固定布局尺寸。这种方法要求开发人员创建多个布局,这些布局对应于预定义的屏幕尺寸或设备功能。

5. What do you mean by data attributes?

数据属性是什么意思?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700628 | 官方: 是 | 付费: 否

答案:

A data attribute is a data field that defines the characteristics or features of a data object. It mostly exists in a table format but can also refer to special values for objects in programming languages. In a word, data attributes are simply data that describe other data.

数据属性是定义数据对象特征或特点的数据字段。它通常以表格格式存在,但也可以指编程语言中对象的特殊值。简而言之,数据属性就是描述其他数据的数据。

Example:

示例:

6. What is a web server?

什么是Web服务器?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870062c | 官方: 是 | 付费: 否

答案:

A web server is a computer that stores, processes, and delivers website content to browsers. When a user makes a request to the browser, it responds to the requests using HTTP and other protocols.

Web服务器是一种存储、处理和向浏览器提供网站内容的计算机。当用户向浏览器发出请求时,它使用HTTP和其他协议响应这些请求。

A web server is a combination of hardware and software. The hardware allows the exchange of data to the devices that make a request, while the software controls how the user can access the stored files.

Web服务器是硬件和软件的组合。硬件允许向发出请求的设备进行数据交换,而软件控制用户如何访问存储的文件。

7. Why is RESTful API a popular choice in web development?

为什么RESTful API在Web开发中很受欢迎?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700640 | 官方: 是 | 付费: 否

答案:

RESTful API is a popular choice in web development due to its several beneficial features and design principles that enhance the efficiency and maintainability of web services. Some of these features include Stateless, Scalable and performant, Cacheable, among others.

RESTful API在Web开发中很受欢迎,因为它具有若干有益的特性和设计原则,这些特性和原则增强了Web服务的效率和可维护性。其中一些特性包括无状态、可扩展性和高性能、可缓存等。

RESTful API is designed to be stateless, meaning each request sent from the client to the server must contain all necessary information for the server to process it. This prevents the server from having to maintain client state between requests, which simplifies the server's architecture and enhances scalability.

RESTful API被设计为无状态的,意味着从客户端发送到服务器的每个请求必须包含服务器处理它所需的所有必要信息。这防止了服务器在请求之间维护客户端状态,从而简化了服务器的架构并增强了可扩展性。

The stateless nature of RESTful API allows for better load balancing, horizontal scaling, and improved performance, as servers can more easily distribute the workload without the need to coordinate client states.

RESTful API的无状态特性允许更好的负载均衡、水平扩展和改进的性能,因为服务器可以更容易地分配工作负载,而无需协调客户端状态。

8. Explain long polling.

解释长轮询。
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700648 | 官方: 是 | 付费: 否

答案:

Long polling is a method used for getting a stable server connection without using protocols such as WebSocket or Server-Side Events. In the conventional client-server model, this method is at the top. In Node.js, the same technique is called the next development model.

长轮询是一种无需使用WebSocket或服务器推送事件等协议即可获得稳定服务器连接的方法。在传统的客户端-服务器模型中,此方法处于顶层。在Node.js中,相同技术被称为下一代开发模型。

The functioning of this method includes the sending of requests from the client to the server, with the server responding till the connection with new and unique information opens. When the server responds, the client can submit a request to the server. The server returns a query when there is data available. The function takes place when the application of the client and the requests of the server end.

此方法的运作包括客户端向服务器发送请求,服务器在连接打开时以新的且独特的信息进行响应,直到连接关闭。当服务器响应时,客户端可以再次向服务器提交请求。当有可用数据时,服务器返回查询。该过程在客户端应用和服务器请求结束时完成。

9. What is type coercion in JavaScript?

JavaScript中的类型强制转换是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700650 | 官方: 是 | 付费: 否

答案:

Type coercion in JavaScript is the automatic conversion of a value from one data type to another, typically while performing a specific operation or while comparing values. JavaScript attempts to convert one or both of the operands to a compatible type in order to complete the operation.

JavaScript中的类型强制转换是将值从一种数据类型自动转换为另一种数据类型,通常在执行特定操作或比较值时发生。JavaScript尝试将一个或两个操作数转换为兼容类型以完成操作。

10. What are the advantages of using Python language?

使用Python语言有哪些优点?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870065c | 官方: 是 | 付费: 否

答案:

Python is a high-level programming language with simple syntax making it easier for newbies.

Python是一种高级编程语言,语法简单,使新手更容易上手。

The advantages of Python are:

Python的优点包括:
  • Easy implementation: Python is relatively easy to learn and write compared to other programming languages such as Java and C++.
  • Extensive support libraries: It has Pandas for data analytics, NumPy for numerical calculations, etc.
  • Free and open-source: Python is a free and open-source language with a large active community base.
  • Dynamically typed language: We don't need to mention data type in Python; it automatically takes the data type.
  • Vast libraries support: Python has rich and efficient libraries making it easier for developers.
  • Interpreted language: Python is an interpreted language with line-by-line code execution, contributing to easier debugging and portability.
  • Suitable for data analysis: It helps data scientists easily simplify complex numeric computing operations.

11. How do you ensure data security in your applications?

你如何确保应用程序中的数据安全?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700664 | 官方: 是 | 付费: 否

答案:

Data security is important to protect sensitive information, maintain trust, comply with regulations, and avoid financial losses. You can take several measures to ensure data security while developing applications.

数据安全对于保护敏感信息、维护信任、遵守法规和避免财务损失至关重要。在开发应用程序时,你可以采取多种措施来确保数据安全。

Use secure coding practices: Develop applications using secure coding practices, such as input validation, access controls, and handling errors.

使用安全编码实践:使用安全编码实践开发应用程序,例如输入验证、访问控制和错误处理。

Encrypt data in transit and at rest: Use encryption to protect data during transmission and when stored in databases. This can help protect against data breaches and unauthorized access.

加密传输中及存储中的数据:使用加密技术在传输过程中和存储在数据库中时保护数据。这有助于防止数据泄露和未经授权的访问。

Implement strong authentication: Use robust authentication techniques to ensure only authorized users can access sensitive data.

实施强身份验证:使用强大的身份验证技术,确保只有授权用户才能访问敏感数据。

Perform regular security testing: Conduct regular security testing, such as vulnerability assessments and penetration testing, to identify and address potential security risks before they can be exploited.

定期进行安全测试:定期进行安全测试,例如漏洞评估和渗透测试,以在潜在安全风险被利用之前识别和解决它们。

Follow industry best practices: Following industry best practices, such as instructions provided by the organization and adherence to govt regulations to ensure that your applications are secure, efficient, and sustainable.

遵循行业最佳实践:遵循行业最佳实践,例如组织提供的指导和遵守政府法规,以确保你的应用程序安全、高效且可持续。

12. Can you explain the concept of microservices architecture?

你能解释微服务架构的概念吗?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870066c | 官方: 是 | 付费: 否

答案:

Microservices architecture is a design pattern that involves building an application as a collection of small, loosely coupled, independently deployable services. Each service is focused on a specific business capability and can be developed, tested, and deployed independently. This pattern improves scalability, resilience, and enables faster development cycles, but comes with added complexity in areas such as coordination, service communication, and data synchronization among microservices.

微服务架构是一种设计模式,涉及将应用程序构建为小型、松散耦合、可独立部署的服务的集合。每个服务专注于特定的业务能力,可以独立开发、测试和部署。这种模式提高了可扩展性、弹性,并实现更快的开发周期,但在微服务之间的协调、服务通信和数据同步等方面增加了复杂性。

13. What is the box model in CSS?

CSS 中的盒子模型是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700670 | 官方: 是 | 付费: 否

答案:

The box model in CSS is a fundamental concept that describes how elements are displayed on a webpage. It comprises four main components: content, padding, border, and margin.

CSS 中的盒子模型是一个基本概念,描述了元素在网页上如何显示。它由四个主要组件组成:内容、内边距、边框和外边距。

The content area is the part of the element that holds the text or images. The padding is the space between the content and the border of the element. The border is the line around the padding, and the margin is the space between the border and the outside of the element.

内容区域是元素中容纳文本或图像的部分。内边距是内容与元素边框之间的空间。边框是围绕内边距的线条,外边距是边框与元素外部之间的空间。

Each of these parts contributes to the total size of the element. You must keep in mind when designing and laying out a webpage.

这些部分中的每一部分都影响元素的整体大小。在设计和布局网页时,你必须牢记这一点。

14. What is lazy loading in angular?

Angular 中的懒加载是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700674 | 官方: 是 | 付费: 否

答案:

Lazy loading in Angular is a technique that helps you improve an app's performance and speed. This approach involves loading necessary components or modules rather than loading everything upfront.

Angular 中的懒加载是一种有助于提升应用性能和速度的技术。这种方法涉及按需加载必要的组件或模块,而不是一开始就加载所有内容。

Lazy loading is useful for larger applications with many modules and components since it allows you to break your application into smaller parts and load them on demand.

懒加载对于具有许多模块和组件的大型应用非常有用,因为它允许你将应用拆分为更小的部分并按需加载它们。

15. What is the extract function in PHP?

PHP 中的 extract 函数是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870067f | 官方: 是 | 付费: 否

答案:

The extract function is an inbuilt function in PHP. It is used to import variables into the local table from an array. The symbol table is a data structure that contains all available variables and their values.

extract 函数是 PHP 中的一个内置函数。它用于将数组中的变量导入到本地变量表中。符号表是一种数据结构,包含所有可用变量及其值。

It helps to access array values as individual variables instead of accessing them using the array syntax. However, we should use the extract function carefully, as it can lead to naming conflicts if used incorrectly.

它有助于将数组值作为单独变量访问,而无需使用数组语法。然而,我们应该谨慎使用 extract 函数,因为如果使用不当,可能导致命名冲突。

16. How do we use the alt attribute on images?

我们如何在图像上使用 alt 属性?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700684 | 官方: 是 | 付费: 否

答案:

We use the "alt" attribute on images to provide alternative information for an image in case the user can't see the image for some reason, such as a poor internet connection or an error in the src attribute. The alt text should describe the image for users to understand the context of the image.

我们在图像上使用“alt”属性,以便在用户因某些原因(如网络连接不佳或 src 属性错误)无法看到图像时提供替代信息。alt 文本应描述图像,以便用户理解图像的上下文。

17. Distinguish between Hashtable and HashMap.

区分 Hashtable 和 HashMap。
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700688 | 官方: 是 | 付费: 否

答案:

TL;DR题目原文仅提供了对比图示。

18. What is a Java Applet?

什么是 Java Applet?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870068c | 官方: 是 | 付费: 否

答案:

A Java applet is a small, executable program designed to be run in a web browser. We use applets to make the website and web applications more dynamic and interactive. Applets can be embedded into HTML pages using the APPLET or OBJECT tag and are executed in the Java Virtual Machine (JVM) installed on the user's computer.

Java Applet 是一个小的可执行程序,设计用于在 Web 浏览器中运行。我们使用 Applet 使网站和 Web 应用更加动态和交互。Applet 可以使用 APPLET 或 OBJECT 标签嵌入到 HTML 页面中,并在用户计算机上安装的 Java 虚拟机 (JVM) 中执行。

19. What is "Scope" in AngularJS?

什么是 AngularJS 中的“作用域”?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700690 | 官方: 是 | 付费: 否

答案:

The scope in AngularJS is an object that binds the view (HTML) and the controller (JavaScript) together. It is a JavaScript object that contains application data and methods related to a specific part of the application. It acts as a context for evaluating expressions and enables the component to communicate with the rest of the application.

AngularJS 中的作用域是一个将视图(HTML)和控制器(JavaScript)绑定在一起的对象。它是一个包含与应用程序特定部分相关的数据和方法的 JavaScript 对象。它充当表达式求值的上下文,并使组件能够与应用程序的其余部分通信。

20. What is V8?

什么是 V8?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700694 | 官方: 是 | 付费: 否

答案:

V8 is an open-source JavaScript engine developed by Google and based on C++. It implements the JavaScript language according to the ECMAScript specification and provides a runtime environment for executing JavaScript code. V8 engine is used in various applications, including the Google Chrome web browser and the Node.js runtime environment.

V8 是由 Google 开发、基于 C++ 的开源 JavaScript 引擎。它根据 ECMAScript 规范实现 JavaScript 语言,并提供执行 JavaScript 代码的运行时环境。V8 引擎用于多种应用程序,包括 Google Chrome 网页浏览器和 Node.js 运行时环境。

The most important feature of V8 is it is independent of the browser in which it runs. It enabled Node.Js developers to choose the V8 engine to execute JavaScript code on the server side, which led to the popularity of Node.Js.

V8 最重要的特点是它独立于其运行的浏览器。这使得 Node.js 开发者能够选择 V8 引擎在服务器端执行 JavaScript 代码,从而促进了 Node.js 的流行。

21. What is WebP?

什么是 WebP?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c8700698 | 官方: 是 | 付费: 否

答案:

WebP is a modern image format developed by Google. It uses lossy and lossless compression techniques to provide smaller images for websites while maintaining a high-quality visual experience.

WebP 是由 Google 开发的现代图像格式。它使用有损和无损压缩技术,为网站提供更小的图像,同时保持高质量的视觉体验。

It significantly decreases the page loading time and improves user experience. WebP images are about 25-34% smaller than PNG or JPEG images.

它显著减少了页面加载时间并改善了用户体验。WebP 图像比 PNG 或 JPEG 图像小约 25-34%。

22. What is "State" in React?

React 中的“状态”是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c870069d | 官方: 是 | 付费: 否

答案:

The "State" is a built-in React object that stores values that can change over time in response to user actions or other events. We can use it to store and manage dynamic values that affect the behavior of a component.

“状态”是一个内置的 React 对象,用于存储随时间变化的值,以响应用户操作或其他事件。我们可以使用它来存储和管理影响组件行为的动态值。

23. What is jQuery, and what are its features?

什么是 jQuery,它有哪些特性?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006a1 | 官方: 是 | 付费: 否

答案:

jQuery is a lightweight and fast JavaScript library created to simplify using JavaScript for web development. It allows us to save a lot of time by reducing the code.

jQuery 是一个轻量且快速的 JavaScript 库,旨在简化 Web 开发中的 JavaScript 使用。它通过减少代码量帮助我们节省大量时间。

It has the following features:

它具有以下特性:
  • HTML/DOM manipulation
  • Cross-Browser Compatibility
  • CSS manipulation
  • HTML event methods,
  • Effects and animations
  • AJAX Support
  • Plugins

24. What is namespace in C#?

C# 中的命名空间是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006a5 | 官方: 是 | 付费: 否

答案:

Namespace is a keyword used to declare a scope that holds a set of related classes and types and provides a way to organize code into logical groups. It also gives unique class names, allowing you to assign the same class name in different namespaces.

命名空间是一个关键字,用于声明包含一组相关类和类型的范围,并提供一种将代码组织到逻辑组中的方法。它还提供唯一的类名,允许你在不同命名空间中分配相同的类名。

25. What is hoisting in JavaScript?

JavaScript 中的提升是什么?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006a9 | 官方: 是 | 付费: 否

答案:

Hoisting is a JavaScript feature to move the declarations of a variable, function, or class at the top of their scope before code execution. It allows us to use a variable or function even before declaring it. However, we should remember that this JavaScript feature applies to declarations only and not initializations.

提升(Hoisting)是 JavaScript 的一项特性,它在代码执行前将变量、函数或类的声明移动到其作用域的顶部。它允许我们在声明变量或函数之前就使用它们。然而,我们应该记住,这个 JavaScript 特性仅适用于声明,而不适用于初始化。

26. What is backtracking, and why do we use it?

什么是回溯(backtracking),我们为什么使用它?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006ad | 官方: 是 | 付费: 否

答案:

Backtracking is an algorithmic strategy for solving problems. It uses recursive calling to find a solution by increasing values with time. Backtracking is also considered an upgrade to the brute force approach. We can write algorithms using this technique.

回溯是一种用于解决问题的算法策略。它通过递归调用,并随时间增加数值来寻找解决方案。回溯也被视为暴力求解方法的升级版。我们可以使用这种技术编写算法。

We apply a backtracking algorithm for some specific problem types.

我们将回溯算法应用于某些特定类型的问题。

Decision problem: We use this type to find a feasible solution to the problem.

决策问题:我们使用这种类型来找到问题的可行解。

Optimization problem: We use this to find the best solution for a problem.

优化问题:我们使用这种类型来找到问题的最佳解。

Enumeration problem: We try to find all feasible solutions to the problem.

枚举问题:我们尝试找到问题的所有可行解。

27. What is double brace initialization, and what are its advantages?

什么是双花括号初始化(Double Brace initialization),它有什么优点?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006b1 | 官方: 是 | 付费: 否

答案:

Double Brace initialization is a way of initializing an anonymous inner class in Java. The first braces create an anonymous inner class, whereas the second braces act as instance initializers.

双花括号初始化是在 Java 中初始化匿名内部类的一种方式。第一组花括号创建匿名内部类,而第二组花括号充当实例初始化器。

Advantages of Double Brace Initialization

双花括号初始化的优点
  • This process requires fewer lines of code than other initialization methods
  • The code is more readable
  • We can create and initialize code in the same expression

28. What is the difference between the “SendRedirect” and the “Forward” method in Java?

在 Java 中,“SendRedirect” 和 “Forward” 方法有什么区别?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006b5 | 官方: 是 | 付费: 否

答案:

TL;DR题目原文仅提供了对比图示。

29. What is a JavaScript Promise, and what are its different states?

什么是 JavaScript Promise,它有哪些不同的状态?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006b9 | 官方: 是 | 付费: 否

答案:

A JavaScript promise is an object that represents the eventual completion (or failure) of an asynchronous operation. Promises make managing multiple async operations easier and handling errors better than callbacks or events. A Promise object can be in three states: pending, fulfilled, or rejected.

JavaScript promise 是一个对象,它表示异步操作的最终完成(或失败)。Promise 使得管理多个异步操作和错误处理比回调或事件更简单。Promise 对象可以有三种状态:待定(pending)、已完成(fulfilled)或已拒绝(rejected)。
  • Pending: Initial state, neither completed nor rejected
  • Fulfilled: The operation is completed successfully
  • Rejected: The operation has failed

30. What is a Request Dispatcher?

什么是请求分发器(Request Dispatcher)?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006bd | 官方: 是 | 付费: 否

答案:

A Request Dispatcher is an interface in Java Servlets used to forward a client request to a resource or include the output of another resource in the response. It helps to divide a web application into small modular components, making it easier to maintain.

请求分发器是 Java Servlet 中的一个接口,用于将客户端请求转发到资源,或将另一个资源的输出包含在响应中。它有助于将 Web 应用程序划分为小的模块化组件,使其更易于维护。

31. What are the applications of Python?

Python 的应用有哪些?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006c1 | 官方: 是 | 付费: 否

答案:

Python is a general-purpose language with a wide range of applications. It has many frameworks and libraries that allow us to develop a wide range of applications. Here are some of the major applications of Python.

Python 是一种通用型语言,应用范围广泛。它拥有许多框架和库,使我们能够开发各种应用程序。以下是 Python 的一些主要应用。

Python is a general-purpose language with a wide range of applications. It has many frameworks and libraries that allow us to develop a wide range of applications. Here are some of the major applications of Python.

Python 是一种通用型语言,应用范围广泛。它拥有许多框架和库,使我们能够开发各种应用程序。以下是 Python 的一些主要应用。

and numeric computing (NumPy, Pandas, SciPy)

以及数值计算(NumPy、Pandas、SciPy)

(TensorFlow, Keras, PyTorch, and SciPy)

(TensorFlow、Keras、PyTorch 和 SciPy)
  • Network programming (Scapy and Twisted)
  • Automation and system administration (Ansible, Fabric)
  • Game development (Pygame)
  • Graphical user interface

applications (PyQt, wxPython)

应用程序(PyQt、wxPython)

32. What are the differences between static and volatile variables in Java?

Java 中静态变量和易变变量有什么区别?
  • 知识点: 前端 / 后端 / 数据库 / 算法与数据结构 / UI/UX 设计 (主题: javascript, typescript, react, nodejs, database, api-design;标签: Senior Full-Stack)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69646d35a9243c30c87006c5 | 官方: 是 | 付费: 否

答案:

TL;DR题目原文仅提供了对比图示。

33. 什么是 JSX?

  • 知识点: 前端 (主题: react, jsx, javascript, frontend;标签: JSX, React.createElement, React Elements, JavaScript)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69675f4afa809e6d38a91b5e | 官方: 是 | 付费: 否

答案:

答案
JSX 是 JavaScript 的一种语法扩展(syntax extension),并且拥有 JavaScript 的完整能力。JSX 会生成 React “elements”。你可以在 JSX 中通过花括号包裹的方式嵌入任何 JavaScript 表达式(expression)。编译之后,JSX 表达式会变成普通的 JavaScript 对象(object)。这意味着你可以在 if 语句和 for 循环中使用 JSX,把它赋值给变量,把它作为参数传入,并且从函数中返回它。尽管 React 并不要求必须使用 JSX,但它是推荐的方式,用来描述 React 应用中的 UI(user interface)。

例如:下面是 React 中使用 JSX 编写一个基础 element 的语法,以及不使用 JSX 时的等价写法。

const element = (

const element = (

>

Hello, world! > 你好,世界!


);

等价写法(使用 React.createElement):

const element = React.createElement(

const element = React.createElement(
'h1',
'h1',
{ "className": "greeting" },
{ "className": "greeting" },
'Hello, world!'
'你好,世界!'
);

34. 什么是 ReactDOM?ReactDOM 和 React 的区别是什么?

  • 知识点: 前端 (主题: react, react-dom, frontend;标签: ReactDOM, Mounting, findDOMNode, React)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69676955fa809e6d38aabe5a | 官方: 是 | 付费: 否

答案:

答案
在 v0.14 之前,所有 ReactDOM 的功能都是 React 的一部分。但之后,React 和 ReactDOM 被拆分成两个不同的库(library)。

顾名思义,ReactDOM 是 React 与 DOM(document object model)之间的“胶水”。通常我们只会用它来做一件事:使用 ReactDOM 进行挂载(mounting)。ReactDOM 的另一个有用特性是 ReactDOM.findDOMNode(),我们可以用它来直接访问某个 DOM 元素。

除此之外的内容,就是 React 的职责了。我们使用 React 来定义和创建 elements、使用生命周期 hooks(lifecycle hooks)等,也就是一个 React 应用的核心部分。

35. state 和 props 的区别是什么?

  • 知识点: 前端 (主题: react, state, props, frontend;标签: State, Props, Immutability, Default Props)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69676955fa809e6d38aabe67 | 官方: 是 | 付费: 否

答案:

答案
state 是一种数据结构,当组件挂载(mounts)时以一个默认值开始。它会随着时间变化而被修改,通常是由于用户事件(user events)导致的。

props(properties 的缩写)是组件的配置(configuration)。props 是组件之间通信的方式。它们从父组件(parent component)传入,并且就接收它们的组件而言是不可变的(immutable)。组件不能修改自己的 props,但它负责把 props 组装起来并传递给其子组件(child components)。props 不一定只是数据——回调函数(callback functions)也可以作为 props 传入。

还有一种情况是我们可以设置 default props(默认属性),这样即使父组件没有往下传 props,也能让 props 被设置为默认值(default values)。

补充说明:Props 和 State 做的事情类似,但使用方式不同。大多数组件可能都是无状态的(stateless)。Props 用于把数据从父组件传到子组件,或由组件本身传递;它们是不可变的(immutable),因此不会被改变。State 用于可变数据(mutable data),或者会变化的数据,这对用户输入(user input)尤其有用。

示例代码片段(code snippet):

class SearchBar extends Component {

class SearchBar extends Component {
constructor(props) {
constructor(props) {
super(props);
super(props);
this.state = { term: '' };
this.state = { term: '' };
}

render() {

render() {
return (
return (
>
value={this.state.term} onChange={event => this.onInputChange(event.target.value)} /> > onChange={event => this.onInputChange(event.target.value)} />

);
}

onInputChange(term) {

onInputChange(term) {
this.setState({ term });
this.setState({ term });
this.props.onSearchTermChange(term);
this.props.onSearchTermChange(term);
}
}

36. 什么是受控组件(controlled component)?

  • 知识点: 前端 (主题: react, forms, frontend;标签: Controlled Component, Forms, onChange, State)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: fullstack
  • id: 69676956fa809e6d38aabfeb | 官方: 是 | 付费: 否

答案:

答案
在 HTML 中,表单元素(form elements)(例如 、