0
1

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 5 years have passed since last update.

JavaScript -- 入門編#1

Last updated at Posted at 2018-03-27

拡張子HTAで、最初に学ぶ、JavaScript。

<script>

// Lsn 001
alert('あああああああああああああああ');


// Lsn 002

testObject = function(){

  alert('BBBBBBBB');

}

testObject();


// Lsn 003

function User(){
  // private member
  var name = "山崎 太郎";

  // public member
  this.getName = function(){
    return name;
  };
}

var user01 = new User();

// 直接プライベートメンバーにはアクセス出来ない
alert(user01.name); // -> undefined

// パブリック・メソッド経由でプライベートメンバーにアクセスし、値を得る
alert(user01.getName()); // -> "山崎 太郎"



window.close();

</script>

0
1
0

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?