You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Write a function that returns the number provided as an argument multiplied by two, unless the argument is a double number; otherwise, return the double number as-is.
const twice = (num) => {
let numString = num.toString();
let leftNum = numString.slice(0, (numString.length / 2));
let rightNum = numString.slice((numString.length / 2));