Javascript. Variables. Dialogs, alerts

Home » Tutorials » JavaScript » Javascript. Variables. Dialogs, alerts
In last lesson we began to learn javascript. Today we’ll continue to discuss javascript basics – we’ll talk about variables, how to declare variables, also we’ll discuss 6 main types of data (number, string, boolean, null, undefined, object). Also we’ll consider alert, prompt and confirm dialogs.

Code lesson (HTML)

<!DOCTYPE html>
<html>
<head>
	<title>JavaScript</title>
	<meta charset="utf-8"/>
</head>
<body>
	
	
	<script>
		var a = 12.3;
		var str = "javascript";
		var isCheck = true;
		var b = null;
		var c;
		c = isCheck;
		console.log(c);
		var obj = {};
		console.log(obj);*/
		
		alert("Я изучаю javascript");
		
		var num = prompt("Введите что-нибудь");
		console.log(num);
		
		var answer = confirm("Вы любите javascript?");
		
		console.log(answer);
	</script>
</body>
</html>

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Pin It on Pinterest

Share This