TCS ReactJs Interview | ReactJs & Javascript | 🎉 Selected | Software Engineer | Developer

preview_player
Показать описание
#Reactjs #Javascript #tcs #Redux #Interview #MNC
ReactJs | JavaScript | interview

Please don't judge and comments on my answers.
his is just the interview experience and If you know the right answers please comment below which can also help others.

Subscribe the Channel to support for more related interviews

Рекомендации по теме
Комментарии
Автор

ytJoin our Telegram channel

⭐To watch more Interview videos

DevAditya
Автор

*ReactJs Questions Asked In This Interview Are:*
*1).* What is *React* ?
*2).* How *React* is diff. from *Angular* & *Vue.js* ?
*3).* Explain *state* & *props* ?
*4).* How to pass data from *child* to *parent* in *class-based* as well as *functional-based* component?
*5).* Explain *Life cycle* methods in *class-based* as well as *functional-based* component?
*6).* Explain *Hooks* in react?
*7).* What will happen if we pass *null or undefined* instead of empty array of *useEffect hook* as second argument ?
*8).* What is *Redux* ?
*9).* Why do we need to use *Redux middleware to perform asynchronous activity* ?
*10).* What is *Redux Saga* vs *Redux Thunk* ?

AbhishekKumar-vlcb
Автор

Please don't judge and comments on my answers.
this is just the interview experience and If you know the right answers please comment below which can also help others.

DevAditya
Автор

Thanks for the video, much needed for the interview preparation. It really builds up confidence before giving an interview. Keep up the work :)

srsrajesh
Автор

*JS Questions Asked In This Interview Are:*
1). Name some features of *ES6* ?
2). How *let* & *const* are different than *var* ? (with Examples)
3). Do you know the concept of *Hoisting* ?
4). What is the purpose of *const* ?
5). Can an element be added or removed from a const variable *array* and *object* too?
*ex: (const arr = [1, 2, 3, 4, 5])*
6). Give examples of *rest parameter* and *spread operator* ?
7). Is JS is *single-threaded* or *multi-threaded* ? And how does it achieve the *asynchronous* activity?
8). What are *closures* ?
9). What is *function currying* ?

AbhishekKumar-vlcb
Автор

From my TCS interview experience below are few questions

1. const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
var numArr = arr.map(val=>val>5)
What will the value of numArr be?
2. Diff between
null and undefined
undefined and not defined
Arrow Function vs Regular Function
3. Extract fifth element of array without using index. arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
4. Destructure city from below Object
var empObj = {
name: "Chandra",
age: 36,
address: {
addrs1: "Koramangala",
city: "bangalore",
}
}
5. How many times will setState run and how many times the component will re-render, what will be the final value of state(value)
class Counter extends React.Component{
constructor(props){
super(props)
//initial state set up
this.state = {value:0}
}
componentDidMount(){
//updating state




}
render(){
return
}
}
6. Centering div with flex and having only three elements taking evenly distributed space
<div class="parent">
<div class="child">
Content1
</div>
<div class="child">
Content2
</div>
<div class="child">
Content3
</div>
</div>
7. What is Closure, currying, generators
8. How will you use useEffect to add event listeners.
9. Can we have one dispatched action trigger multiple reducers in redux?

chandrashekar-usef
Автор

My answer to the coding question :
const add = (num) => {
let stringedNum = num.toString();
if(stringedNum.length === 1){
return stringedNum
}else{
let arrNum = stringedNum.split("")
let sum = 0
arrNum.forEach(element => {
sum = sum + Number(element);
return sum
});
return add(sum)
}
}

rishavbhattacharyya
Автор

Hats of for the logic building in the last question buddy. . .

anshviyogi
Автор

Thanks buddy for uploading this....this was really helpful for me who is going to sit for the interviews

SaurabhMishra
Автор

solution for the programming question
function sumOfDigits(num) {
while (num > 9) {
let sum = 0;
while (num > 0) {
sum += num % 10; // Add the last digit to the sum
num = Math.floor(num / 10); // Remove the last digit from the number
}
num = sum;
}
return num;
}


const inputNumber = 54321;
const result = sumOfDigits(inputNumber);
console.log(result);

kumarvivekpandeyrock
Автор

a possible simple solution to the coding question was:

function specialSum(num) {
const total = `${num}`.split('').reduce((acc, c) => +c + acc, 0);
return total > 9 ? specialSum(total) : total;
};

ozzyfromspace
Автор

Here's what I'd have done in that coding qn:

function addDigits(num){
var ans = 0
while(num !== 0){
let d = num%10;
num = Math.floor(num/10);
ans =ans+d;
}
return ans;
}

function looper(num) {
while(Math.floor(num/10) !== 0) {
num = addDigits(num);
}
return num;
}

var ans = looper(12345);
console.log(ans);

Mohit-bknu
Автор

I also answerd all the questions, thank u so much this type of video really give confidence

bishwajeetpandey
Автор

i like to convert figma design into react and because of this reason i never solve or learned js in depth but your last practical opened my eyes and i got to know that in order to get job i must practice js and learn its inbuild functions like .reduce () etc

akshupdf
Автор

At the last question he just had to change
if(inputdata)>=10 then add data(inputadddata)
else
return inputdata

sidhantnahak
Автор

1.What are pure functions
2.What are React pure component
3.What are higher order components
Explain with example
4. Typescript and example
5. Redux

vaishnavinambiar
Автор

Coding question was the call to select. 👍

vickypooniaholy
Автор

function addition(...rest) {
const arrList = rest
.map((elm) => elm)
.join()
.split("")
.map((el) => Number(el));
const sum = arrList.reduce((a, b) => (b += a));
if (sum < 10) return "Enter the value whose sum is in two digit number.";
else
return String(sum)
.split("")
.map((el) => Number(el))
.reduce((a, b) => a + b);
}

const res = addition(51);

console.log(res);

avinashthakur
Автор

Is English important ❓😶.
let English;
if(English==imp){
console.log("why")
}
else{
console.log("No")
}

OmDeshmukh
Автор

I have a upcoming tcs ine test and i applied for the React js developer role and since its test is conducted at one of the centres what kind of a technical test can i expect

Camaraderie_
join shbcf.ru