-
FORUM
-
2
Print from 1 to 20
<p>Create a function that prints/logs all the integers from 1 to 20.</p> <figure><iframe style="width: 500px; height: 281px;" src="//player.vimeo.com/video/389911697" ></iframe></figure> <h2>New to ... -
3
Print Odd from 3 to 20
<p>Create a function that prints/logs all the odd numbers from 3 to 20.</p> <figure><iframe style="width: 500px; height: 281px;" src="//player.vimeo.com/video/389909614" ></iframe></figure> <h2>New ... -
4
Print Even from 4 to 22
<p>Create a function that prints/logs all the even numbers from 4 to 22.</p> <h2>New to coding?</h2> <p>If you're completely new to coding, please first try <a target="_blank" href="https://algorith ... -
5
Multiples of 7
<p>Print/log all the multiples of 7 between the numbers 7 to 62.</p> -
6
Countdown by Fives
<p>Log positive numbers starting at 50, counting down by fives (exclude 0).</p> -
7
First Plus Length
<p>Given an array, print/log the sum of the first value in the array, plus the array’s length. Assume that the array is composed of numbers</p> -
8
Print Even from 4 to 22 - Part 2
<p>Create a function that prints/logs all the even numbers from 4 to 22.</p> <p>Have it also return the sum of all the numbers that were printed.</p> -
9
Add odd integers from -25000 to 30000
<p>Add odd integers from -25,000 to 30,000 and have the function return its final sum. Is there a short cut?</p> <p>Before you work on this, please watch the following video:<br> </p> <figure><ifr ... -
10
Print the array
<p>Given an array, write a function that prints/logs each number in the array.</p> -
11
Print Positives
<p>Given an array, write a function that only prints/logs its positive value. For example printPositives([-1,3,-5, 10]) prints/logs 3, 10.</p> -
12
Print Positive Indexes
<p>Given an array, write a function that prints the index value of its positive values. </p> <p>For example printPositiveIndex([1, 3, -10]), have it print/log 0, 1 (as the 0th index had a positive v ... -
13
Be Positive
<p>Given an array, write a function that returns a new array where each negative value was converted to a positive value. For example, bePositive([-1,-3,-5]) returns [1, 3, 5]. A positive number in ... -
14
Squares
<p>Given an array with multiple values, write a function that replaces each value in the array with the product of the original value multiplied by itself. For example squareVal( [1, 3, 5] ) should r ... -
15
No Negatives
<p>Given an array with multiple values, write a function that replaces any negative numbers within the array with the value of 0. When the program is done the array should contain no negative values. ... -
16
Sum of Array
<p>Given an array of multiple values, write a function that returns the sum of its numbers. For example, findSum([1,2,3]) should return 6.</p> -
17
Find max
<p>Given an array with multiple values, write a function that returns the maximum number in the array. For example, findMax([-3,3,5,7]) should return 7.</p> -
18
Find min
<p>Given an array with multiple values, write a function that returns the minimum value in the array. For example findMin([0,3,-5]) should return -5.</p> -
19
Find min and max
<p>Given an array with multiple values, write a function that returns a new array with two elements. The first value in the new array should be the minimum value in the original array. The second va ... -
20
Count Positives
<p>Given array of numbers, create function to replace last value with number of positive values. Example, countPositives([-1,1,1,1]) changes array to [-1,1,1,3] and returns it.</p> -
21
Values Greater than Second
<p>Given an array, write a function that prints values that are greater than its 2nd value in the array. For example, given [1,3,5,7,9,13], it should print/log 5, 7, 9, and 13. Assume that the arra ... -
22
This Length That Value
<p>Given two numbers passed to the function, return a new array of length num1 with each value num2. For example, thisLengthThatValue(3,5) should return [5, 5, 5]. thisLengthThatValue(2, 10) should ... -
23
Add Seven to Most
<p>Build function that accepts array. Return a new array with all values except first, adding 7 to each. Do not alter the original array.</p> <p>For example, addSevenToMost([1,3,5]) should return [10 ... -
24
Values Greater than Second Generalized
<p>Write a function that accepts any array, and returns a new array with the array values that are greater than its 2nd value. If the array that was passed to the function has less than two elements, ... -
25
Swap Values
<p>Write a function that will swap the first and last values in any given array. The default minimum length of the array is 2. For example swapFirstLast([1,3,5]) should return [5, 3, 1]. swapFirstL ... -
FORUM