本段 30 题 | 来源:backend + general + design | 知识点:前端
1. What is Atlassian’s role overview and engineering culture like for software engineers?
对于软件工程师来说,Atlassian 的职位概览和工程文化是怎样的?
- 知识点: 前端 / DevOps/云 / 编程语言基础 / 行为与软技能 (主题: java, kotlin, react, cicd;标签: Culture, Team Anywhere, Open company, no BS)
- 类型: behavioral | 难度: easy | 子类型: behavioral
- 分类: general
- 公司: Atlassian
- id: 6979de4fc8f1f94b6462c722 | 官方: 是 | 付费: 否
答案:
日常节奏通常包括 stand-up(每日站会)、用 Java/Kotlin(科特林)写后端服务、用 React(反应)做前端体验、通过 Bitbucket Pipelines(比特桶流水线)等 CI/CD(持续集成/持续部署)流程发布。团队大量使用 Confluence(汇合)异步协作,代码评审很重视,强调 “Open company, no BS”。Team Anywhere(团队任意位置)支持分布式办公,但同时要求更强的自主性与 Ownership(主人翁意识):能独立推进,也能对结果负责。
2. 请解释TypeScript中的内存管理机制,以及如何避免内存泄漏。
- 知识点: 前端 (主题: typescript;标签: canva, generated)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: backend
- 公司: 可画
- id: 69b379d258d557c902ba02dd | 官方: 是 | 付费: 是
答案:
思路分析从语言的内存模型出发,讨论堆栈分配、垃圾回收(如适用)、常见泄漏模式。
参考答案不同语言有不同的内存管理方式。需要了解对象生命周期、引用计数/GC(垃圾回收)机制、以及TypeScript特有的内存管理特性。
评分要点- 对语言内存模型的理解深度
- 实际调试内存问题的经验
- 性能优化相关知识
常见追问- 在Canva Editor(画布编辑器)的生产环境中如何监控内存使用? - 遇到过什么内存问题?如何解决的?
3. Why is it that a single serial port is controlled by a single interrupt-driven I/O (input/ output), but a front-end processor, such as a terminal concentrator, is managed by a polling I/O? Answer this in context to OS.
为什么单个串行端口由单个中断驱动的 I/O(输入/输出)控制,而前端处理器(如终端集中器)却由轮询 I/O 管理?请结合操作系统背景回答。
- 知识点: 前端 (标签: interviewbit, deloitte, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 德勤
- id: 69b37a6f58d557c902ba69df | 官方: 否 | 付费: 否
答案:
Interrupt is a hardware method by which a device alerts the CPU that it needs its attention. Interruptions might happen at any time. As a result, when the CPU receives an interrupt signal over the indicator interrupt-request line, it suspends the current process and responds to the interrupt by giving control to the interrupt handler, which serves the device. Polling is a procedure in which the CPU checks if the device requires attention on a regular basis. When a device tells the process unit that it wants hardware processing, the process unit polls the I/O device to see if it wants CPU processing. The CPU is constantly checking each and every device connected to it to see if any of them requires hardware attention.
中断是一种硬件方法,设备通过它提醒 CPU 需要注意。中断可能随时发生。因此,当 CPU 通过指示中断请求线收到中断信号时,它会暂停当前进程,并通过将控制权交给中断处理程序来响应中断,中断处理程序为设备提供服务。轮询是一种 CPU 定期检查设备是否需要关注的过程。当设备告诉处理单元它需要硬件处理时,处理单元轮询 I/O 设备以查看它是否需要 CPU 处理。CPU 不断检查连接到它的每一个设备,以查看是否有任何设备需要硬件关注。
A serial port may have a tiny number of I/O requests, and therefore, interrupts should be used whenever possible. Serial ports in a terminal concentrator are a different matter. A terminal concentrator has several serial ports, which can result in the formation of multiple brief I/O instances, which can increase the system's burden unnecessarily if interrupts are used. Instead, by looping through without the need for I/O, a polling loop can dramatically reduce the amount of burden on the system. Hence, polling is believed to be more efficient than interrupt-driven I/O when the I/O is frequent and of extremely short duration.
串行端口可能只有很少的 I/O 请求,因此应尽可能使用中断。终端集中器中的串行端口则不同。终端集中器有多个串行端口,这可能导致形成多个短暂的 I/O 实例,如果使用中断,可能会不必要地增加系统负担。相反,通过循环而不需要 I/O,轮询循环可以大幅减少系统负担。因此,当 I/O 频繁且持续时间极短时,轮询被认为比中断驱动的 I/O 更高效。
Therefore, we may conclude that interrupts are used for single ports because the frequency of I/O on such a port is low and can be managed successfully, whereas polling is used for many ports because the frequency of I/O grows and the duration is short, which suits polling.
因此,我们可以得出结论:中断用于单个端口,因为此类端口上的 I/O 频率较低且可以成功管理,而轮询用于多个端口,因为 I/O 频率增加且持续时间短,这适合轮询。
4. What do you mean by DOM (Data Object Model)?
你说的 DOM(数据对象模型)是什么意思?
- 知识点: 前端 (标签: interviewbit, intuit, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Intuit
- id: 69b37b6b58d557c902bb02d3 | 官方: 否 | 付费: 否
答案:
Document Object Model, or DOM represents the API (application programming interface) for your web documents (HTML or XML documents). Every time an update is made to the application, the DOM receives an update as well, making it possible for the user to view or visualize the changes. This feature enables you to dynamically access and modifies the structure, content, and style of a document.
文档对象模型(DOM)代表你的 Web 文档(HTML 或 XML 文档)的 API(应用程序编程接口)。每次对应用程序进行更新时,DOM 也会收到更新,使用户能够查看或可视化这些更改。此功能使你能够动态访问和修改文档的结构、内容和样式。
5. How is real DOM different from virtual DOM?
真实 DOM 与虚拟 DOM 有何不同?
- 知识点: 前端 (标签: interviewbit, intuit, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Intuit
- id: 69b37b6b58d557c902bb02d6 | 官方: 否 | 付费: 否
答案:
Every DOM object has a corresponding "virtual DOM object." Virtual DOM objects are lightweight copies of DOM objects, which can be updated without affecting the real DOM. Virtual DOM objects share the same properties as real DOM objects, but they do not possess the power to affect what appears on the screen as the real DOM does.
每个 DOM 对象都有一个对应的“虚拟 DOM 对象”。虚拟 DOM 对象是 DOM 对象的轻量级副本,可以在不影响真实 DOM 的情况下更新。虚拟 DOM 对象与真实 DOM 对象共享相同的属性,但它们不具备像真实 DOM 那样影响屏幕上显示内容的能力。
Generally, manipulating the real DOM is slower than manipulating the virtual DOM, since nothing gets drawn onscreen. Manipulation of the virtual DOM is akin to editing a blueprint instead of moving rooms within a real house. As soon as the Virtual DOM contains all the updates, it is compared with the real DOM, and the difference between the two is calculated.
通常,操作真实 DOM 比操作虚拟 DOM 慢,因为不会在屏幕上绘制任何内容。操作虚拟 DOM 类似于编辑蓝图,而不是在真实房屋中移动房间。一旦虚拟 DOM 包含所有更新,就会将其与真实 DOM 进行比较,并计算两者之间的差异。
Upon calculating the difference, the real DOM only updates those elements that have changed. The process is known as reconciliation.
在计算差异时,真实DOM仅更新那些已更改的元素。这一过程称为协调。
6. What is the purpose of encapsulating a JavaScript source file's full content with a function book?
使用函数book封装JavaScript源文件全部内容的目的是什么?
- 知识点: 前端 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Justdial
- id: 69b37b8058d557c902bb13c4 | 官方: 否 | 付费: 否
答案:
This is becoming more prevalent, and several prominent JavaScript packages use it. This technique establishes a closure around the full contents of the file, which, maybe most crucially, provides a private namespace, avoiding potential name conflicts between different JavaScript modules and libraries. Another advantage of this method is that it makes it simple to create an alias for a global variable. This is a common feature of jQuery plugins.
这种做法越来越普遍,许多著名的JavaScript包都在使用它。这种技术围绕文件的全部内容建立了一个闭包,也许最重要的是,它提供了一个私有命名空间,避免了不同JavaScript模块和库之间的潜在名称冲突。这种方法的另一个优点是,它使得为全局变量创建别名变得简单。这是jQuery插件的一个常见特性。
7. In React, what is the objective of render()?
在React中,render()的目标是什么?
- 知识点: 前端 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Justdial
- id: 69b37b8158d557c902bb13da | 官方: 否 | 付费: 否
答案:
Render() is a requirement for all React components. It returns a single React element that represents the native DOM component. If more than one HTML element needs to be rendered, all of them must be contained within a single enclosing tag, such as form>, group>, div>, and so on. This function must remain pure, i.e., it must always return the same result.
render()是所有React组件的必备要求。它返回一个单一的React元素,代表原生DOM组件。如果需要渲染多个HTML元素,它们都必须包含在一个单一的封闭标签内,如form>、group>、div>等。此函数必须保持纯净,即它必须始终返回相同的结果。
8. What distinguishes JavaScript from other scripting languages?
JavaScript与其他脚本语言有何不同?
- 知识点: 前端 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Justdial
- id: 69b37b8158d557c902bb13e4 | 官方: 否 | 付费: 否
答案:
JavaScript has the following features: - It's an interpreted, lightweight programming language.
JavaScript具有以下特点:- 它是一种解释型、轻量级的编程语言。
- It is intended for the development of network-centric applications.
- It works in tandem with Java and complements it.
- It is a scripting language that is open and cross-platform.
9. In JavaScript, what are the various techniques for defining variables? In JavaScript, what is a prompt box?
在JavaScript中,定义变量的各种技术有哪些?在JavaScript中,什么是提示框?
- 知识点: 前端 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Justdial
- id: 69b37b8158d557c902bb13e7 | 官方: 否 | 付费: 否
答案:
In JavaScript, there are three ways to define a variable: - Var – The JavaScript variables statement declares a variable and, if desired, sets the value of the variable. Variable declarations, such as var a =10, are handled before the code is executed.
在JavaScript中,有三种定义变量的方式:- Var – JavaScript变量声明语句声明一个变量,并可根据需要设置变量的值。变量声明,如var a =10,是在代码执行前处理的。
- Const — Const functions have the property of not being able to modify the object they're called on. If a function is declared const, it can be applied to any object.
Let – This indicates that a variable can be reassigned, such as a counter in a loop or a value swap in an algorithm. It also means that the variable will only be used in the block where it is declared.
A prompt box is a box that provides a text box for the user to enter input. The prompt() method displays a dialogue box that asks for input from the visitor. If you want the user to enter a value before proceeding to the next page, a prompt box is frequently used. After entering an input value into a prompt box, the user must choose between clicking "OK" or "Cancel" to proceed.提示框是一个提供文本框供用户输入内容的框。prompt()方法显示一个对话框,要求访客输入信息。如果你希望用户在进入下一页之前输入一个值,提示框经常被使用。在提示框中输入一个输入值后,用户必须选择点击“确定”或“取消”以继续。
10. Why did you choose to React over alternative frameworks like Angular?
为什么你选择React而不是像Angular这样的其他框架?
- 知识点: 前端 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Justdial
- id: 69b37b8158d557c902bb1405 | 官方: 否 | 付费: 否
答案:
React is more popular because: - Easy production of dynamic web applications: React makes it easier to create dynamic web applications since it requires less writing and offers greater functionality, whereas code in JavaScript applications can quickly become complex.
React更受欢迎是因为:- 轻松创建动态Web应用:React使得创建动态Web应用变得更加容易,因为它需要的代码更少且提供了更多功能,而在JavaScript应用中,代码可能会迅速变得复杂。
- Improved performance: React makes use of a virtual DOM, which speeds up web applications. Unlike traditional web applications, the virtual DOM examines its prior state and updates just those components in the real DOM whose states have changed, rather than updating all of them.
- Components that can be reused: Components are the building parts of any React application, and a single app is typically made up of numerous components. These components have their logic and controls, and they can be reused across the application, resulting in a significant reduction in application development time.
- Search engine optimization friendly: React allows developers to create compelling user interfaces that are simple to explore in multiple search engines. It also supports server-side rendering, which improves an app's SEO.
- A vast ecosystem of libraries to choose from: React gives you the freedom to choose the tools, libraries, and architecture for designing your application based on your requirements.
11. Is PHP case-sensitive? And is there any interaction between JavaScript and PHP?
PHP是否区分大小写?JavaScript和PHP之间是否有任何交互?
- 知识点: 前端 / 编程语言基础 (标签: interviewbit, justdial, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Justdial
- id: 69b37b8158d557c902bb142a | 官方: 否 | 付费: 否
答案:
PHP can be thought of as a case-sensitive language to some extent. The variable names are case-sensitive, but not the function names. Furthermore, user-defined functions are not case-sensitive, but the rest of the language is. User-defined functions in PHP, for example, can be defined in lowercase but afterwards referred to in uppercase and still work properly.
PHP在某种程度上可以被认为是一种区分大小写的语言。变量名是区分大小写的,但函数名不是。此外,用户定义的函数不区分大小写,但语言的其他部分是区分的。例如,PHP中的用户定义函数可以以小写形式定义,但之后用大写形式引用仍然能正常工作。
PHP is a server-side scripting language, whereas JavaScript is a client-side scripting language. PHP can produce JavaScript variables, which can then be simply performed in the browser. As a result, variables can be passed to PHP using a simple URL.
PHP是一种服务器端脚本语言,而JavaScript是一种客户端脚本语言。PHP可以生成JavaScript变量,这些变量随后可以在浏览器中简单地执行。因此,可以通过简单的URL将变量传递给PHP。
12. What is JavaScript and its frameworks?
什么是JavaScript及其框架?
- 知识点: 前端 (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37c0058d557c902bb666f | 官方: 否 | 付费: 否
答案:
JavaScript is a programming language that is commonly used to create interactive and dynamic web pages. It is supported by most modern web browsers and is often used in conjunction with HTML and CSS to create web applications.
JavaScript 是一种编程语言,通常用于创建交互式和动态网页。它被大多数现代网络浏览器支持,并且经常与 HTML 和 CSS 一起使用来创建 Web 应用程序。
There are several frameworks (i.e., pre-written code libraries) that are built on top of JavaScript and are designed to make it easier to develop web applications. Some popular JavaScript frameworks include:
有几个框架(即预编写的代码库)建立在 JavaScript 之上,旨在使开发 Web 应用程序更容易。一些流行的 JavaScript 框架包括:
React: A popular JavaScript library for building user interfaces, developed by Facebook. 2. Angular: A full-featured JavaScript framework for building web applications, developed by Google. 3. Vue.js: A progressive JavaScript framework for building user interfaces, known for its simplicity and ease of use. 4. Ember.js: A JavaScript framework for building scalable web applications, with a focus on conventions and best practices. 5. Node.js: A JavaScript runtime that allows developers to build server-side applications in JavaScript.
- React:一个用于构建用户界面的流行 JavaScript 库,由 Facebook 开发。 2. Angular:一个功能齐全的用于构建 Web 应用程序的 JavaScript 框架,由 Google 开发。 3. Vue.js:一个用于构建用户界面的渐进式 JavaScript 框架,以其简单易用而闻名。 4. Ember.js:一个用于构建可扩展 Web 应用程序的 JavaScript 框架,专注于约定和最佳实践。 5. Node.js:一个 JavaScript 运行时,允许开发人员用 JavaScript 构建服务器端应用程序。
Each of these frameworks has its own strengths and is suitable for different types of projects. For example, React is often used for building large and complex user interfaces, while Vue.js is well-suited for building lightweight and interactive single-page applications.
这些框架各有其优势,适用于不同类型的项目。例如,React 通常用于构建大型复杂的用户界面,而 Vue.js 非常适合构建轻量级和交互式的单页应用程序。
13. What are the two types of loops in javascript?
javascript 中的两种循环类型是什么?
- 知识点: 前端 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0758d557c902bb6ae7 | 官方: 否 | 付费: 否
答案:
Entry Controlled Loops: The test condition is tested before entering the loop body in this sort of loop. This category includes For Loop and While Loop, for example. Exit Controlled Loops: The test condition is tested or assessed at the end of the loop body in this sort of loop. i.e., regardless of whether the test condition is true or not, the loop body will run at least once. This category includes, for example, the do-while loop.
入口控制循环:在这种循环中,测试条件在进入循环体之前进行测试。例如,此类别包括 For 循环和 While 循环。出口控制循环:在这种循环中,测试条件在循环体结束时进行测试或评估。即,无论测试条件是否为真,循环体至少会运行一次。例如,此类别包括 do-while 循环。
14. What is a strict mode in javascript?
javascript 中的严格模式是什么?
- 知识点: 前端 (标签: interviewbit, optum, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Optum
- id: 69b37c0858d557c902bb6b37 | 官方: 否 | 付费: 否
答案:
A program, function, or other apps can be put into a strict operating context with the new Strict Mode feature in ECMAScript 5. The browser will therefore prevent certain actions from being performed and throw more errors. The literal statement "use strict"; tells the browser to use the JavaScript code in the Strict mode.
在 ECMAScript 5 中,新的严格模式功能可以将程序、函数或其他应用程序置于严格的操作环境中。因此,浏览器将阻止某些操作并抛出更多错误。字面语句 "use strict"; 告诉浏览器在严格模式下使用 JavaScript 代码。
15. What is the use of the debugger keywords in JavaScript?
JavaScript 中 debugger 关键字的用途是什么?
- 知识点: 前端 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f4a | 官方: 否 | 付费: 否
答案:
The JavaScript debugger keyword places a breakpoint in the code. The debugger halts the program's execution at the point where it is applied. We can now manually begin the execution flow. If an exception occurs, the execution will come to a complete stop on that line.
JavaScript debugger 关键字会在代码中放置一个断点。调试器会在应用它的地方暂停程序的执行。我们现在可以手动开始执行流程。如果发生异常,执行将在该行完全停止。
16. What is functional programming in JavaScript?
JavaScript 中的函数式编程是什么?
- 知识点: 前端 (标签: interviewbit, paypal, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: PayPal
- id: 69b37c0f58d557c902bb6f6f | 官方: 否 | 付费: 否
答案:
A programming paradigm designed to handle pure mathematical functions is known as functional programming. The emphasis in this is on writing more complex and pure functions.
一种旨在处理纯数学函数的编程范式被称为函数式编程。这里的重点是编写更复杂和纯的函数。
Because JavaScript is a multi-paradigm language, we may simply combine a variety of paradigms within a single piece of JavaScript code. In JavaScript, we can employ object-oriented, procedural, and functional programming paradigms all at once. What makes JavaScript so attractive and powerful is that it is multi-paradigm and allows us to interact with a variety of programming languages.
由于 JavaScript 是一种多范式语言,我们可以在单个 JavaScript 代码中简单地结合多种范式。在 JavaScript 中,我们可以同时使用面向对象、过程式和函数式编程范式。JavaScript 如此吸引人和强大的原因在于它是多范式的,并允许我们与各种编程语言进行交互。
PayPal Interview Preparation
17. What do you understand about functional programming in JavaScript?
你对 JavaScript 中的函数式编程了解多少?
- 知识点: 前端 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb7107 | 官方: 否 | 付费: 否
答案:
The term "functional programming" refers to a programming paradigm for dealing with pure mathematical functions. Writing increasingly sophisticated and pure functions is the focus here. We may integrate a number of paradigms within a single piece of JavaScript code since JavaScript is a multi-paradigm language. Object-oriented, procedural, and functional programming paradigms can all be used with JavaScript at the same time. The fact that JavaScript is multi-paradigm and can interact with a range of programming languages is what makes it so appealing and powerful.
“函数式编程”一词指的是处理纯数学函数的编程范式。这里的重点是编写越来越复杂和纯的函数。由于 JavaScript 是一种多范式语言,我们可以在单个 JavaScript 代码中集成多种范式。面向对象、过程式和函数式编程范式都可以同时与 JavaScript 一起使用。JavaScript 是多范式的并且可以与一系列编程语言交互,这一事实使其如此吸引人和强大。
18. Explain callback functions in JavaScript with the help of an example.
借助示例解释 JavaScript 中的回调函数。
- 知识点: 前端 (标签: interviewbit, paytm, company-specific)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: general
- 公司: Paytm
- id: 69b37c1358d557c902bb710a | 官方: 否 | 付费: 否
答案:
A callback function is a function that receives an input from another function and is then called from within the outer function to complete a routine or operation. Here's an illustration of a callback function in JavaScript:
回调函数是一种从另一个函数接收输入,然后在外层函数内部被调用以完成某个例程或操作的函数。下面是一个 JavaScript 回调函数的示例:
function cityCallout(city) {
function cityCallout(city) {
alert('Welcome to' + city + '!');
alert('Welcome to' + city + '!');
}
function foo(callback) {
function foo(callback) {
var cityName = prompt('Please input the name of the city here:');
var cityName = prompt('Please input the name of the city here:');
callback(cityName);
callback(cityName);
}
foo(cityCallout);
foo(cityCallout);
Therefore, if we pass "New York" in the prompt, the output of this piece of code snippet will be "Welcome to New York!".
因此,如果我们在提示框中输入“New York”,这段代码片段的输出将会是“Welcome to New York!”。
19. What is Bootstrap? What are the advantages of Bootstrap over CSS?
什么是 Bootstrap?与 CSS 相比,Bootstrap 有哪些优势?
- 知识点: 前端 (标签: interviewbit, pwc, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 普华永道
- id: 69b37c2258d557c902bb7b1f | 官方: 否 | 付费: 否
答案:
Bootstrap is an Open Source Front-End framework developed by Twitter that is used for making web development easier and faster. This is nothing but a reusable code that we can freely download and use for our own web development so that we get the functionality without having to re-write the same code (i.e., not inventing the wheel again). It supports almost all of the browsers and hence can work with any browser.
Bootstrap 是由 Twitter 开发的一个开源前端框架,用于让 Web 开发更简单、更快捷。它其实不过是一段可复用的代码,我们可以自由下载并将其用于自己的 Web 开发,这样就能获得相应的功能,而无需重新编写相同的代码(也就是说,不必重复造轮子)。它几乎支持所有浏览器,因此可以与任何浏览器配合使用。
Bootstrap also makes the website responsive i.e., they fit the screen no matter which device is being used to view the website.
Bootstrap 还能让网站具有响应式特性,也就是说,无论使用什么设备查看网站,它们都能适配屏幕。
Advantages of Bootstrap over CSS: - Time-Saving: It increases the development speed as we can achieve the same functionality by using the bootstrap in our code instead of writing the code from scratch.
Bootstrap 相比 CSS 的优势:- 节省时间:它提高了开发速度,因为我们可以在代码中使用 Bootstrap 来实现相同的功能,而不必从头开始编写代码。
- Cross-Browser Compatibility: As bootstrap supports all of the major modern web browsers, we don't need to worry about whether a functionality runs on all modern web browsers or not.
- Responsiveness: As bootstrap uses a fluid grid layout, it adapts to the screen resolution of the device and hence we won't get a surprising website view when opening the same website on different devices of different sizes like a laptop, desktop, mobile, tablet etc
- Ease of Use: With just basic knowledge of HTML and CSS, we can start using bootstrap easily.
- Open Source: Bootstrap is available for free and hence we don't need to pay to get this functionality.
20. What is DOM?
什么是 DOM?
- 知识点: 前端 (标签: interviewbit, tcs-nqt, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Tata Consultancy Services
- id: 69b37c7458d557c902bc8957 | 官方: 否 | 付费: 否
答案:
DOM stands for Document Object Model. It is an API (Application Programming Interface) that is used to access and change the contents of HTML elements. It provides a hierarchical structure of the web page that makes it easy to access the elements, their parents, their siblings and their children.
DOM 代表文档对象模型(Document Object Model)。它是一个 API(应用程序编程接口),用于访问和更改 HTML 元素的内容。它提供了网页的层次结构,使得访问元素及其父元素、同级元素和子元素变得容易。
21. What processes are triggered when we type an URL into a browser and hit enter?
当我们在浏览器中输入 URL 并按下回车键时,会触发哪些过程?
- 知识点: 前端 (标签: interviewbit, walmart, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 沃尔玛
- id: 69b37c9058d557c902bc96bd | 官方: 否 | 付费: 否
答案:
Following are the actions taken by the browser whenever we type an URL into a browser and hit enter: - To find the website's corresponding IP address, the browser scans the cache for DNS entries. It searches for the following cache:
每当我们向浏览器中输入 URL 并按下回车键时,浏览器会执行以下操作:- 为了找到该网站对应的 IP 地址,浏览器会扫描缓存中的 DNS 条目。它会搜索以下缓存:
Browser Cache Operating Systems Cache Router Cache ISP CacheIf nothing is found in one, it moves on to the next until it is successful. If the domain name is not discovered in the cache, the DNS server of the ISP (Internet Service Provider) performs a DNS query to determine the IP address of the server that hosts the domain name. - Small data packets, containing the request's content and the IP address it's destined for, are sent.
浏览器缓存 操作系统缓存 路由器缓存 ISP缓存如果在一个缓存中找不到,就会继续查找下一个,直到成功。如果域名在缓存中未找到,ISP(互联网服务提供商)的DNS服务器会执行DNS查询,以确定托管该域名的服务器的IP地址。 - 发送包含请求内容及其目标IP地址的小数据包。
- The browser uses synchronize(SYN) and acknowledge(ACK) messages to establish a TCP (Transfer Control Protocol) connection with the server.
- The web server receives an HTTP request (either POST or GET) from the browser.
- The server on the host computer processes the request and responds. It generates a response in one of several formats, including JSON, XML, and HTML.
- The server sends out an HTTP response with the response status.
- HTML content is then displayed by the browser.
22. What is the use of a CSS preprocessor? When should a pre-processor be utilised in a project, according to you?
CSS预处理器的用途是什么?您认为在项目中应何时使用预处理器?
- 知识点: 前端 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9758d557c902bc9b55 | 官方: 否 | 付费: 否
答案:
CSS preprocessors are scripting languages that augment CSS's standard functionality. They allow us to employ variables, nesting, inheritance, mixins, functions, and mathematical operations in our CSS code. CSS preprocessors make it simple to automate repetitive activities, eliminate code bloat and errors, develop reusable code snippets, and maintain backward compatibility.
CSS预处理器是脚本语言,可增强CSS的标准功能。它们允许我们在CSS代码中使用变量、嵌套、继承、混合、函数和数学运算。CSS预处理器使自动化重复性任务、消除代码臃肿和错误、开发可复用的代码片段以及保持向后兼容性变得简单。
The benefits and drawbacks of using a preprocessor vary depending on the type of project, but the following are some of the benefits and drawbacks.
使用预处理器的利弊因项目类型而异,但以下是一些优点和缺点。
Advantages: - You may add variables and functions to CSS with CSS Preprocessor, which gives it a new dimension and scope, making development easier and more efficient. It also improves the organization and cleanliness of your code.
优点: - 您可以使用CSS预处理器向CSS添加变量和函数,这为其赋予了新的维度和范围,使开发更容易、更高效。它还改善了代码的组织性和整洁性。
- CSS Preprocessors is a unique feature that allows you to combine numerous stylesheets into one. You can make separate files for each screen or page, then combine them in the main CSS file.
- The CSS Preprocessor assists you in avoiding repetitions. Instead of rewriting common styles, you can write them once and then import them.
CSS class nesting makes it simple to target DOM elements and saves time. It's also a lot easier to alter CSS files due to nesting.
Disadvantages: - Preprocessing tools are required for preprocessors. The time they take to recompile can be lengthy.缺点: - 预处理器需要预处理工具。它们重新编译所需的时间可能很长。
Although the source files may be small, the output CSS may be large, causing the request to take longer to finish.
Choosing a preprocessor comes down to personal choice, and it might be instructive to see how a developer could choose one over the other for your project.选择预处理器取决于个人偏好,了解开发者如何为您的项目选择其中之一可能具有教育意义。
Useful Preparation Resources:
有用的备考资源:
OOPs
面向对象编程
OS
操作系统
SQL
SQL
Practice Problems
练习题
23. What makes a block-level element different from an inline element in HTML?
HTML中块级元素与内联元素有何不同?
- 知识点: 前端 (标签: interviewbit, wipro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Wipro
- id: 69b37c9858d557c902bc9b6c | 官方: 否 | 付费: 否
答案:
| Block 块级 | Inline 内联 |
|---|---|
| A block-level element is drawn as a block that will always start on a new line and will stretch to occupy the full width available to it, i.e. the width of its container. Examples of block-level elements by default: , , , , . 块级元素被绘制为一个块,总是从新行开始,并会拉伸以占据其可用的全部宽度,即其容器的宽度。默认情况下的块级元素示例:、、、、。 | Inline items are drawn where they are defined and take up only the space that is required. Looking at how text flows on a page is the simplest approach to understand how they work. Examples of inline elements by default: , , , , . 内联元素在其定义的位置绘制,仅占用所需的空间。观察文本在页面上的流动方式是理解它们工作原理的最简单方法。默认情况下的内联元素示例:、、、、。 |
24. 什么是 Java Applet(Java小程序)?
- 知识点: 前端 / 编程语言基础 (主题: java;标签: java, applet, jvm, browser)
- 类型: technical | 难度: medium | 子类型:
- 分类: backend
- id: 695cc0361da553795622a8ac | 官方: 是 | 付费: 否
答案:
TL;DRJava Applet(Java小程序)是可在浏览器中运行的小型 Java 程序,通过 HTML(超文本标记语言)标签嵌入并在 JVM(Java虚拟机)中执行,用于增强网页交互性。
Java applet(Java小程序)是一种小型可执行程序,设计用于在 Web(网络)浏览器中运行。我们使用 applet 让网站和 Web 应用更动态、更具交互性。Applet 可以通过 HTML(超文本标记语言)的 APPLET 或 OBJECT 标签嵌入到页面中,并在用户电脑上安装的 Java 虚拟机(JVM,Java虚拟机)中执行。
25. V8 是什么?
- 知识点: 前端 / 后端 (主题: nodejs;标签: v8, javascript-engine, nodejs, chrome)
- 类型: technical | 难度: medium | 子类型:
- 分类: backend
- id: 695cc0361da553795622a8b2 | 官方: 是 | 付费: 否
答案:
TL;DRV8 是 Google(谷歌)开源的 JavaScript(爪哇脚本)引擎(C++ 实现),用于执行符合 ECMAScript(欧洲计算机制造商协会脚本)的 JS(爪哇脚本)代码,Chrome(谷歌浏览器)与 Node.js(节点爪哇脚本)都使用它。
V8 是 Google(谷歌)开发的开源 JavaScript(爪哇脚本)引擎,基于 C++ 实现。它根据 ECMAScript(欧洲计算机制造商协会脚本)规范实现 JavaScript,并提供执行 JavaScript 代码的运行时环境。V8 被用于多个应用中,包括 Chrome(谷歌浏览器)浏览器和 Node.js(节点爪哇脚本)运行时。
V8 的重要特性之一是它不依赖于浏览器运行,这使得 Node.js(节点爪哇脚本)能够在服务端使用 V8 执行 JavaScript,从而推动了 Node.js 的流行。
26. 以下哪个不是服务端 JavaScript(爪哇脚本)对象?
- 知识点: 前端 / 后端 (主题: javascript;标签: server-side, objects)
- 类型: technical | 难度: medium | 子类型:
- 分类: backend
- id: 695cd1251da5537956259ac9 | 官方: 是 | 付费: 否
答案:
Date 和 Function(Function)属于 JavaScript(JavaScript)内置对象(built-in objects);FileUpload(FileUpload)并不是标准内置对象,通常是某些特定平台/框架提供的对象。
27. Is having a project on Web or Android Development or Machine Learning a must for being hired at Amazon?
在亚马逊被录用是否必须拥有Web或Android开发或机器学习的项目?
- 知识点: 前端 / 数据工程与数据科学/AI (标签: interviewbit, amazon, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: 亚马逊
- id: 69b3792b58d557c902b982ae | 官方: 否 | 付费: 否
答案:
No, only good problem-solving skills are required to get hired at Amazon for an SDE position. Having said that, you will always get brownie points if you have a good project or two in your Resume as it shows that you are referenced and interested in the domain on which you have made your project.
不,要在亚马逊获得SDE职位,只需要良好的问题解决能力。话虽如此,如果您的简历中有一两个好的项目,您总是会获得加分,因为这表明您对所制作项目的领域有所参考和兴趣。
Coding Problems
0/4
Easy Problems
简单问题
Greedy Algorithm
贪心算法
Dynamic Programming
动态规划
Majority Element
多数元素
Easy
简单
19.7 Mins
19.7分钟
Solve
解答
Unique Binary Search Trees
唯一二叉搜索树
Easy
简单
62.1 Mins
62.1 分钟
Solve
解答
Best Time to Buy and Sell Stocks II
买卖股票的最佳时机 II
Easy
简单
40.18 Mins
40.18分钟
Solve
解答
Best Time to Buy and Sell Stocks I
买卖股票的最佳时机 I
Easy
简单
28.13 Mins
28.13分钟
Solve
解答
0/5
Intermediate Problems
中级问题
Greedy Algorithm
贪心算法
Dynamic Programming
动态规划
Gas Station
加油站
Medium
中等
56.42 Mins
56.42分钟
Solve
解答
Distribute Candy
分发糖果
Medium
中等
65.48 Mins
65.48分钟
Solve
解答
Longest Increasing Subsequence
最长递增子序列
Medium
中等
30.39 Mins
30.39分钟
Solve
解答
Max Product Subarray
最大乘积子数组
Medium
中等
65.25 Mins
65.25 分钟
Solve
解答
Ways to Decode
解码方法
Medium
中等
70.8 Mins
70.8分钟
Solve
解答
0/1
Advanced Problems
进阶问题
Dynamic Programming
动态规划
Best Time to Buy and Sell Stocks III
买卖股票的最佳时机 III
Hard
困难
64.56 Mins
64.56 分钟
Solve
解答
28. What is a frame in HTML?
HTML 中的框架是什么?
- 知识点: 前端 (标签: interviewbit, infosys, company-specific)
- 类型: technical | 难度: medium | 子类型: concept
- 分类: general
- 公司: Infosys
- id: 69b37b5858d557c902baf39e | 官方: 否 | 付费: 否
答案:
- HTML Frames are useful for dividing browser windows into many parts where each section is able to load an HTML document separately. A frame collection in the browser window is called a frameset.
- It permits authors to present HTML documents in multiple views, which might be subwindows or independent windows. Multiple views provide help to keep specific information visible, while other views are replaced or scrollable.
29. 你会如何用 JavaScript(JavaScript)实现一个递归函数(recursive function)来计算斐波那契数列(Fibonacci sequence)?
- 知识点: 前端 / 算法与数据结构 (主题: algorithms;标签: fibonacci, recursion, javascript, dynamic-programming)
- 类型: technical | 难度: hard | 子类型:
- 分类: general
- id: 695cce7f1da553795624f745 | 官方: 是 | 付费: 否
答案:
TL;DR原文给出了递归实现(recursive implementation)(以图片形式展示),但指出该解法会重复计算,效率低,建议使用动态规划(dynamic programming)优化。
用于计算斐波那契数列(Fibonacci sequence)的递归函数(recursive function)可按如下方式实现(原文以图片形式给出):
注意:该方案由于重复计算效率较低,需要使用动态规划(dynamic programming)来获得更好的性能。
30. 解释响应式编程(Reactive Programming)(Reactive Programming)范式及其在 Web 开发(web development)中的优势。
- 知识点: 前端 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: reactive, data-streams, event-driven, async, resilience)
- 类型: technical | 难度: hard | 子类型:
- 分类: general
- id: 695cce7f1da553795624f775 | 官方: 是 | 付费: 否
答案:
TL;DR响应式编程(Reactive Programming)围绕数据流(data stream)与事件变化自动“响应”,适合异步(asynchronous)与事件驱动(event-driven)场景,可提升可维护性、表达能力并简化复杂异步逻辑。
响应式编程(Reactive Programming)是一种围绕数据流(data stream)(如事件或变量变化)并对其作出反应的编程范式(programming paradigm)。它支持异步(asynchronous)、事件驱动(event-driven)编程,可帮助构建高效且更具韧性的 Web 应用(web application),并能在状态变化时自动响应。响应式编程(Reactive Programming)能增强代码可维护性和表达能力,并简化复杂的异步场景。
评论