+ 2

How do I make this js run in html

//trying hands on Math in js [plus and minus] plus = (a,b) => ( a + b) console.log(plus (1,2)) // ans is 3 console.log (plus(120,200)) // ans is 320 minus = (a,b) => (a - b) console.log (minus (20,15)) //ans is 5 document.write(minus (500,300)) //ans is 200

9th Jun 2019, 11:25 PM
Emmanuel Arthur
2 Respuestas
+ 5
By putting this JS inside of <script></script> tag in head or body. Although if you're using this Sololearn app, you can directly put JavaScript on JavaScript tab in web code playground.
10th Jun 2019, 2:04 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 3
Yes
10th Jun 2019, 7:18 AM
‎وائل عبد الحق‎
‎وائل عبد الحق‎ - avatar