🌐
Moiz's Dev Blog
themoizqureshi.hashnode.dev › javascript-string-coding-interview-questions
JavaScript String Coding Interview Questions - Moiz's Dev Blog
January 28, 2024 - Here are 15 coding interview questions related to strings in JavaScript, along with sample solutions: Reverse a String: Write a function to reverse a string in-place. function reverseString(str) { return str.split('').reverse().join(''); } ...
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-string-interview-questions-and-answers
JavaScript String Interview Questions and Answers - GeeksforGeeks
The match() method checks if a string fits a pattern (regular expression) and returns the matching parts in an array. If there’s no match, it returns null. This is useful for finding specific text patterns. ... JavaScript provides multiple ways to reverse a string, but the most common method is by converting the string into an array, reversing it, and then joining it back into a string.
Published   September 12, 2025
Discussions

Real job interview question, find all occurances of a string
I got lucky and had a technical interview with recruiting company that was recruiting for a local company hiring for PHP developer which I failed, I was lucky to make it to a technical interview normally I dont get them. The problem sets in this [backend interview] (ive included my ... More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
19
0
July 27, 2022
Ten questions I’ve been asked, most more than once, over six technical JavaScript / Front-end Engineer job interviews.
Why do interviewers love algorithms so much? These things almost never come up in fornt end development and when they do there is probably an underscore method or something else prepackaged to use. The cynical part of me thinks that interviewers like algorithms because it makes them feel like their company is doing real hardcore shit. Basically just a vanity question to boost the interviewer's own ego. I mean there are probably not a lot of companies who are in a position to turn down candidates who are otherwise good devs just because they cant remember stuff like big O. More on reddit.com
🌐 r/javascript
303
644
November 3, 2015
People also ask

How to empty an array in JavaScript?
**Method 1** ```javascript arrayList = []; ``` Above code will set the variable `arrayList` to a new empty array. This is recommended if you don't have **references to the original array** `arrayList` anywhere else because It will actually create a new empty array. You should be careful with this way of empty the array, because if you have referenced this array from another variable, then the original reference array will remain unchanged, Only use this way if you have only referenced the array by its original variable `arrayList`. For Instance: ```javascript var arrayList = ['a', 'b', 'c'
🌐
fullstack.cafe
fullstack.cafe › home › blog › 25+ javascript coding interview questions (solved with code)
25+ JavaScript Coding Interview Questions (SOLVED with CODE) | ...
What is _Closure_ in JavaScript? Provide an example
A *closure* is a function defined inside another function (called parent function) and has access to the variable which is declared and defined in parent function scope. The closure has access to variable in three scopes: - Variable declared in his own scope - Variable declared in parent function scope - Variable declared in global namespace ```javascript var globalVar = "abc"; // Parent self invoking function (function outerFunction (outerArg) { // begin of scope outerFunction // Variable declared in outerFunction function scope var outerFuncVar = 'x'; // Closure self-invoking fu
🌐
fullstack.cafe
fullstack.cafe › home › blog › 25+ javascript coding interview questions (solved with code)
25+ JavaScript Coding Interview Questions (SOLVED with CODE) | ...
How to check if an object is an array or not? Provide some code.
> The best way to find whether an object is instance of a particular class or not using `toString` method from `Object.prototype` ```javascript var arrayList = [1 , 2, 3]; ``` One of the best use cases of type checking of an object is when we do method overloading in JavaScript. For understanding this let say we have a method called `greet` which take one single string and also a list of string, so making our `greet` method workable in both situation we need to know what kind of parameter is being passed, is it single value or list of value? ```javascript function greet(param) { if() {
🌐
fullstack.cafe
fullstack.cafe › home › blog › 25+ javascript coding interview questions (solved with code)
25+ JavaScript Coding Interview Questions (SOLVED with CODE) | ...
🌐
FullStack.Cafe
fullstack.cafe › home › blog › 25+ javascript coding interview questions (solved with code)
25+ JavaScript Coding Interview Questions (SOLVED with CODE) | FullStack.Cafe
November 10, 2019 - Check 👉 179 JavaScript Interview Questions ... The best way to find whether an object is instance of a particular class or not using toString method from Object.prototype ... One of the best use cases of type checking of an object is when we do method overloading in JavaScript. For understanding this let say we have a method called greet which take one single string and also a list of string, so making our greet method workable in both situation we need to know what kind of parameter is being passed, is it single value or list of value?
🌐
Medium
prathapreddy-mudium.medium.com › javascript-coding-interview-questions-and-answers-part-1-41d7a2a1279c
JavaScript coding Interview Questions and Answers — Part 1 | by Prathap | Medium
March 18, 2024 - JavaScript coding Interview Questions and Answers — Part 1 Write a JavaScript program to find the maximum number in an array. Write a JavaScript function to check if a given string is a palindrome …
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › top-50-string-coding-problems-for-interviews
String Coding Interview Questions - GeeksforGeeks
September 18, 2025 - String-related problems often assess a candidate's understanding of concepts like pattern matching, manipulation, and efficient algorithm design. Here is the collection of frequently asked interview questions on Strings.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-coding-questions-and-answers
JavaScript Coding Questions and Answers - GeeksforGeeks
August 5, 2025 - The countChar() function counts how many times a specified character (char) appears in a string (str). It splits the string into an array using the character, then returns the length of the array (length-1), which gives the count of the character.
🌐
Keka
keka.com › hr toolkit › interview questions › top 50 javascript coding interview questions and answers
JavaScript Coding Interview Questions and Answers List | Keka
... Some of the common JavaScript coding interview questions typically cover these topics: checking for palindrome, finding missing/largest numbers, object manipulation, removing duplicates, merging, etc.
Find elsewhere
🌐
freeCodeCamp
forum.freecodecamp.org › programming › javascript
Real job interview question, find all occurances of a string - JavaScript - The freeCodeCamp Forum
July 27, 2022 - I got lucky and had a technical interview with recruiting company that was recruiting for a local company hiring for PHP developer which I failed, I was lucky to make it to a technical interview normally I dont get them. The problem sets in this [backend interview] (ive included my solutions)(https://github.com/KravMaguy/Technical-interview/tree/master/Backend interview) were all easy except the last one, which I could not do: for the example ignore the part about the padding with the d...
🌐
Better Programming
betterprogramming.pub › the-technical-interview-guide-to-string-manipulation-92f4c4649cd
The Technical Interview Guide to String Manipulation | by Jennifer Fu | Better Programming
June 18, 2023 - The Technical Interview Guide to String Manipulation JavaScript string manipulation for interview prep and daily coding A string is a sequence of characters. It is either a constant or a variable. It …
🌐
Substack
reactjava.substack.com › p › 21-string-interview-questions-that
The Only 21 String Problems You Need to Prepare for Coding Interviews in 2026
May 17, 2026 - JavaScript Algorithms and Data Structures Masterclass by Colt Steele for JavaScript programmers · Mastering Data Structures & Algorithms using C and C++ for those who are good at C/C++ 5. Grokking the Coding Interview: Patterns for Coding Questions Forget about the hundreds of Leetcode problems. Master these 15 underlying patterns in interview questions, and you’ll be able to tackle anything you face in an interview · A good thing about the string data structure is that if you know the array data structure, you can easily solve string-based problems because strings are nothing but a character array.
🌐
Medium
medium.com › swlh › 10-javascript-coding-interview-questions-solve-with-code-3d0a22393a69
10 JavaScript Coding Interview Questions Solve With Code | by Iqbal Mahmud | The Startup | Medium
June 13, 2020 - The problem can be stated along the following lines: given a string, return true if the string is a palindrome and false if it isn’t. Include spaces and punctuation in deciding if the string is a palindrome.
🌐
Scribd
scribd.com › document › 675201368 › js-coding-interview-questions
Js Coding Interview Questions | PDF
js coding interview questions - Free download as Word Doc (.doc), PDF File (.pdf), Text File (.txt) or read online for free. The document contains 20 code snippets demonstrating various JavaScript array and string methods and functions. The codes provide solutions to problems like removing duplicate characters, checking for palindromes, finding longest words, and more.
🌐
Medium
medium.com › javarevisited › top-21-string-programming-interview-questions-for-beginners-and-experienced-developers-56037048de45
Top 21 String Programming Interview Questions for Beginners and Experienced Developers | by javinpaul | Javarevisited | Medium
February 16, 2026 - JavaScript Algorithms and Data Structures Masterclass by Colt Steele for JavaScript programmers · Mastering Data Structures & Algorithms using C and C++ for those who are good at C/C++ 5. Grokking the Coding Interview: Patterns for Coding Questions Forget about the hundreds of Leetcode problems. Master these 15 underlying patterns to interview questions, and you’ll be able to tackle anything you face on the interview ... A good thing about the string data structure is that if you know the array data structure, you can easily solve string-based problems because strings are nothing but a character array.
🌐
InterviewBit
interviewbit.com › javascript-interview-questions
60+ Most Important JavaScript Interview Questions and Answers (2026)
Developers may save a lot of time on monotonous programming jobs by using these code libraries, allowing them to focus on the production work of development. The InterviewBit team has compiled a thorough collection of top Javascript Interview Questions and Answers to assist you in acing your interview and landing your desired job as a Javascript Developer. To know the type of a JavaScript variable, we can use the typeof operator. ... String - It represents a series of characters and is written with quotes.
Published   March 23, 2026
🌐
Roadmap
roadmap.sh › questions › javascript-coding
Top 80 JavaScript Coding Interview Questions and Answers
The “0” in the above code simply defines the initial value for the accumulator variable. A simple isPalindrome function could take a given string, reverse it, and compare it to the original. ... Since there is no direct way to reverse a string in JavaScript, what we’re doing is turning the string into an array of characters and reversing that.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-interview-questions
JavaScript Interview Questions and Answers (2025) - GeeksforGeeks
5 days ago - Inside myFunction - Type of petName: string Inside myFunction - petName: Rocky Outside myFunction - Type of petName: string Outside myFunction - petName: Rocky · It is difficult to debug and test the code that relies on global variables.
🌐
GitHub
github.com › RecursiveSharma › StringCodingQuestions
GitHub - RecursiveSharma/StringCodingQuestions: Mostly Asked String Coding Interview Questions | String Programs (Problems) for Practice 🚀
Mostly Asked String Interview Coding Questions | String Programs ( Problems ) for Practice 👩🏻‍💻 · String Questions · Practice Link · Code · Video Solutions · HINT · Check Palindrome String(reverse string is same) Solve · Code · 2 pointer ·
Starred by 10 users
Forked by 4 users
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-string-programming-examples
JavaScript String Exercise - GeeksforGeeks
We have a complete list of Javascript String functions, to check those please go through this JavaScript String Complete Reference article. We have created an article of JavaScript Examples, and added list of questions based on Array, Object, Function, ..., etc.
Published   August 5, 2025
🌐
Hero Vired
herovired.com › learning-hub › blogs › javascript-coding-interview-questions
Top 90 JavaScript Coding Interview Questions & Answers
This article presents the top 90 most common JavaScript coding interview questions with their answers for beginner, intermediate and advanced levels. Data types, variables and scoping, array, string manipulation, OOP (Object Oriented Programming), error handling, control flow, DOM manipulation, and asynchronous programming are basic questions in JavaScript.