Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python #912

Open
mohammwdofficial opened this issue Jan 21, 2025 · 1 comment
Open

Python #912

mohammwdofficial opened this issue Jan 21, 2025 · 1 comment

Comments

@mohammwdofficial
Copy link

<p>
	If time is less than 16 it will show "Have a nice day". 
	<br /> 
	else it will show "Good night".
</p>

<button onclick="myFunction()">Click me</button>

<p id="demo"></p>

<script>
	function myFunction() {
		
		var x = "";
		var time = new Date().getHours();
		
		if (time < 16) {
			
			x = "Have a nice day";
			
		} else {
			
			x = "Good night";
			
		}
		
		document.getElementById("demo").innerHTML = x;
	}
</script>

My lesson highlights! Check it out on your phone in Programming Hub: https://goo.gl/D2iETN

@Valadares24
Copy link

Nice trainning task homie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants