关于前端工程师的一套英文题
时间:2022-07-23
本文章向大家介绍关于前端工程师的一套英文题,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
1. You want to add some text inside a DIV called div1 so that the word Hello is shown in bold. Which code would you use?
A. $("#div1").text("<b>hello</b>");
B. $("#div1").html("<b>hello</b>");
C. $("#div1").attr("<b>hello</b>");
D. $("#div1").val("<b>hello</b>");
答案:B
2.You‘re using JQuery to write an AJAX call to fetch data from your web service. The operation will return a JSON result which is userd to display additional data to the user. Do you know which of these callbacks is executed last following an AJAX call?
A. Complete
B. Success
C. Error
D. None of these
答案:A
3.You want to user JQuery to select input elements where the elements name begins with the word "Range". Which code would you use?
A. $("input[name^= 'Range' ]")
B. $("input[name*= 'Range' ]")
C. $("input[name$= 'Range' ]")
D. $("input[name!= 'Range' ]")
答案:A
4. Inside one of your stylesheets you've added references to relative resources on the server such as images and fonts. Complete the following sentence,partial URLs are interpreted relative to the ___?
A. Web page location
B. Stylesheets location
答案:B
5.Which of the following layouts provides for the arrangement of elements on a page such that the elements behave predictably when the page layout must accommodate different screen sizes and display devices.
A. run-in
B. flexbox
C. inline-block
D. inline
答案:B
6.Which of the following values is NOT a valid choice for the text-transform property?
A. Italic
B. Capitalize
C. Uppercase
D. Lowercase
答案:A
7.Which lines of code (lettered to the right) have mistakes?
var age: prompt("Enter your age."); //1
alert("The age is" + age) //2
if (age >= 18 ) alert("Access granted!") //3
else if ( age = 16 || age = 17 ) { //4
alert("You will need a guardian to enter."); //5
} //6
else alert("Access forbidden.") //7
A. 1,3,4,7
B. 1,2,3,4
C. 2,3,7
D. 3,4,7
E. 1,4
答案:E
8.Which of the following for loops will iterate the maximum number of times necessary to retrieve every element form an array with a length of 10?
A.
for (var i = 0; i < 9; i++) {
// arr[i]
}
B.
for (var i = 0; i <= 9; i++) {
// arr[i]
}
C.
for (var i = 0; i < 10; i++) {
// arr[i]
}
D.
for (var i = 0; i < 11; i++) {
// arr[i]
}
答案: B
9. Given the following array:
var arr = [
{
name: "Sarah",
age: 29,
hobbies: ["Tennis","Swimming","Painting"]
},
{
name: “Bob”,
age: 60,
hobbies: ["Football","Golf","Programming"]
}
];
A. arr[1][2][3];
B. arr[2].hobbies[3];
C. arr.hobbies[2];
D. arr[1]["hobbies"][2];
E. arr["Bob"].hobbies["Programming"];
答案:D
10.Which of the following is a valid variable name?
A. this
B. _ROOT_
C. delete
D. 10thItem
E. *
答案: B
11. What does this function do?
var x = function (value) {
return !!value
}
A. It returns the inverse of the value.
B. It returns the value converted to a boolean.
C. It returns the value as-is.
D. It returns false no matter the value.
E. None of the above: it is syntactically invalid.
答案: B
12. Which best describes a prototype?
A. Instances of a class.
B. An extension of a class.
C. A parent object.
D. The chain of objects each individual object inherits.
E. An object whose properties and methods are inherited by other objects.
答案: E
13. Given the following code:
function myFunc () {
setTimeout ( function () {
console.log('a');
})
console.log('b');
}
console.log("c");
myFunc();
console.log("d");
A. c,b,d,a
B. c,d,a,b
C. c,d,a,b
D. c,b,a,d
E. c,a,b,d
答案:A
14. Which concept best explains why this is the case?
document.body.hasOwnProperty("addEventListener"); //false
'addEventListener' in document.body; //true
A. Property nesting.
B. Property sharing.
C. Object composition.
D. Method composition.
E. The prototype chain.
答案:E
15. The ability to call the function f above the point where it's declared,and the inabillity to do it with g , refers to which concept?
f();
function f () {}
g(); //Uncaught TypeError: g is not a function
var g = function () {};
A. Predeclaration
B. Closures
C. Memory allocation
D. Execution queue
E. Hoisting
答案:E
16. The same numbers and strings are considered equal,but arrays with the same items aren't.Which best describes why the arrays aren't equal?
5218 === 5218; //true
"string" === "string"; //true
[ 5218, "string"] === [ 5218, "string"]; //false
A. Both arrays are considered different objects and therefore are not equal when compared.
B. Arrays cannot be directly compared.
C. Numbers and strings within arrays cannot be directly compared.
D. The numbers and string within the array are nested one-level deep,preventing them from being compared.
E. Arrays can never be equal.
答案:A
17. In a browser,what are a, b and c?
var one = {
prop: this,
func: function () {
return this;
}
};
var two = {
prop: one
};
var a = one.prop;
var b = one.func();
var c = one.func.call(two).prop;
A. All three are window.
B. a and b are one ,while c is two.
C. a is window , b is one and c is undefined.
D. a is undefined ,b is one and c is undefined.
E. a is window , while b and c are one.
答案:E
18.What's the value of:
(function () {
let f = this ? class g { } : class h { };
return [
typeof f,
typeof h
];
})();
A. ["function","undefined"]
B. ["function","function"]
C. ["undefined","undefined"]
D. Error
答案:A
19. What’s the value of:
[...[..."..."]].length
A. 1
B. 3
C. 6
D. Error
答案:B
20. Which of the following statement is valid to use a Node module fs in a Node based application?
A. var fs = require("fs");
B. var fs = import("fs");
C. package fs;
D. import fs;
答案: A
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- HTTP协议基础及发展历史
- Vi 和 Vim 的使用
- k8s删除Terminating状态的命名空间
- CentOS7下vsftpd over SSL/TLS加密传输配置实践
- Xargs Sh -c Skipping the First Argument
- Centos系统安装
- Python 为什么能支持任意的真值判断?
- Python 为什么要在 18 年前引入布尔类型?且与 C、C++ 和 Java 都不同?
- Python计算大文件行数方法及性能比较
- docker容器部署Prometheus服务——云平台监控利器
- ASP.NET Core 奇技淫巧之接口代理转发
- 基于CDH(Cloudera Distribution Hadoop)的大数据平台搭建
- troubleshoot之:用control+break解决线程死锁问题
- Docker 三剑客之docker-compose
- 腾讯云 Severless-Express 项目开发和灰度发布最佳实践