JavaScript Arrays 2 Downloadable Source Code Guides code examples

Clear Array of Duplicates and empty values const arr = [‘Laurence’,’Jack’,’Jane’,”,,,,’Sam’,’Laurence’,’Jack’,’Jane’,”,null,false,undefined,0,’Sam’]; console.log(arr); const arr1 = [… new Set(arr)]; console.log(arr1); const arr2 = arr.filter(Boolean); console.log(arr2); const arr3 = [… new Set(arr.filter(Boolean))]; console.log(arr3); How to loop through an array const arr = [‘Laurence’,’Linda’,’Joe’,’Jane’]; console.log(arr); console.log(‘****FOR’); for(let i=0;i<arr.length;i++){    console.log(arr[i]); } console.log(‘****WHILE’); let i=0; while(i<arr.length){    console.log(arr[i]);    i++; } console.log(‘****ForEach’); … Read more

How to Check for overlap Between Two Page elements Colission Detection

Check out the Collision Interactive at Commonly in Games when page elements are moving, there needs to be a way to check if overlap has occurred. There is a formula that can be used which checks the x,y position of each element, as well needs the width and height of the element. X-Horizontal check formula … Read more

Updated AJAX Course Content AJAX for beginners explore JavaScript Requests to APIs

New course updates learn AJAX https://www.udemy.com/course/ajax-bootcamp-learn-asynchronous-javascript-and-xml/?referralCode=3B098389348B2D76C962 AJAX requests with JavaScript coding examples Explore AJAX and how you can use AJAX to connect to web API endpoints and get Data. Load JSON data from external sources with JavaScript. XHR object and modern JavaScript fetch to make requests Example of how AJAX can be used to update … Read more