Multiply Every Array Item by Two

Published by Matt in

Create a function that takes an array with numbers and return an array with the elements multiplied by two.

Examples

get_multiplied_arr([2, 5, 3]) ➞ [4, 10, 6]

get_multiplied_arr([1, 86, -5]) ➞ [2, 172, -10]

get_multiplied_arr([5, 382, 0]) ➞ [10, 764, 0]

Notes

N/A

Watch a quick demo on how Edabit works.