WAP where if element is even , multiply by 2 and if element is odd , multiply by 3.
let n = [ 1 , 2 , 3 , 4 , 5 ] function modifyArray ( nums ) { let…
Read morelet n = [ 1 , 2 , 3 , 4 , 5 ] function modifyArray ( nums ) { let…
Read morefunction getSecondLargest ( nums ) { //remove any duplicate from array let a…
Read more// multiple each element with 2 and return only those element which are greater than 10…
Read moresplice() methods : -- splice(starting index , deleting index , update/delete element) con…
Read moreMethod 1 : console . log ( "before reverse " , s ) let result =…
Read moreeg 1: input : abfsdfsc outpur : false eg 2: input: ifsjfsi output : true let regex = …
Read morefunction fac ( n ) { let fact = 1 ; if ( n == 1 || n == 0 ){ …
Read moreindex.html : --------------- <!DOCTYPE html> <html lang="en"> <hea…
Read moreindex.html: -------------- <!doctype html> <html lang="…
Read more
Follow Us