var
val = 2;
str =
'ru'
;
function
funMake() {
switch
(val) {
case
1:
document.write(
'Привет Мир!'
+
'<br />'
);
break
2:
'Hello World!'
default
:
'To be or not to be?'
}
(str) {
'en'
fun(arg) {
(arg) {
return
arg * arg;
3:
document.write(fun(2));
var val = 2; var str = 'ru'; function funMake() { switch(val) { case 1: document.write('Привет Мир!' + ''); break; case 2: document.write('Hello World!' + ''); break; default: document.write('To be or not to be?' + ''); break; } switch(str) { case 'en': document.write('Hello World!' + ''); break; case 'ru': document.write('Привет Мир!' + ''); break; default: document.write('To be or not to be?' + ''); break; } function fun(arg) { switch(arg) { case 1: return arg * arg; case 2: return arg * arg; case 3: return arg * arg; default: document.write('To be or not to be?' + ''); break; } } document.write(fun(2)); }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
funMake();