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 :: how to add css based on route react 
Javascript :: jQuery - AJAX load() Method 
Javascript :: emailjs react 
Javascript :: udpdate records using axios http put method 
Javascript :: node js crud operation 
Javascript :: javascript table functions 
Javascript :: window parent frames javascript 
Javascript :: react s3 
Javascript :: skip map iteration javascript 
Javascript :: react query 
Javascript :: pass function with parameter as prop 
Javascript :: react portals 
Javascript :: how to control where the text cursor on div 
Javascript :: path object d3.js 
Javascript :: jqueyr get parent 
Javascript :: js electron setup 
Javascript :: javascript eval alternative 
Javascript :: addeventlistener 
Javascript :: For-each over an array in JavaScript 
Javascript :: node 
Javascript :: keyframe options 
Javascript :: What are "res" and "req" parameters in Express functions 
Javascript :: JS how to access a class propert 
Javascript :: syntax of ternary operator in javascript 
Javascript :: login condition if and else in router dom of react jsx 
Javascript :: delete icon 
Javascript :: js object delete value by key 
Javascript :: push.js 
Javascript :: TypeError: Converting circular structure to JSON 
Javascript :: array count in mongoose query 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =