This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="header"> | |
<!-- Algum conteúdo --> | |
</div> | |
<div id="menu"> | |
<!-- Links do menu --> | |
</div> | |
<div id="content"> | |
<!-- Conteúdo da página --> | |
</div> | |
<div id="footer"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<!-- Algum conteúdo --> | |
</header> | |
<nav> | |
<!-- Links do menu --> | |
</nav> | |
<div role="main"> | |
<!-- Conteúdo da página --> | |
<!-- O uso da tag div com um atributo role, foi escolhido pois neste caso é entendido apenas como um container --> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isUndefined(value) | |
{ | |
return value === undefined; | |
} | |
window.undefined = 123; | |
var x; | |
console.log(isUndefined(x)); | |
console.log(isUndefined(123)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(undefined) | |
{ | |
function isUndefined(value) | |
{ | |
return value === undefined; | |
} | |
window.undefined = 123; | |
var x; | |
console.log(isUndefined(x)); | |
console.log(isUndefined(123)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myvar; // local variable, value = undefined | |
window.undefined; // global property, value = undefined | |
if (myvar === undefined) // comparando myvar com a propriedade global (undefined === undefined) | |
{ | |
// algum código que será executado | |
} | |
window.undefined = 123; // global property, value = 123 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void teste() | |
{ | |
for(int i = 0; i < 10; i++) | |
{ | |
Console.WriteLine(i); // 1 - 9 | |
} | |
Console.writeLine(i); // erro | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// função original | |
function teste() | |
{ | |
if(foo()) | |
{ | |
var bar = 10; | |
} | |
function foo() | |
{ | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// função original | |
function fazerAlgumaCoisa() | |
{ | |
x = 10; | |
if (x > 9) | |
{ | |
for(var x = 5; x > 1; x--) // 5 - 2 | |
{ | |
console.log(x); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// função após o hositing | |
function fazerAlgumaCoisa() | |
{ | |
var x; | |
window.x = 10; | |
if (window.x > 9) | |
{ | |
for(x = 5; x > 1; x--) | |
{ | |
console.log(x); // 5 - 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('Grid', { | |
extend: 'Ext.grid.Panel', | |
grouping: false, | |
constructor: function(cfg) | |
{ | |
if (cfg.grouping) | |
{ |
OlderNewer