Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript function return multiple

// With new JavaScript syntax, you can do this easily!
function returnsMultiple(){
	return ["foo", "bar"];
}
let [firstValue, secondValue] = returnsMultiple();
 
PREVIOUS NEXT
Tagged: #javascript #function #return #multiple
ADD COMMENT
Topic
Name
8+4 =