You have two methods: one method takes long time to run and the other completes in short time. You execute the long method first and after that you execute the short method. Which one will complete first. There is no setTimeout involved.
Senior Ui Engineer Interview Questions
723 senior ui engineer interview questions shared by candidates
What is the output of below program. var a = [1,2,3,4] for (var i=0; i<a.length; i++){ setTimeout(function(){ console.log(i) },1000) } ( My Ans : it will print 4 5 times as it will store the latest reference) Next They asked me : How can i print 1,2,3,4 by changing some code in above example
Write a javascript function to draw a chessboard
Write a contains function in javascript
Name some of the core features of ES6
find loop in linkedlist?
Create a polyfill for array reduce
Why JavaScript is used in browsers? Why not the languages Java, Python or Ruby?
Given an array & a value x, find if the array contains any 2 values whoes sum = x
What is the difference between these declarations? function a(){ } var a = function(){ }
Viewing 1 - 10 interview questions