Encora
Gambia College Interview Questions and Answers
Q1. Different between let , const,var. Closure in javascript
let, const, and var are used to declare variables in JavaScript. Closures are functions that have access to their outer scope even after the outer function has finished executing.
let: block-scoped variable declaration, can be reassigned
const: block-scoped variable declaration, cannot be reassigned, but its properties can be modified
var: function-scoped variable declaration, can be reassigned
Closure: inner function has access to outer function's variables even after outer func...read more
Q2. Explain oops concepts in detail. Difference between Abstraction and interface.
OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction. Abstraction is a concept where only relevant information is shown to the user, while interface is a blueprint for classes.
OOPs concepts: encapsulation, inheritance, polymorphism, abstraction
Abstraction: showing only relevant information to the user
Interface: blueprint for classes, defines methods without implementation
Example: Abstraction - Car dashboard displaying speed without showing internal ...read more
Q3. String reverse program Factorial program
String reverse and factorial programs in array of strings.
For string reverse program, iterate through the string from end to beginning and append each character to a new string.
For factorial program, use a loop to multiply numbers from 1 to n.
Example for string reverse: Input 'hello' -> Output 'olleh'
Example for factorial: Input 5 -> Output 120 (5*4*3*2*1)
Q4. Addition of two array and array reverse
Add two arrays element-wise and reverse the resulting array of strings.
Iterate through both arrays and add corresponding elements together.
Reverse the resulting array of strings.
Handle edge cases like arrays of different lengths.
Example: ['1', '2', '3'] + ['4', '5', '6'] = ['5', '7', '9'] -> reverse -> ['9', '7', '5']
Q5. String method with explanation any 5
String methods are used to manipulate and work with strings in programming languages.
toUpperCase(): Converts a string to uppercase
toLowerCase(): Converts a string to lowercase
charAt(index): Returns the character at the specified index
indexOf(substring): Returns the index of the first occurrence of a substring
split(delimiter): Splits a string into an array of substrings based on a delimiter
Q6. What is hoisting in javascript
Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope during compilation.
Variable declarations are hoisted to the top of their scope, but not their initializations.
Function declarations are fully hoisted, including their definitions.
Hoisting can lead to unexpected behavior if not understood properly.
More about working at Encora
Interview Process at Gambia College
Top Junior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month