Tag: javascript
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is …
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: …
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it …
Last week, we bring the intelligence to Microbit (Microbit Programming: Introduction to AI – Letting Computer Play the Game), letting it play the apple-catching game. This week, we’ll design …
Last week, we present a apple-catching game in Microbit: Microbit Programming: How to Make a Catching-Apple Game by Using Sprites Objects? And my sons were fond of playing such, …