JavaScript Interview Questions
- 0of 0 votes
AnswersWhat are the different data types present in javascript?
- mrabgh2014 June 23, 2022 in United States for giltoys.ir| Report Duplicate | Flag | PURGE
xyz Developer Program Engineer JavaScript - 1of 1 vote
AnswersHow to set the cursor to wait in JavaScript?
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 1of 1 vote
AnswersWhat is the output of 10+20+"30" in JavaScript?
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 1of 1 vote
AnswersHow to write HTML code dynamically using JavaScript?
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 0of 0 votes
AnswersIf we want to return the character from a specific index which method is used?
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 1of 1 vote
AnswersWrite a function that performs binary search on a sorted array.
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 0of 0 votes
AnswersExplain Closures in JavaScript.
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 0of 0 votes
AnswersDifference between "==" and "===" operators?
- hr@patelsoft.com May 13, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies IT PRODUCTS AND SERVICES JavaScript - 0of 0 votes
AnswerWhat will the following code output
- hr@patelsoft.com April 06, 2022 in India
var hero = {
_name: 'John Doe',
getSecretIdentity: function (){
return this._name;
}
};
var stoleSecretIdentity = hero.getSecretIdentity;
console.log(stoleSecretIdentity());
console.log(hero.getSecretIdentity());| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersWhat will the code below output to the console
- hr@patelsoft.com April 06, 2022 in India
var arr1 = "john".split('');
var arr2 = arr1.reverse();
var arr3 = "jones".split('');
arr2.push(arr3);
console.log("array 1: length=" + arr1.length + " last=" + arr1.slice(-1));
console.log("array 2: length=" + arr2.length + " last=" + arr2.slice(-1));| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersWhat is the output of the following code?
- hr@patelsoft.com April 06, 2022 in India
var length = 10;
function fn() {
console.log(this.length);
}
var obj = {
length: 5,
method: function(fn) {
fn();
arguments[0]();
}
};
obj.method(fn, 1);| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersWhat is the output of below code.
- hr@patelsoft.com April 06, 2022 in India
function checkType(num = 1) {
console.log(typeof num);
}
checkType();
checkType(undefined);
checkType('');
checkType(null);| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
Answerswrite a code for lucky sevens using javascript
- hr@patelsoft.com April 06, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersGive an example of JavaScript Multiplication Table
- hr@patelsoft.com April 06, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersGive an example of JavaScript Multiplication Table
- hr@patelsoft.com April 06, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersWhat is the output of below code
- hr@patelsoft.com April 06, 2022 in India
const USER = {'age': 30};
USER.age = 25;
console.log(USER.age);| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersWhat are asynchronous thunks
- hr@patelsoft.com April 06, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersDoes JavaScript supports namespace
- hr@patelsoft.com April 06, 2022 in India| Report Duplicate | Flag | PURGE
patel soft technologies Software Engineer / Developer JavaScript - 0of 0 votes
AnswersA smart-set is a set of distinct numbers in which all the elements have the same number of 1s in their binary form. The set of all smallest elements from each smart-set
- muvvaremo April 05, 2019 in United States
that can be formed from a given array of distinct positive numbers is known as the smartest-set.
So given an array of distinct numbers, outline the elements of the smartest-set in ascending sorted order.
Example
Let the array be {6 , 2 , 11 , 1 , 9 , 14 , 13 , 4 , 18}.
In binary form the set is {110, 010, 1011, 0001, 1001, 1110, 1101, 0100, 10010}.
The smart-sets are {1, 2, 4}, {6, 9, 18}, {11, 13, 14}.
The smartest-set is {1,6,11} as each element is the smallest element from each smart-set.
Input Format
The first line of input consists of an integer t. This is the number of test cases. For each test case,
the first line of input contains an integer n. Here n is the number of elements in the array. The next line contains n space separated distinct integers which are the elements
of the array.
Output Format
The output will space separated integer elements of the smartest-set in ascending order.
Constraints
0 < t < 1000 (This is the number of test cases
2 < n < 10000 (This is the number of integer elements of the array)
1 < Xi < 100000 (This is the size of each element of the array)
Sample input :
3
9
6 2 11 1 9 14 13 4 18
3
7 3 1
3
1 2 4
Sample Output :
1 6 11
1 3 7
1 please send me javascript code| Report Duplicate | Flag | PURGE
A9 Developer Program Engineer JavaScript - 1of 1 vote
AnswerImplement the .reduce function of Javascript in plain JS.
- pri9 December 07, 2018 in United States| Report Duplicate | Flag | PURGE
PayPal Front-end Software Engineer JavaScript - 1of 1 vote
AnswersHow would you implement jQuery' s addClass and removeClass functions using vanilla JS? What other variations you can use? Can you pass multiple parameters for classnames ? How will you make these vanilla JS functions asynchronous? Make this component re-usable.
The implementation must respond to something like this:
- dtallinterviewee December 04, 2018 in United States$('#container') .addClass('blue') .addClass('bg-lime') .addClass('bold') .addClass('font-medium-italic') .addClass('border-solid-pink');
| Report Duplicate | Flag | PURGE
Uber Front-end Software Engineer JavaScript - 0of 0 votes
AnswersJavascript solution for this question???
- Bonsavic Petro February 13, 2018 in United States
Given a list of characters, write a function to output a list of length of minimum non overlapping subsequences that can partition the input list.
For example:
Input : [a,b,c]
Output: [1,1,1]
Explanation: There are no repeated characters.
Input : [a,b,c,a]
Output: [4]
Explanation: The 'a' is repeated so one subsequence is between a to last a.
Input : [a,b,c,b,a,e,b,a,d,f,g,d,f,i,f,k,l,m,n,m,l]
Output: [8,7,6]
Explanation: max length from 1st 'a' to last 'a' is 8.
1st 'f' to last is 6 adding d to it = 7
so on| Report Duplicate | Flag | PURGE
Jabong JavaScript - 0of 0 votes
AnswersWhat are services in Angular.js?
- Joey January 14, 2016 in India| Report Duplicate | Flag | PURGE
Auto NInja Front-end Software Engineer JavaScript - 0of 0 votes
AnswersWhat is Dependency Injection in Angular.js?
- Joey January 14, 2016 in India| Report Duplicate | Flag | PURGE
Auto NInja Front-end Software Engineer JavaScript - 0of 0 votes
Answersyou are on a biz trip and travelling from one city to another. you have a stack of unsorted flight boarding passes. only departure city and destination city are on the boarding pass. how do you find the first departure city and your final destination city, write the solution in javascript.
- codebind September 06, 2015 in United States| Report Duplicate | Flag | PURGE
Google Front-end Software Engineer JavaScript - 0of 0 votes
AnswersWrite a function called deepCopy that takes an object and creates a deep copy of it.
- shabgard August 13, 2015 in United States
var newObj = deepCopy(obj);
(can't use JSON, can't use prototype)| Report Duplicate | Flag | PURGE
Google Software Engineer JavaScript - 0of 0 votes
AnswersDoes JavaScript has inheritance?
- Tom Walker June 07, 2015 in United States
Can you override in JavaScript?| Report Duplicate | Flag | PURGE
Amazon Software Developer Java JavaScript Object Oriented Design - 0of 0 votes
AnswersWhat's difference between Javascript and JAVA in terms of OOP principles. Provide examples.
- Tom Walker June 07, 2015 in United States| Report Duplicate | Flag | PURGE
Amazon Software Developer Coding Java JavaScript Object Oriented Design