Posts

Showing posts from August, 2023

Top 100 JavaScript Interview Questions

JavaScript Interview Questions For Freshers What are the data types in JavaScript ? What is an object in JavaScript ? In how many ways we can define an object in JavaScript ? How to define a class in JavaScript ? What is defineProperty() method of javascript Object ? What is scope in JavaScript ? Explain variable hoisting ? Explain closures in javascript ? Difference between null and undefined ? Difference between == and === ? What are the new features in ES6 , which were not there in previous JavaScript version ? Explain time complexity ? What is space complexity ? What will be the output of the below code: let obj ={ a: 10, vir : function(){ x(); console.log(this.a); function x(){ console.log(this.a) } } } obj.vir(); What will be the output of the below code for (var i= 0; i < 5; i++){ setTimeout(() => console.log(i)); } What will be the output of the below code :- var a = 90; doit(); function doit(){ console.log(a); var a = 10; } Explain call(), bind(

Top JavaScript Coding Interview Questions And Answers (2023)

Write a code to display which character is coming how many times in a given string ? Write a function to check whether a string is a palindrome or not with time complexity of the code ? Given an array containing some numbers write a code to that will find out the missing number in the array's range ? Write a code to reverse all the words of a given string. For example : Input : “how are uoy” Output : “Woh era you” How to segregate 0s and 1s in an array in Javascript ? Write a function to check if an anagram of a string is palindrome or not ? Write a code to check if two strings are anagram of each other ? Write a code to group items of array by category ? How to get the maximum count of consecutive 1's in an array ? How do you write a factorial code in JavaScript ? Given an integer array, find the subarray with the largest sum, and return its sum ? How to merge two sorted arrays in JavaScript ? How do you check if a value is a prime number ? How to reverse a string in JavaScrip

JavaScript Developer Interview Questions for Freshers

  JavaScript Developer Interview Questions for Freshers What are the data types in JavaScript ? What is an object in JavaScript ? In how many ways we can define an object in JavaScript ? How to define a class in JavaScript ? What is defineProperty() method of javascript Object ? What is scope in JavaScript ? Explain variable hoisting ? Explain closures in javascript ? Difference between null and undefined ? Difference between == and === ? What are the new features in ES6 , which were not there in previous JavaScript version ? Explain time complexity ? What is space complexity ? What will be the output of the below code: let obj ={ a: 10, vir : function(){ x(); console.log(this.a); function x(){ console.log(this.a) } } } obj.vir(); What will be the output of the below code for (var i= 0; i < 5; i++){ setTimeout(() => console.log(i)); } What will be the output of the below code :- var a = 90; doit(); function doit(){ console.log(a); var a = 10; } Explain c