Write a function named createPromise that receives a number as a parameter.
The function should return a promise that resolves to:
It's positive! if the number is positiveIt's negative! if the number is negativenumber
=number
=Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro