//== and != indicates implicit check while === and !== are explicit check. This way the operator compares the pure values. This is different because exlicit check would be false. 1 is not the same as "1".
1=="1"
1==="1"
// AND operations &&
true&&false
false&&false
true&&false
true||true
true||false
false||false
// putting the values in a bracket [] separated by commas create a datatype array
[1,2,3]
// arrays can consist of elements of different data types
arr=["hello",1,4,3,2,"bye"]
// can index into the element in array
arr[1]
// -1 index doesn't work for javascript to access the last element
arr[-1]
arr.length
arr[arr.length-1]
arr.indexOf(2)
//slicing from left, python equivalent of arr[2:]
arr.slice(2)
//slicing from right, python equivalent of arr[-2:]
arr.slice(-2)
//slicing from both sides, python equivalent of arr[2:4]
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.