Skip to content

Instantly share code, notes, and snippets.

View jw-jenrise's full-sized avatar

John Wilfred Adaikalam Selvaraj jw-jenrise

View GitHub Profile
// JAVASCRIPT IS DYNAMICALLY TYPED
var age = 30;
console.log("Age = " + age); // Display's age
console.log("Type of variable age = " + typeof(age)); // Type of variable
console.log("--- Dynamically typed ---")
age = "new born"; // Proof JavaScript is dynamically typed
console.log("Type of variable age = " + typeof(age)); // Type has changed
@jw-jenrise
jw-jenrise / Map2Mutate.java.snippet
Last active December 3, 2017 22:51
A map function that would mutate the incoming collection set boolean and return the mutated list
//
getAssociatedServicesFromOrder(orderForm)
.stream()
.map(
servie -> return service.withAdditionalFeatures(interestedServices.contains(ts.getSecondaryService()))
)
.collect(Collectors.toList()
//
@jw-jenrise
jw-jenrise / func_js_hoisting
Last active October 24, 2017 23:31
Function names do not support hoisting.
Function names do not support hoisting.