(2 ). Overview
Let’s start by looking at building blocks in any language.
String objects are used to represent and manage the order of letters.
Strings are needed to hold data that can be presented in text form
const string1 = “This is a string”
const string2 = ‘This is another string’
const string3 = `This is also another string`
Number is a primitive wrapped object which is 21 or -5.5 etc. It is used to represent and manage the like number. The number contains constants and methods for dealing with construct numbers. Other types of values can be converted to numbers using the number ( ) function. When a number is used as a function, the number (value) converts a string or other value into a type of number.
If the value cannot be converted, it returns ( NaN )
525 //five-hundred twenty-five
525 === 525.0 //true
Number(‘525’) //returns the number 525
Number(‘525’) === 525 //true
Math is a built-in object that has properties and methods for mathematical constants and functions , It is not a function object.It works with math number type BigInt Doesn’t work with it.
The concat () method is used to merge two or more arrays.
This method does not replace existing arrays, instead rendering a new array.
const array1 = [‘a’, ‘b’, ‘c’] ;
const array2 = [‘d’, ‘e’, ‘f’];
const array3 = array1.concat(array2);
// expected output ; Array [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’];
The every () method checks whether all the elements in the array pass the test implemented by the universal function. It provides a Boolean Man.
const isBelowThreshold = (currentValue) => currentValue < 40;
const array1 = [1, 30, 39, 29,10, 13];
//expected output : true
The filter () method creates a new array with all the elements that pass the test applied by the given function.
const numbers = [32, 33, 16, 40]
const result = numbers.filter(number => number > 18)
//expected output : Array [32, 33, 40]
SSL is a security technology. It is a protocol for servers and web browsers that ensures that the data passed between the two is private.