Skip to content

Instantly share code, notes, and snippets.

View emfluenceindia's full-sized avatar
📖
Open to work

Subrata Sarkar emfluenceindia

📖
Open to work
View GitHub Profile
@emfluenceindia
emfluenceindia / es6-object-destructuring-simple-example.js
Last active November 14, 2018 04:43
ES6 Object Destructuring - How it works: Simple example
//Declare a JavaScript complex object
const user = {
name: 'Subrata Sarkar',
age: 47,
gender: 'Male',
location: {
address: {
aptno: 'D3',
bldg: 'City Heights - Phase 9',
@emfluenceindia
emfluenceindia / es6-default-parameter-in-class-example.js
Created November 12, 2018 14:26
Default Parameters in ES6 - in classes
/**
A simple example of default parameter handling inside a JavaScript class which uses a constructor
*/
class paramValueExample {
constructor(x, y) {
this.x = 25;
this.y = 50;
this.fruits = ['banana', 'apple', 'grapes'];
@emfluenceindia
emfluenceindia / es6-default-parameter-example.js
Last active November 12, 2018 14:12
Default Parameters in ES6
// Default parameter syntax in ES6
// Until ES5 we were not able to declare a default value to function paramters
// ES6 gives us the liberty to do that
// Parameters value type has no restriction, it could either be an Integer or a String or an Array or even a JavaScript object
// *************************************************
// THE ES5 WAY: Let's see how we use to do it in ES5
// *************************************************/
var objAboutPerson = {
@emfluenceindia
emfluenceindia / es6-template-literal-example.js
Last active November 12, 2018 07:37
Template Literals in ES6 vs. conventional String Concatenation approach
<!DOCTYPE html>
<html>
<head>
<script>
function sum(x, y) {
/**
Using the conventional plus (+) opertior
for concatenating strings.
*/
@emfluenceindia
emfluenceindia / designer.html
Last active August 29, 2015 14:15
designer
<link href="../core-scaffold/core-scaffold.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../core-menu/core-menu.html" rel="import">
<link href="../core-item/core-item.html" rel="import">
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-menu/core-submenu.html" rel="import">
<link href="../google-map/google-map.html" rel="import">
<polymer-element name="my-element">
@emfluenceindia
emfluenceindia / designer.html
Last active August 29, 2015 14:15
designer
<link href="../core-scaffold/core-scaffold.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../core-menu/core-menu.html" rel="import">
<link href="../core-item/core-item.html" rel="import">
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-input/core-input.html" rel="import">
<link href="../core-menu/core-submenu.html" rel="import">
<link href="../google-map/google-map.html" rel="import">
<link href="../google-map/google-map-search.html" rel="import">