I used JavaScript to clean the OceanLet's simulate ocean cleaning using JavaScript and Three JS After #TeamTrees MrBeast, Mark Rober has taken the initiative to clean oceans and created #TeamsSeas. We estimate to clean 30Million pounds of trash from the ocean by the end of 2021. And f...Nov 9, 2021 · 1 min readabblog.hashnode.dev
Simplest way to compare two numbers array in JSIn case of string we can simply use == or === to see if they are same but we can't use those to see in two arrays are similar or in other words they have same elements. So this wont work. const array1 = [1, 2, 3, 4, 5] const array2 = [1, 2, 3, 4, 5] ...Oct 20, 2021 · 2 min readabblog.hashnode.dev
Function call call call ...We usually call a function by using a set on parenthesis after its name eg. fun() but what if our function returned a function? In that case you would be able to call it again function hello(){ console.log("Hello"); return () => console.log("...Oct 20, 2021 · 1 min readabblog.hashnode.dev
Why is this code validAlthough this code looks really weird but its 100% valid and works perfectly. That is because if you use semicolon that just indicates end of a statement and a statement can be empty as well so ;; just means two empty statement. Likewise you can have...Oct 20, 2021 · 1 min readabblog.hashnode.dev