{"id":5992,"date":"2022-06-12T09:12:50","date_gmt":"2022-06-12T00:12:50","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=5992"},"modified":"2022-06-12T09:12:50","modified_gmt":"2022-06-12T00:12:50","slug":"post-5992","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=5992","title":{"rendered":"GAS\u3067\u6570\u5024\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff01\u914d\u5217\u3067\u306e\u3084\u308a\u65b9\u3082\u89e3\u8aac(max,min)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3067\u8907\u6570\u306e\u6570\u5024\u306e\u4e2d\u304b\u3089\u3001\u6700\u3082\u5927\u304d\u3044\u5024\u30fb\u6700\u3082\u5c0f\u3055\u3044\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Math.max\u3001Math.min\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u5217\u5185\u306b\u542b\u307e\u308c\u308b\u6570\u5024\u30c7\u30fc\u30bf\u306e\u6700\u5927\u5024\u3068\u6700\u5c0f\u5024\u3092\u6c42\u3081\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u3067\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u306b\u304a\u3044\u3066\u3001\u6700\u5927\u5024\u3084\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u30b1\u30fc\u30b9\u306f\u3088\u304f\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u3048\u3070\u3001\u8272\u3005\u306aEC\u30b5\u30a4\u30c8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u3001\u4fa1\u683c\u60c5\u5831\u3092\u53d6\u5f97\u3057\u305f\u3046\u3048\u3067\u3001\u6700\u5b89\u5024(\u6700\u5c0f\u5024)\u3092\u51fa\u529b\u3057\u305f\u3044\u30b1\u30fc\u30b9\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3046\u3057\u305f\u51e6\u7406\u3067\u306f\u3001\u6bd4\u8f03\u3059\u308b\u6570\u5024\u306e\u6570\u3060\u3051for\u30eb\u30fc\u30d7\u306a\u3069\u306e\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308c\u3070\u3001\u6700\u5c0f\u5024\u30fb\u6700\u5927\u5024\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u3001GAS\u306b\u304a\u3044\u3066\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5927\u5024\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3068\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u7b97\u51fa\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5927\u5024\u306e\u53d6\u5f97\u306fMath.max\u30e1\u30bd\u30c3\u30c9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3067\u3001\u8907\u6570\u306e\u6570\u5024\u30c7\u30fc\u30bf\u3067\u6700\u5927\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001<em><strong>Math.max<\/strong><\/em>\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Math.max(num1,num2,&#8230;numN)<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">max\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f15\u6570\u3068\u3057\u3066\u6307\u5b9a\u3057\u305f\u6570\u5024\u306e\u4e2d\u304b\u3089\u3001\u6700\u3082\u5927\u304d\u306a\u5024\u3092\u623b\u308a\u5024\u3068\u3057\u3066\u8fd4\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Number\u578b\u306e\u6570\u5024\u3067\u3042\u308c\u3070\u3001\u6574\u6570\u3060\u3051\u3067\u306a\u304f\u5c0f\u6570\u3082\u6307\u5b9a\u3067\u304d\u308b\u4e0a\u3001\u8ca0\u306e\u6570\u3082\u6bd4\u8f03\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Math.max\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u5f15\u6570\u306e\u6570\u306f\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u305f\u304f\u3055\u3093\u306e\u6570\u5024\u5185\u304b\u3089\u6700\u5927\u5024\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5c0f\u5024\u306e\u53d6\u5f97\u306fMath.min\u30e1\u30bd\u30c3\u30c9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3067\u3001\u8907\u6570\u306e\u6570\u5024\u30c7\u30fc\u30bf\u3067\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001<em><strong>Math.min<\/strong><\/em>\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Math.min(num1,num2,&#8230;numN)<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">min\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f15\u6570\u3068\u3057\u3066\u6307\u5b9a\u3057\u305f\u6570\u5024\u306e\u4e2d\u304b\u3089\u3001\u6700\u3082\u5c0f\u3055\u306a\u5024\u3092\u623b\u308a\u5024\u3067\u8fd4\u5374\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5927\u5024\u3092\u53d6\u5f97\u3059\u308bmax\u30e1\u30bd\u30c3\u30c9\u3068\u540c\u69d8\u306b\u3001Number\u578b\u306e\u6570\u5024\u3067\u3042\u308c\u3070\u3001\u6574\u6570\u3060\u3051\u3067\u306a\u304f\u5c0f\u6570\u3082\u6307\u5b9a\u3067\u304d\u308b\u4e0a\u3001\u8ca0\u306e\u6570\u3082\u6bd4\u8f03\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f15\u6570\u306e\u6570\u30822\u500b\u4ee5\u4e0a\u306e\u8907\u6570\u6307\u5b9a\u3057\u3066\u3001\u305d\u306e\u4e2d\u304b\u3089\u6700\u5c0f\u5024\u3092\u9078\u3093\u3067\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u969b\u306bMath.max\/min\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function testMaxMin() {\n  \/\/\u540c\u3058\u6570\u5b57\u3092\u5f15\u6570\u306b\u3057\u3066max\/min\u3092\u53d6\u5f97\n  const max = Math.max(8,5,3,9,20,13);\n  const min = Math.min(8,5,3,9,20,13);\n  \/\/\u6700\u5927\u5024\u3068\u6700\u5c0f\u5024\u3092\u30ed\u30b0\u51fa\u529b\n  console.log('\u6700\u5927\u5024\uff1a' + max + ',\u6700\u5c0f\u5024\uff1a' + min);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Math.max\u30e1\u30bd\u30c3\u30c9\u3068Math.min\u30e1\u30bd\u30c3\u30c9\u306b\u540c\u3058\u5f15\u6570\u3092\u8a2d\u5b9a\u3057\u3066console.log\u3067\u30ed\u30b0\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"614\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3067Math.max\u3001Math.min\u30e1\u30bd\u30c3\u30c9\u3067\u6570\u5024\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u6c42\u3081\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-5997\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-1024x524.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-768x393.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-530x271.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-565x289.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-710x363.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_001-725x371.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u308c\u305e\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3082\u3001\u5f15\u6570\u306f2\u500b\u4ee5\u4e0a\u8a2d\u5b9a\u53ef\u80fd\u3067\u3001\u8ca0\u306e\u6570\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"411\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u3067Math.max\u3001Math.min\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u500b\u6570\u306f2\u500b\u4ee5\u4e0a\u3067\u3001\u8ca0\u306e\u6570\u3082\u6307\u5b9a\u53ef\u80fd\" class=\"wp-image-5998\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-768x395.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-530x272.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-565x290.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-710x365.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_002-725x372.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ca0\u306e\u6570\u3068\u3057\u3066\u7d76\u5bfe\u5024\u304c\u5927\u304d\u3044\u3082\u306e\u304c\u3001\u6700\u3082\u5c0f\u3055\u3044\u6570\u5b57\u3068\u3057\u3066Math.min\u304c\u5224\u5b9a\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u914d\u5217\u5185\u306e\u8981\u7d20\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u306f\u3069\u3046\u53d6\u5f97\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3067\u6700\u5927\u5024\u3084\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u30d1\u30bf\u30fc\u30f3\u3068\u3057\u3066\u591a\u3044\u306e\u304c\u3001\u914d\u5217\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5024\u578b\u306e\u914d\u5217\u306e\u4e2d\u3067\u6700\u3082\u5927\u304d\u306a\u5024\u3084\u6700\u3082\u5c0f\u3055\u306a\u5024\u304c\u4f55\u304b\u5224\u5b9a\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u3001\u3053\u308c\u307e\u3067\u7d39\u4ecb\u3057\u3066\u304d\u305fMath.max\u3084Math.min\u3067\u306f\u305d\u306e\u307e\u307e\u914d\u5217\u3092\u5f15\u6570\u306b\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3053\u3067\u914d\u5217\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u3001\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u6c42\u3081\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function arrayMaxMin() {\n  const num = [8,5,3,9,20,13];\n  \/\/apply\u30e1\u30bd\u30c3\u30c9\u3067\u914d\u5217\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\n  console.log('\u6700\u5927\u5024\uff1a' + Math.max.apply(null,num));\n  console.log('\u6700\u5c0f\u5024\uff1a' + Math.min.apply(null,num));\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">apply\u30e1\u30bd\u30c3\u30c9\u306f\u7b2c1\u5f15\u6570\u306bnull\u3001\u7b2c2\u5f15\u6570\u306b\u914d\u5217\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u305d\u308c\u3089\u3092\u9023\u7d9a\u3057\u305f\u5f15\u6570\u3068\u3057\u3066Math.max\u3084Math.min\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u203b\u7b2c1\u5f15\u6570\u306f\u7701\u7565\u4e0d\u53ef\u80fd\u306a\u306e\u3067\u3001null\u306f\u5fc5\u9808\u3067\u3042\u308b\u3053\u3068\u3092\u7559\u610f\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u6570\u5024\u578b\u306e\u914d\u5217\u306b\u5bfe\u3057\u3066\u3001\u8981\u7d20\u5185\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"413\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004.jpg\" alt=\"Google Apps Script(GAS)\u3067\u6570\u5024\u578b\u306e\u914d\u5217\u306b\u542b\u307e\u308c\u308b\u8981\u7d20\u306b\u3064\u3044\u3066apply\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001Math.max\u30fbMath.min\u3067\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u7b97\u51fa\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u5b9f\u884c\u7d50\u679c\" class=\"wp-image-6000\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-300x155.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-768x396.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-530x274.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-565x292.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-710x367.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_004-725x374.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u969b\u306bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001\u914d\u5217\u30c7\u30fc\u30bf\u306e\u4e2d\u304b\u3089\u6700\u5927\u5024\/\u6700\u5c0f\u5024\u3092\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u5217\u30c7\u30fc\u30bf\u3092\u8abf\u3079\u3066\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u30b7\u30fc\u30f3\u306f\u591a\u3044\u306e\u3067\u3001\u3053\u306e\u65b9\u6cd5\u306f\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6587\u5b57\u30fb\u6587\u5b57\u5217\u3092\u5f15\u6570\u6307\u5b9a\u3057\u306a\u3044\u3088\u3046\u6ce8\u610f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">max\u30e1\u30bd\u30c3\u30c9\u3001min\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092Google Apps Script(GAS)\u3067\u53d6\u5f97\u3059\u308b\u969b\u306e\u6ce8\u610f\u70b9\u306f\u3001\u5f15\u6570\u306b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u306a\u3044\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u3084\u6587\u5b57\u5217\u3092\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001\u305d\u308c\u305e\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u304c<em><strong>NaN(Not a Number)<\/strong><\/em>\u3068\u975e\u6570\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"410\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003.jpg\" alt=\"Google Apps Script(GAS)\u306eMath.max\u3084Math.min\u306e\u5f15\u6570\u306b\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u308b\u3068\u3001NaN(Not a Number)\u304c\u51fa\u529b\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\" class=\"wp-image-5999\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-768x394.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-530x272.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-565x290.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-710x364.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/06\/20220612_auto_003-725x372.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u305f\u3081\u3001max\/min\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u969b\u306b\u306f\u3001\u5f15\u6570\u306b\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u8907\u6570\u306e\u6570\u5024\u306e\u4e2d\u304b\u3089\u3001\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GAS\u3067\u306fMath.max\u3067\u5f15\u6570\u306e\u4e2d\u304b\u3089\u6700\u3082\u5927\u304d\u306a\u5024\u3001Math.min\u3067\u5f15\u6570\u306e\u4e2d\u304b\u3089\u6700\u3082\u5c0f\u3055\u306a\u5024\u3092\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u3068\u3057\u3066\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Math.max\/Math.min\u3068\u3082\u306b2\u500b\u4ee5\u4e0a\u306e\u8907\u6570\u306e\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u6570\u5024\u5074\u3067\u3042\u308c\u3070\u6574\u6570\u3060\u3051\u3067\u306a\u304f\u3001\u5c0f\u6570\u3084\u8ca0\u306e\u6570\u3082\u6307\u5b9a\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3055\u3089\u306b\u300c\u914d\u5217\u578b\u306e\u6570\u5024\u30c7\u30fc\u30bf\u304b\u3089\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u300d\u3068\u3044\u3063\u305f\u65b9\u6cd5\u3082apply\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5024\u306e\u4e2d\u304b\u3089\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u7b97\u51fa\u3057\u305f\u3044\u5834\u5408\u306fmax\u30e1\u30bd\u30c3\u30c9\u3068min\u30e1\u30bd\u30c3\u30c9\u3092\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067\u8907\u6570\u306e\u6570\u5024\u306e\u4e2d\u304b\u3089\u3001\u6700\u3082\u5927\u304d\u3044\u5024\u30fb\u6700\u3082\u5c0f\u3055\u3044\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002 Math.max\u3001Math.min\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5997,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,973,974,971,972],"class_list":["post-5992","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-max","tag-min","tag-971","tag-972"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5992"}],"version-history":[{"count":5,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5992\/revisions"}],"predecessor-version":[{"id":6002,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5992\/revisions\/6002"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/5997"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}