0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

JavaScriptの基礎

Posted at

JavaScriptの基礎を復習しました。

まだまだHTMLとCSSを組み合わせて、カレンダーを作ることを目指しています。

学習したコード

var firstName = 'myname';
var age = 32;
console.log(firstName + '' + ' is' + age);

var job, is front engineer;
job = 'driver';
is front engineer = false;

console.log(firstNa me + 'is a ' + age + ' year old ' + job +'.Is I front engineer? ' + is front engineer);
// Variable mutation
age = 'thirty two';
job ='office worker';

alert(firstName + 'is a ' + age + ' year old ' + job +'.Is I front engineer? ' + is front engineer);
 var lastName = prompt('What is my last name?');
 console.log(firstName + ' ' +lastName);

alertのメッセージをクリックして、 promptにlastName(苗字)を入力できる。

C#をJavaScriptに変換する。

var seireki=0;
        var heisei=0;
        for( seireki=1989; seireki<=2017; seireki++)
        {
            Console.log("西暦 " + seireki + "年は、");
            heisei = seireki - 1988;
            Console.log("平成 " + heisei + "年");

上のコードは、エラーが出るかもしれません。For, loopのコードを調べてみます。

今日の振り返り

JavaScriptの基礎固めして、カレンダー作りに必要なコードを覚える。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?