JS Challenges Part1
JS Challenges Part1
public class {
// Function to demonstrate pattern
public static void printPattern(int n)
{
int i, j;
// Driver Function
public static void main(String args[])
{
int n = 6;
printPattern(n);
}
}
return j;
}
public static void main(String[] args)
{
int a[] = { 1, 1, 2, 2, 2 };
int n = a.length;
n = removeduplicates(a, n);
System.out.println();
}
// Driver code
public static void main(String args[]) {
if (value) {
result[++resIndex] = value;
}
}
return result;
}
console.log(filter_array([ 15, false, -22, undefined, 47, null]));
return true;
}
const array1 = [3, 4, 8];
const array2 = [1, 2, 3];
const array3 = [3, 4, 8];
console.log(compareArrays(array1, array2));
console.log(compareArrays(array1, array3));
8.
9.
print(multiply(2,4))
print(multiply(5,3))
output
8
15
11.
1. Using new keyword.