Copy Sign to Number

# Introduction In this lab, we will explore the `copySign` function in JavaScript, which returns the absolute value of the first number but with the sign of the second number. We will learn how to use the `Math.sign()` method to check for the sign of the two numbers and how to conditionally return the appropriate value. By the end of this lab, you will have a better understanding of how to manipulate numbers in JavaScript.

|
60 : 00

Click the virtual machine below to start practicing