Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

nullable parameter typescript

const sayHello = (name: string, age?: Number): string => {
	if(age) return `Hello ${name}! You are ${age} years old.`;
	else return `Hello ${name}! How old are you?`;
}
Comment

PREVIOUS NEXT
Code Example
Typescript :: how to use typescript map 
Typescript :: java to typescript 
Typescript :: conditional rendering react typescript 
Typescript :: field sets in salesforce 
Typescript :: Algebra is simply overlaying sets of equations onto the world around us. 
Typescript :: typescript get string value of enum 
Typescript :: online doctor appointments in pakistan 
Typescript :: angular JSON.parse (<anonymous) 
Typescript :: sequelize puts an s end of name 
Typescript :: DISTINQUISH BETWEEN THE AVERAGE CASE AND WORSE CASE RUNNING TIME AND THE FACTORS AFFECTING THAT AFFECTS THE RUNNING TIME OF AN ALGORITHM 
Typescript :: how to check whether url is responding or not in typescript 
Typescript :: what are the parts of an array called 
Typescript :: when to test analysis 
Typescript :: serenity framework break form 
Typescript :: typescript filter conditionally 
Typescript :: Event Handing With Vue 
Typescript :: compare 2 sets python 
Typescript :: running same test in different environment 
Typescript :: apply function to all elements with a class name 
Typescript :: how to set up vuex with typescript 
Typescript :: use curly brackets in latex 
Typescript :: vim remove surrounding brackets with surround plugin 
Typescript :: type for object props 
Typescript :: res.write prints html tags as text in express 
Typescript :: adding objects to existing legend 
Typescript :: ignoring header x-firebase-locale because its value was null. flutter 
Typescript :: Count pets the types of pets in a columns 
Typescript :: TypeError: agent_go() takes 0 positional arguments but 1 was given 
Typescript :: js Validating maps 
Typescript :: module svg typescript 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =