0

Can anyone help me with the code function in JavaScript that takes a parameter and outputs its double. This is the code.

Function double() { Output num*2 }

21st Jul 2022, 9:39 PM
Joshua Ukaka
Joshua Ukaka - avatar
6 ответов
+ 8
Sure! Can you please show us your code attempt so we can check on it?
21st Jul 2022, 9:48 PM
Lisa
Lisa - avatar
+ 3
From your profile I can see that you did the Web Development Fundamentals courses. Please have a look at lesson 33.1 on functions again, especially the section with the heading "Parameters". Also take a close look at the spellings of keywords, for example it is "function", not "Function". If you need more help, you can show us your updated code here.
22nd Jul 2022, 10:36 AM
Lisa
Lisa - avatar
+ 2
Remember that JavaScript tries to guess what data type you want to use, so if it guesses wrong then you can use what's called "implicit type coercion" to tell it use the right type.
21st Jul 2022, 10:20 PM
Ian James
0
Alright Thanks a lot
22nd Jul 2022, 6:49 PM
Joshua Ukaka
Joshua Ukaka - avatar