VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Common Array Methods - Beau teaches JavaScript

Common Array Methods - Beau teaches JavaScript

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Learn how to use 10 different array methods in JavaScript. The array methods featured in this video are push, pop, concat, join, reverse, shift, unshift, sort, slice, and splice. Code: - http://codepen.io/beaucarnes/pen/WRdpvR?editors=0012 More information: - http://www.korenlc.com/common-javascript-array-methods/ See Briana Swift explain arrays and objects: https://youtu.be/yHLGUxt0EKc?list=PLWKjhJtqVAbmfoj2Th9fvxhHIeqFO7wOy Beau Carnes on
Date: 2022-03-14

Comments and reviews: 5


Hey, great tutorial! I'm having HUGE HEADACHE trying to solve this assignment. In an online made up store, the following are product SKU names, the quantity of each item ordered, and the location of the item in the warehouse. It needs to output the product SKU name and quantity only.
INPUT:
HL-OH-F1504P-CH-AM (1) 2EX2-4 / 2G-7 HID-LED-9004-LB (2) 2M-2_5FMK (1) 2ND FL
OUTPUT:
HL-OH-F1504P-CH-AM (1)
HID-LED-9004-LB (2)
FMK (1)
I'm so lost as how to delete all the fluff in between the product SKU's!!! Can anyone help?

reply

it's a bit alarming that some of these methods are modifying data (possibly w/out the programmer knowing) ... how do I know which methods will mod the data?... I thought data was to be immutable... e.g. input > function > output... it's supposed to be a one way street, right? How do I make sure that my functions are not modifying my orig. data?
reply

Hey Beau, this is a great video! Thank You! I would suggest for future videos, comment out the previous calls so its easier to follow. Its much easier to follow when you're returning/logging just one answer instead of everything prior.
reply

Can I pass an array as third argument of splice method?
e.g.
var arr = [-a-,-b-,-c-];
var arr2 = [-f-,-i-];
arr.splice(2,1,arr2);
And then arr would return [-a-,-f-,-i-,-c-]?

reply

Beau, you say -remember. Use your code for good.- Can you share your goodest (not a word) code that you-ve created? :D
Thanks for these videos as well.

reply
Add a review, comment






Other channel videos