JavaScript Sets | JavaScript Tutorial In Hindi #58

preview_player
Показать описание


Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

// How to remove duplicate value of an array
// step-1 Make an Array named Arr-
let Arr = [45, 'this', false, 'this'];
console.log(Arr);

// step-2 convert an array to set using new keyword
let mySet = new Set(Arr);
console.log(mySet);

//step-3 convert a set into an array
let Array1 = Array.from(mySet);
console.log(Array1);

dharmendramandal
Автор

YES WE HAVE STUDIED SETS IN CLASS 11 IN MATHS

sparshgupta
Автор

yes we can convert sets in to array using let newarr = Array.from(variableOFSet); then just log it and it will typecast.,

MrNYT
Автор

function removeDuplicates(param){
param = new Set(param)
;
return Array.from(param)
;
}

mohitdahal
Автор

Rasgulle wali example ne to char chand laga diye bhai!

smumarhashmi
Автор

Yes, we can convert set into an array using Array.from(setName) -- This returns a new array with set elements.

Example:
let set1 = new Set([1, 2, 3, 3, 4, 5, 5])
let arrOfSet = Array.from(set1)
console.log(arrOfSet)

//Output:
[1, 2, 3, 4, 5] (Duplicate Elements are removed)

codexakshay
Автор

harry bhai, thanks yaar, it is best channel, keep it up ...

memepinch
Автор

16:25
Yes sir we can do this I try it and my output is :
My set to array is : (6) ["This", "My name", "That", 34, true, false]

khizrshaikh
Автор

Yes you can convert a set in an Array:-
let myArray = Array.from(mySet);
console.log(myArray);

webdevdecoded
Автор

Will you plz make video on “Data Structures -|| Stacks and Queues”.I am still watching your Python Tutorial.

AnandKumar-fpos
Автор

You are the best coder on YouTube!! Bro

yatinvohra
Автор

8:57
Nai bhai nai.... main ni tha 😂😂😂😂

farzamqureshi
Автор

Will you please make a video on “Data Structures" and "Algorithms"

pankajudasi
Автор

// Quiz
let anArray = [1, 1, 1, 2, 3, 4, 5]

// Converting anArray to an set
let set = new Set(anArray)
console.log(set)

//Converting set to an array again
let newArray = Array.from(set)
console.log(newArray)

arslannadeem
Автор

// Converting set to an array
let mySetArray = Array.from(mySet);
mySetArray.push("them");
// Duplicating the element
console.log(mySetArray);
// Converting to Set
let arrayToSet = new Set(mySetArray);
console.log(arrayToSet);
// Duplicate values are wiped out.

siddharthsable
Автор

const rray=[43, 6, 76, 45, 34, 6, 54, 34, 56, 56, 3, 35, 34, 65];
console.log(rray);
const arrayset=new Set(rray);
console.log(arrayset);
const array=arrayset;
console.log(array);

amantrivedi
Автор

YES, We can use Array.from on Set

let myArray = Array.from(mySet);
console.log(myArray);

// Removing duplicates from Array
let newArray = [1, 1, 1, 2, 2, 3, 3];
console.log(newArray);
let newSet = new Set(newArray);
newArray = Array.from(newSet);
console.log(newArray);
// Output: [1, 2, 3]

jha.abhinav
Автор

At 9:00 bhai kaan se khun nikalne wala tha.
baki aap to ho hi best.

mohitkumbhare
Автор

Thanks harry vai

//creating an sample array
let arr = [1, true, false, true, "this", "that"];
console.log(arr);

//Creating a set and giving it the value of arr
let currentSet = new Set(arr);
console.log(currentSet);

//Now the cuurent set converted into an array
let currentArr = Array.from(currentSet);
console.log(currentArr);

deepkar
Автор

console.log(Array.from(new Set("Nishant", "Prakash", "Vikash", "Prakash")));

nishanttheprogrammer