How can i do control on my phone using date and time on sololearn to take action depend on certian time on phone? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i do control on my phone using date and time on sololearn to take action depend on certian time on phone?

11th Nov 2018, 11:31 PM
hesham afanb
hesham afanb - avatar
2 Answers
+ 2
You can use the date object from javascript and some statements to do what you want. Try to learn the javascript course on sololearn and you will also find more about the date object tutorial. Example code : var x = ""; var time = new Date().getHours(); if (time < 21) { x = "Have a nice day";
14th Nov 2018, 2:09 AM
Nashid Ayman
Nashid Ayman - avatar
+ 1
Thanks i will
14th Nov 2018, 6:56 PM
hesham afanb
hesham afanb - avatar