javascript advanced interview questions and answers

Alibabacloud.com offers a wide variety of articles about javascript advanced interview questions and answers, easily find your javascript advanced interview questions and answers information here online.

A very classic and interesting JavaScript interview 5 questions

. Conversely, when Getfullname () is assigned to the test variable, the context refers to the Global Object (window). This is because test is a property that is implicitly set to the global object. For this reason, the function returns the FullName of the window, that is, the value defined in the first row.Question 5:call () and apply ()Now let you solve the previous problem and make the final Console.log () print Aurelio De Rosa.  ReplyThe problem can change the function context by forcing the

Basic JavaScript interview questions

;Var y = new cls2;Alert (X. );Alert (Y. ); Question 3Function cls1 (){This. A = 1;}Function cls2 (){}VaR x = new cls2;Cls2.prototype. A = 1;Var y = new cls2;Alert (X. );Alert (Y. ); Question 4Function cls1 (){This. A = 1;}Function cls2 (){}VaR x = new cls2;Cls2.prototype. A = 1;Var y = new cls2;Alert (X. );Alert (Y. ); Question 5String. Prototype. Self = function (){Return this;}VaR S = "S ";Alert ("S". Self () = "S ")Alert (S. Self () = s)Alert ("S" = "S ")Alert ("S". Self () = "S". Self ())Ale

JavaScript Interview questions: event delegate and this

javascript is not only a low threshold, but also an interesting, powerful and very important language. People from all walks of life find their most confusing choice is the Javasscript programming language. Because of the variety of backgrounds, not everyone has a broad understanding of JavaScript and its rationale. Usually carcass, unless you go to a job interview

JavaScript Complete Interview Questions

nested, must have root element, all XHTML elements must be nested within the root element5, to the Web standardization (or site reconstruction) know what the relevant knowledge, briefly describe a few of the Web standards you know?  Web standardization is divided into structural standardization, performance standardization, behavior standardization. The structure standard language has XHTML and XML, the performance standard language CSS, the behavior standard language w3c,ecmscriptWeb standardi

Front-end interview-the difference between 2-java and JavaScript in difficult questions

configuration. While JavaScript is interpreted to perform without generating intermediate files, "read a sentence, execute a sentence", the execution can generally be done in three ways:1. The general browser comes with the JS interpreter, which can be used directly by the browser;2. Special interpreter software can be installed node. js, executing the. js file;3. Executed with the Web page, using the Third, the data typeJava is a strongly typed lang

JavaScript some common questions to interview summary

Questions about function call variables var a =10; function aaa(){ alert(a); } function bbb(){ var20; //10 } bbb(); Variable declaration issues function aaa(){ var a=b=10; } aaa(); alert(a);//not defined alert(b);//10 Variable lookup is the nearest principle to find, Var defined variables, when the nearest is not found, will look for the outer layer: var10 funct

Renren javascript interview questions can be implemented in advance

JavaScript Interview Requirements: the following questions must be selected from one to four, three questions, implemented using native code, cannot be usedIn any framework, the fifth question is selected.1. display images in a fixed area of the page1. Each time you click the right arrow, the image area will scroll to

Front-end Interview questions (JavaScript)

are not placed under the sub-domain name, but placed in a separate primary domain name. There is also a reason that the browser for a domain name will have a limit on the number of requests, this method can be convenient to do CDN.What are the states of the readystate of 23.ajax, and what are the meanings respectively?Ajax readystate A total of 5 states, respectively, 0-4, each of which means that the meaning of each number is 0 is not called the Open method, 1 means that the Send method is not

Interview questions: JavaScript multidimensional array conversion one dimension

Topic:var array = [1, [2, 3, [4, 5,], 6], 7, 8];Write a method Flatarray (array), get [1, 2, 3, 4, 5, 6, 7, 8]Answer:1. Two force notation:function Flatarray (arr) { var temp = arr.join (). Split (', '), = temp.length, = []; for (var i=0; i) { Result.push (parseint (Temp[i])); } return result;} 2. Recursion:functionFlatarray (arr) {varresult = []; for(vari = 0, L = arr.length; I ){ if(Arr[i]instanceofArray) {Result=Result.concat (Arguments.callee (arr

Which of the following javascript interview questions have you done?

Which of the following javascript interview questions have you done?1. -------------------------------------------------- copy the code var fun = function () {this. name = 'Peter '; return {name: 'jack'};} var p = new fun (); copy the code to ask p. name is: a: 'Peter ', B: 'jack', c: null, d: undefined 2. -------------------------------------------------- copy t

Javascript-interview questions: why should we use closures?

line ------------ I will add that the essence of closure is static scope. Because JavaScript does not have a dynamic scope, function accesses are all defined scopes, so closures can be implemented. In other words, closures are built-in runtime functions. But in fact, isn't any function in JavaScript a function that comes with a runtime environment? Some people think that all functions are closures. This is

How many of these JavaScript interview questions have you done?

1.----------------------------------------------------var function () {this. Name = ' Peter '; return ' Jack '}; var New Fun ();Excuse me, p.name is:A: ' Peter ', B: ' Jack ', C:null, d:undefined2.----------------------------------------------------var function () {this. Name = ' Peter '; return ' Jack '; var New Fun ();Excuse me, p.name is:A: ' Peter ', B: ' Jack ', C:null, d:undefined3.----------------------------------------------------var function =' peter '}}varnew fun (); var New =

JavaScript interview questions you need to know

developer's knowledge about JavaScript inheritance and prototype attributes.Question 3: HoistingWhat is the output result of the following code?Function test (){Console. log ();Console. log (foo ());Var a = 1;Function foo (){Return2; } }Test (); answerUndefined and 2.The above code is equivalent to the following code:Function test (){Var;Function foo (){Return2; }Console. log ();Console. log (foo ());A = 1; }Test (); Question 4: how to executeThe

The most error-prone javascript interview questions

Article category: Web Front-endI. multiple choice questions 1. Which of the following statements will generate a running error :()A. var obj = ();B. var obj = [];C. var obj = {};D. var obj = //; 2. Which of the following words does not belong to a reserved javascript word :()A.B. parentC. classD. void 3. Select a true expression :()A. null instanceof ObjectB. null === undefinedC. null = undefinedD. NaN = Na

Javascript interview questions (comments are original)

I. multiple choice questions 1. Which of the following statements will generate a running error? () A. var OBJ = (); B. var OBJ = []; C. var OBJ = {}; D. var OBJ = //; Comments: OBJ = [] defines an array object, OBJ = {} defines an object literal, OBJ = // defines JavaScript does not write var OBJ = () as a regular object! 2. Select the true expression for the result: (c) A. null instanceofObject

Total Pages: 9 1 .... 5 6 7 8 9 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.