Polyfills of map , filter & reduce | Web Development in Hindi
HTML-код
- Опубликовано: 11 сен 2024
- Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. 🚨 Web Development: • Complete Web Developme...
🚨 JavaScript interviews: • Complete Web Developme...
🚨 Browser module: • Frontend with HTML CSS...
🚨 SQL Playlist: • Practical SQL series
Pepcoding has taken the initiative to provide counselling and learning resources to all curious, skillful and dedicated Indian coders. This video is part of the series to impart industry-level web development and programming skills in the community.
We also provide professional courses with live classes and placement opportunities.
For more free study resources and information about the courses, visit: www.pepcoding....
Have a look at our result: www.pepcoding....
Follow us on our RUclips page: / pepcoding
Follow us on our FB page: / pepcoding
Follow us on Instagram: / pepcoding
Follow us on LinkedIn: / pepcoding-education
Follow us on Pinterest: / _created
Follow us on Twitter: home
.
.
.
Happy Programming !!! Pep it up
.
.
.
#pepcoding #code #coder #codinglife #programming #coding #java #freeresources #datastrucutres #pepcode #competitive #competitiveprogramming #softwareengineer #engineering #engineer
🚨 JavaScript interviews series playlist: ruclips.net/p/PL-Jc9J83PIiEeD3I4VXETPDmzJ3Z1rWb4
let rA = [1,2,3,4,5]
function mypolyReduce(arr,acc,cb){
for(i=0;i
function polyfillMAP(arr, cb, v){
let sum = 0;
for(let i=0; i
Extremely easy to understand
Thank you for making this soo simple 🙏🏻
let a = [1, 2, 3, 4, 5];
function reduce(a, cb){
let newArr = [];
return cb(a);
}
function sum(arr){
let accumulator = 0;
for(let i = 0; i < arr.length; i++){
accumulator += arr[i];
}
return accumulator;
}
console.log(a);
console.log(reduce(a, sum));
Right?
function reduce(a, cb, acc) {
for(let i=0;i
// find sum of all element of array by custom method.
let array = [1,2,3,4,5,6]
let polyfillReduce= (arr,cb,accumulator) => {
let sum = accumulator
for(i=0;i{
return sum+x
}
console.log(array)
console.log(polyfillReduce(array,issum,0))
function polyFullReduce(arr,cb) {
let s=0;
for(let i=0;i
Sir browser ko videos kyu nhi aa rhi 2 din se?
My solution -
// cutom reduce or reduce pollyfill
function myReducePollyfill(arr, cb) {
let accumulator = 0;
for(let i=0; i
reduce polyfill
let array = [1,2,3,4,5]
function customReduce(arr,cb,accumulator,init){
console.log("Using custom reduce")
accumulator = init;
for(let i=0;i
My Solution for Reduce Polyfill-
let arr=[1,2,3,4];
function myReducePolyfill(cb,arr)
{
let total=0;
for(let i=0;i 10
Kindly check and suggest any rectifications :)
Happy Learning
const customReduce = (arr) => {
let sum = 0;
arr.forEach((element) => {
sum += element;
// console.log(sum);
});
return sum;
};
console.log(customReduce(arr));
const arrM=[2,3,4,12,34,22,17]
function reduceMap(arr,cb, acc){
for(let i=0; i
For better experience visit on nados.pepcoding.com
Also don't forget to follow our Instagram to stay updated.
instagram.com/pepcoding/
let myArr=[1,2,3,4,5,6];
function mypolyfillsreduce(arr,cb){
let ans=cb(arr,0);
return ans;
}
function sum(arr,x){
for(let i=0;i
function customReduce(array, callback, initialValue) {
let accumulator = initialValue !== undefined ? initialValue : array[0];
for (let i = initialValue !== undefined ? 0 : 1; i < array.length; i++)
accumulator = callback(accumulator, array[i]);
return accumulator;
}
const numbers = [1, 2, 3, 4, 5];
const sum = customReduce(numbers, (accumulator, current) => accumulator + current, 0);
console.log(sum); // Output: 15
const product = customReduce(numbers, (accumulator, current) => accumulator * current, 1);
console.log(product); // Output: 120
please make a video on async, await, ES6 promises
Aage aayengi videos
you are hardcode the polyfills , it's not correct method
this is not a good way you are not solving data structure question like we cannot call map like that
I love js but still i hate python