- 3

JavaScript

Hi!Iā€™m new.Help me, please in JavaScript 9.2.How make this?

28th Sep 2021, 3:04 PM
ShAzAM
ShAzAM - avatar
6 Answers
+ 2
Please show your attempt. Or you can follow the steps: 1. Check for whether the age is greater than or equal to 18 2. If true, then print 'true' 3. If not true then print 'false' HINT: To print true/false use console.log(); That's all.
28th Sep 2021, 3:18 PM
Rupali Haldiya
Rupali Haldiya - avatar
+ 1
Huhh! No.. you only need to change below the line which says "your code goes here". //your code goes here if (age >= 18) console.log(true); else console.log(false); Hope it helps
28th Sep 2021, 5:46 PM
Rupali Haldiya
Rupali Haldiya - avatar
0
can you give all code?
28th Sep 2021, 5:15 PM
ShAzAM
ShAzAM - avatar
0
ShAzAM nope, I given you complete algo, please try to implement that by your own. And if you're getting stuck, please revisit on previous chapters specially read about If-else, how they works. I hope you'll solve that by your own. Happy Coding.
28th Sep 2021, 5:29 PM
Rupali Haldiya
Rupali Haldiya - avatar
0
var num1 = parseInt(readLine(), 10); var num2 = parseInt(readLine(), 10); //Š²Š°Ńˆ ŠŗŠ¾Š“ console.log(10==10) ? "True"; "False";
28th Sep 2021, 5:39 PM
ShAzAM
ShAzAM - avatar
0
THANK YOU!!!
28th Sep 2021, 6:20 PM
ShAzAM
ShAzAM - avatar