Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript =>

// Javascript => is called Arrow Function: A short syntax for functions

hello1 = function(name) {
  return "Hello " + name + "!";
} // can be replaced with arrow function. See below.

hello2 = (name) => { return "Hello " + name + "!"; } // Arrow Function =>

hello3 = (name) => "Hello " + name + "!"; // Even shorter =>

console.log(hello1("Alice"), hello2("Bob"), hello3("Ada"))
Comment

!= javascript

// " != " in Javasacript means : not equal.
Comment

() = javascript

//Normal function
function sum(a, b) {
  return a + b;
}

//Arraw function
let sum = (a, b) => a + b;
Comment

PREVIOUS NEXT
Code Example
Javascript :: mongoose multiple populate 
Javascript :: can you call a function within a function javascript 
Javascript :: javascript filter array of objects by key 
Javascript :: react native only 1 corner rounded 
Javascript :: jquerry in bootstrap 
Javascript :: replace object in array with another array with same id javascript 
Javascript :: format date javascript 
Javascript :: javascript fibonacci example 
Javascript :: js loop backwards 
Javascript :: Create MD5 hash with Node.js 
Javascript :: Jscript for date suffix 
Javascript :: react scroll to bottom 
Javascript :: string to date js 
Javascript :: convert string to uppercase 
Javascript :: javascript code to calculate compound interest 
Javascript :: how to get key from value in javascript 
Javascript :: get average and sum javascript 
Javascript :: javascript date to string format dd mmm yyyy 
Javascript :: sequelize migration add column 
Javascript :: async await javascript stack overflow 
Javascript :: node path relative 
Javascript :: determine if touch screen js 
Javascript :: how to remove child element in jquery 
Javascript :: store images in mongoose 
Javascript :: discord.js start code 
Javascript :: downgrade node version 
Javascript :: react native filter list 
Javascript :: clear the command prompt node 
Javascript :: es6 convert array to object 
Javascript :: sequelize migration 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =