13 - Parameter and Result Multi Scalar Types

by steen_hansen

HTML

<!DOCTYPE html><meta charset="utf-8" />
<title>13 Parameter and Result Multi Scalar Types</title>



<div id='js-div' style="width:53%">
  <a href='https://github.com/steenhansen/type-czech'  target="_blank" class='git-hub'>GitHub Package</a>
  <div id='js-code'>the javascript</div>
</div>

 

<div id="the-explanation" style="width:47%">
  <div class='an-explantion'>13 - Parameter and Result Multi Scalar Types</div>
  <div id='explanation-text'>
    <br>

   This page deals with functions that have more than one parameter, and function
   results that are arrays. The next page deals with checking single parameter
   types, and single type function results.


    <div>
      <div style="float:left; width:16%; margin-left:5px">
        <li style="list-style: none;"><b>Valid Types</b></li>
       </div>
    
      <div style="float:left; width:16%">
        <ul>
          <li>boolean</li>
          <li>regexp</li>
    
        </ul>
      </div>
     
      <div style="float:left; width:13%">
        <ul>
          <li>date</li>
          <li>string</li>
        </ul>
      </div>
     
      <div style="float:left; width:16%">
        <ul>
          <li>function</li>
          <li>symbol</li>
        </ul>
      </div>

      <div style="float:left; width:16%">
        <ul>
          <li>number</li>
          <li>bigint</li>
        </ul>
      </div>

      
      <div style="float:left; width:1%">
        <ul>
          <li>array</li>
          <li>object</li>
        </ul>
      </div>
    
    </div>
    <br><br>  <br><br>
    The Person() function's signatures.
    <ul>
      <li>Input : [ 'string', 'string', 'date' ] - three distinct parameters things <b>conveyed</b> by an array </li>
      
      <li>Output : [ 'number', 'string', 'string' ] - an actual result array</li>
      </ul>
      


An error occurs because Alan Turing's birthdate is a number, 1912, not a Date().

<br><br>
And, Avicii has his last name deliberatly set to undefined, causing the...