2 Haziran 2016 Perşembe

Null kullanma ciğerini yidiiim

Typescript microsoft dökümantasyonunda olay açıkça abilerimiz tarafından belirtilmiş.

" TypeScript team doesn't use null : TypeScript coding guidelines and it hasn't caused any problems. Douglas Crockford thinks null is a bad idea and we should all just use undefined "

https://basarat.gitbooks.io/typescript/content/docs/tips/null.html

Yani kullanma abicim diyorlar. Ayrıca null diye birşey var evet ve undefined ile aralarındaki mantıksal durum şu şekilde belirtilmiş.


/// Image you are doing `foo == undefined` where foo can be one of:
console.log(undefined == undefined); // true
console.log(null == undefined); // true
console.log(0 == undefined); // false
console.log('' == undefined); // false
console.log(false == undefined); // false
evet eşit gibi gözüküyorlar çünkü null == undefined ama eşek olmamak lazım lütfen :D
Öpüyom...

Hiç yorum yok:

Yorum Gönder