JavaScript Arrays | Must know JavaScript Array Methods | Learn JavaScript Array and Object in 2020

Published: 18 September 2020
on channel: Know It All Tech
94
0

In this video we will learn array in javascript.
we will define array.
assign the value to the innerHTML in html.
Change the value of Array with index.
We will see the difference in Array and Object.
//var fruits = ["banana", "orange", "apple"];
//document.getElementById("fruits").innerHTML = fruits;

// using new kekyword to define array
var fruits = new Array("orange", "banana","grapes");
document.getElementById("fruits").innerHTML = fruits;
document.getElementById("selectedFruit").innerHTML = fruits[1];

//change array value
fruits[2] = "papaya";
document.getElementById("fruits").innerHTML = fruits;

// check the type of variable fruits
console.log("Type of object fruits: "+ typeof fruits);

// define object
var car = {modal: "sedan", price: "10Lakh"};
console.log("Car modal: " + car["modal"]);

var carArray = ["car1", "car2", "car3"];
carArray[2] = car;
console.log("CarArray:" + carArray);
console.log("carObject at index 2 - " + carArray[2].modal);
document.getElementById("noOfTypes").innerHTML = "there are " +fruits.length + " types of fruits " + fruits.sort();


subscribe to learn:
HTMl,Object Oriented Programming,AngularJS,Angular10,Angular9,Angular8,Angular7,Angular2,javascript,js,sql,sql server,programming,coding,algorithm,rxjs,rxjs operator,map,tap,retry,debounce,operator,learn programming,learn javascript program,learn angualr,angular module,component,angular component,router,route,route map,routemap,routerLink,route ROuter,parammap observable,observable,subject,subject observable,behavior subject,async subject,replay subject,complete in subject,next,next in subject,angular feature,angular CLI,CLI,generate component,generate service in angular,module,angular module,sort array,array,angular structural directive,*ngIf,*ngSwitch,*ngDefaultCase,*ngFor,template,angular template,angular view template,angular class,angular style,define class in angular,define property in angular,define events in angular,passing data between component,route parameters,route module,navigate,nagivatebyUrl,angular navigation,angular route,global method in javascript,javascript tutorial,javascript functions,javascript events,call javascript methods,wildcard route in angular,wildcard in urls,pathmatch in angular,redirectTo in angular,services in angular,how to use service in angular,how to use dependency injection in angular,dependency injection,router-outlet directive,pipes,pipe in angular,pipes in angualr,pure pipes in angular, impure pipes in angular,custom pipe in angualr,change detection in angular,ng-template,ng-container,use of ng-template in angular,use of ng-container in angular,angular event binding,binding property in angular,hostlistener,hostlistener in angular,angular architecture,create angular application,create new angular application,add subscribers in observable,add or remove subscriber to observable,next,complete,error,call next in observable,call error in observable,call complete,observable observers,@ViewChild component,debounce operator RxJS,concate operator,combineLatest,mergeMap,mergeAll,map,switchMap,building an angular app with akita,event emitter,eventemitter,database,visual studio,c#,dot net,mvc,class,object


On this page of the site you can watch the video online JavaScript Arrays | Must know JavaScript Array Methods | Learn JavaScript Array and Object in 2020 with a duration of hours minute second in good quality, which was uploaded by the user Know It All Tech 18 September 2020, share the link with friends and acquaintances, this video has already been watched 94 times on youtube and it was liked by 0 viewers. Enjoy your viewing!