# Javascript

Javascript

## Given an array as input,find the largest number in the array.Using Javascript

let arr=[5,18,26,30,40,6]; function largest(arr) { let i; let max = arr[0]; for (i = 1; i < arr.length; i++) { if (arr[i] > max) max = arr[i]; } return max; } console...

Javascript

## Given an array,print the sum of the even and odd numbers in the array.Javascript Program

const number=[3,4,5,12]; let sum=0; let sum1=0; for(let i=0;i<number.length;i++) { if(number[i]%2==0) { sum=sum+number[i]; } else...

Javascript

## Given an array,print the sum and count of the multiples of 3 in the array. Javascript Program

const number=[3,4,5,12]; let sum=0; let count=0; for(let i=0;i<number.length;i++) { if(number[i]%3==0) { sum=sum+number[i]; count++; } } console...

Javascript

## What is an array.Why do we use arrays

An array is a data structure, which can store a fixed-size collection of elements of the same data type. An array is used to store a collection of data, but it...

Javascript

## Write a Javascript program for Insert Angular, React and Node after Javascript

const techs=['Python','Javascript','C','Java']; console.log(techs); for(let i=0;i<techs.length;i++) { if(techs[i]=='Javascript') { techs...

Posts