Skip to content

Instantly share code, notes, and snippets.

View simplifyjs's full-sized avatar
:octocat:
Bugs investigator

Simplify JS simplifyjs

:octocat:
Bugs investigator
View GitHub Profile
@simplifyjs
simplifyjs / Tricky parts of null, undefined and NaN
Last active December 6, 2019 09:33
Comparison and Tricky parts of null, undefined and NaN
if(undefined) // false
if(null) // false
if(NaN) // false
!undefined // true
!null // true
!NaN // true
+undefined // NaN
+null // 0
// Break in outer for loop
var str = 0;
outerloop:
for (var i = 0; i < 3; i++) {
console.log("I: " + i);
innerloop:
for(var j = 0; j < 5; j++) {
if(j === 2) {
break outerloop;
@simplifyjs
simplifyjs / Angular Material - Grid pattern
Last active December 6, 2019 02:47
Angular Material - Grid pattern
import { Component } from '@angular/core';
export interface Box {
color: string;
cols: number;
rows: number;
text: string;
}
@Component({
@simplifyjs
simplifyjs / Grid API | Simplify JS Demo
Last active December 6, 2019 02:47
Grid API | Simplify JS Demo
<h2>Grid 1</h2>
<div
gdAreas="header header | content side | footer footer"
gdGap="16px"
gdRows="auto auto auto">
<div gdArea="header">
Header
</div>
<div gdArea="side">
Side Bar
@simplifyjs
simplifyjs / Flex-layout Module | Simplify JS Demo
Last active December 6, 2019 02:48
Flex-layout Module | Simplify JS Demo
<h2>Style 1</h2>
<div
fxLayout="row"
fxLayout.xs="column"
fxLayoutAlign="space-between">
<div class="box box1">Box 1</div>
<div class="box box2">Box 2</div>
<div class="box box3">Box 3</div>
<div class="box box4">Box 4</div>
<div class="box box5">Box 5</div>