JavaScript『Object{}』

投稿者marineプレイ回数1026お気に入り1
難易度(4.5) 2218打 英語タグJavaScript 暗記用 Object プログラミング
JavaScript 暗記用です
文字数2000文字以上になってしまいました…(^^;
★情報元のサイト様★
「とほほのWWW入門」http://www.tohoho-web.com/www.htm
「MDN」https://developer.mozilla.org/ja/docs/Web/JavaScript
順位 名前 スコア 称号 打鍵/秒 正誤率 時間(秒) 打鍵数 ミス 問題 日付
1 itijiku2 4891 エキスパート! 5.1 94.5% 427.5 2218 127 39 2021/09/20
2 mh 2757 すごいね! 2.8 96.5% 775.8 2218 79 39 2021/09/19
3 いわお 1328 もう一歩! 1.5 88.5% 1453.0 2218 288 39 2021/10/07

関連タイピング

問題文

ふりがな非表示 ふりがな表示

(Object)

Object

(obj={key1:value1,key2:value2})

obj={key1:value1,key2:value2}

(prototype)

prototype

(property)

property

(method)

method

(const p={os:'mac',info:function(){alert(`${this.os}`);}}; const c=Object.create(p);c.os='win';c.info();)

const p={os:'mac',info:function(){alert(`${this.os}`);}}; const c=Object.create(p);c.os='win';c.info();

(const d=new Date();Date.prototype.d1='2020'; console.log(d.d1);)

const d=new Date();Date.prototype.d1='2020'; console.log(d.d1);

(const user={name:'Nana',age:20}; Object.getPrototypeOf(user);)

const user={name:'Nana',age:20}; Object.getPrototypeOf(user);

(const p={x:7,y:8,re:function(){return this.x*this.y;}}; const c={};Object.setPrototypeOf(c,p);c.re();)

const p={x:7,y:8,re:function(){return this.x*this.y;}}; const c={};Object.setPrototypeOf(c,p);c.re();

(function p(){};const c=new p(); alert(p.prototype.isPrototypeOf(c));)

function p(){};const c=new p(); alert(p.prototype.isPrototypeOf(c));

(const obj={x:100,y:200}; console.log(Object.keys(obj));)

const obj={x:100,y:200}; console.log(Object.keys(obj));

(const obj={x:10,y:20}; console.log(Object.values(obj));)

const obj={x:10,y:20}; console.log(Object.values(obj));

(const obj={x:1,y:2}; console.log(Object.entries(obj));)

const obj={x:1,y:2}; console.log(Object.entries(obj));

(const obj=Object.fromEntries([['x',1],['y',2]]); console.log(obj);)

const obj=Object.fromEntries([['x',1],['y',2]]); console.log(obj);

(const obj={x:10,r:function(){}}; alert(Object.getOwnPropertyNames(obj));)

const obj={x:10,r:function(){}}; alert(Object.getOwnPropertyNames(obj));

(Object.getOwnPropertySymbols(obj))

Object.getOwnPropertySymbols(obj)

(const c=Object.create({x:1});c['y']=200; alert(c.hasOwnProperty('y'));)

const c=Object.create({x:1});c['y']=200; alert(c.hasOwnProperty('y'));

(const obj={};obj.key1=1; alert(obj.propertyIsEnumerable('key1'));)

const obj={};obj.key1=1; alert(obj.propertyIsEnumerable('key1'));

(const obj={};Object.defineProperty(obj,'key2',{value:2,}); console.log(obj.key2);)

const obj={};Object.defineProperty(obj,'key2',{value:2,}); console.log(obj.key2);

(Object.defineProperty (obj,'key3',{value:3,writable:true});)

Object.defineProperty (obj,'key3',{value:3,writable:true});

など

(Object.defineProperty (obj,'key4',{value:4,configurable:true});)

Object.defineProperty (obj,'key4',{value:4,configurable:true});

(Object.defineProperty(obj,'k5',{value:5,enumerable:true}); for(let p in obj){console.log(p);})

Object.defineProperty(obj,'k5',{value:5,enumerable:true}); for(let p in obj){console.log(p);}

(Object.defineProperty(x,'a',{get(){alert(a);return a;}, set(value){alert(value);a=value;}});x.a=1;var n=x.a;)

Object.defineProperty(x,'a',{get(){alert(a);return a;}, set(value){alert(value);a=value;}});x.a=1;var n=x.a;

(Object.defineProperties (obj,{a:{value:1,},b:{value:2},});)

Object.defineProperties (obj,{a:{value:1,},b:{value:2},});

(const obj={key8:8}; console.log(Object.getOwnPropertyDescriptor(obj,'key8'));)

const obj={key8:8}; console.log(Object.getOwnPropertyDescriptor(obj,'key8'));

(const obj={a:1}; console.log(Object.getOwnPropertyDescriptors(obj));)

const obj={a:1}; console.log(Object.getOwnPropertyDescriptors(obj));

(const obj={x:1};Object.freeze(obj); obj.x=2;console.log(obj.x);)

const obj={x:1};Object.freeze(obj); obj.x=2;console.log(obj.x);

(alert(Object.isFrozen(obj));)

alert(Object.isFrozen(obj));

(obj={x:1};Object.seal(obj); obj.y=3;obj.x=2;console.log(obj);)

obj={x:1};Object.seal(obj); obj.y=3;obj.x=2;console.log(obj);

(alert(Object.isSealed(obj));)

alert(Object.isSealed(obj));

(const obj={x:1};Object.preventExtensions(obj); obj.z=3;console.log(obj);)

const obj={x:1};Object.preventExtensions(obj); obj.z=3;console.log(obj);

(console.log(obj.constructor);)

console.log(obj.constructor);

(const tg={key1:1};const obj1={key2:2}; Object.assign(tg,obj1);console.log(tg);)

const tg={key1:1};const obj1={key2:2}; Object.assign(tg,obj1);console.log(tg);

(Object.is(123,123); Object.is(-0,0);)

Object.is(123,123); Object.is(-0,0);

(console.log(new Number(2.3).valueOf());)

console.log(new Number(2.3).valueOf());

(const x={_y:'',set y(y){alert(y);this._y=y;}, get y(){alert(this._y);return this._y;}};x.y=1;y=x.y;)

const x={_y:'',set y(y){alert(y);this._y=y;}, get y(){alert(this._y);return this._y;}};x.y=1;y=x.y;

(const a={x:2};const b={y:4,z:6}; const c={...a,...b};console.log(c);)

const a={x:2};const b={y:4,z:6}; const c={...a,...b};console.log(c);

(const{x,y,...rest}={x:2,y:4,z:6,r:8}; console.log(rest);)

const{x,y,...rest}={x:2,y:4,z:6,r:8}; console.log(rest);

(function User(n,a){this.N=n;this.A=a;} new User('Mari',20);)

function User(n,a){this.N=n;this.A=a;} new User('Mari',20);

問題文を全て表示 一部のみ表示 誤字・脱字等の報告

◆コメントを投稿

※誹謗中傷、公序良俗に反するコメント、歌詞の投稿、宣伝行為は禁止です。

※ランキング登録した名前で投稿されます。

※コメントは日本語で投稿してください。

※歌詞のコメントは著作権侵害となります。投稿しないでください!