array methods

JavaScript Array Methods Part – 2 0

JavaScript Array Methods Part – 2

Program 1 // Array methods in Java Script “use strict” const ps=require(“prompt-sync”) const prompt=ps({sigint:true}) // let city=[“indore”,”agra”,”bhopal”,”delhi”,”mumbai”,”Ujjain”,”Raipur”] let myar=[12,4,7,8,244,88,34,22,98,12] let max=myar[0] let p=0 for(let i=1;i<myar.length;i++) { if(myar.at(i)>max) { max=myar.at(i) p=i } } console.log(“Maximum element...

swift arrays 0

Swift Arrays Tutorial

Arrays are one of the collection type data types in Swift. It stores and manages data elements. They are ordered collections of elements. In Swift, the index of arrays starts from 0, so they...