{"id":6881,"date":"2025-02-19T12:16:22","date_gmt":"2025-02-19T03:16:22","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=6881"},"modified":"2025-03-19T12:26:34","modified_gmt":"2025-03-19T03:26:34","slug":"post-6881","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/6881","title":{"rendered":"jQuery\u3067\u30eb\u30fc\u30d7\u3092\u629c\u3051\u3088\u3046\u3068(break\u3057\u3088\u3046\u3068)\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u969b\u306e\u5bfe\u5fdc\u65b9\u6cd5"},"content":{"rendered":"<p>jQuery\u3067\u30eb\u30fc\u30d7\u3092\u629c\u3051\u3088\u3046\u3068(break\u3057\u3088\u3046\u3068)\u3059\u308b\u3068\u300cUncaught SyntaxError: unlabeled break must be inside loop or switch\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u529b\u3055\u308c\u305f\u3002\u3069\u3046\u3082break\u3067\u306f\u629c\u3051\u3089\u308c\u306a\u3044\u3063\u307d\u3044\u3002\u4ee5\u4e0b\u306b\u5bfe\u5fdc\u65b9\u6cd5\u3092\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u5bfe\u5fdc\u65b9\u6cd5<\/h2>\n<h3>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const array = [1, 2, 3, 4, 5];\r\n$.each(array, function(index, value){\r\n    \/\/\u3053\u308c\u3060\u3068\u30a8\u30e9\u30fc\r\n    if( value === 3 ){\r\n        break;\r\n    }\r\n\r\n    \/\/\u3053\u308c\u3060\u3068OK\r\n    if( value === 3 ){\r\n        return false;\r\n    }\r\n});<\/pre>\n<h3>\u30b9\u30ad\u30c3\u30d7(continue)\u3055\u305b\u305f\u3044\u5834\u5408<\/h3>\n<p>\u30eb\u30fc\u30d7\u3092\u30b9\u30ad\u30c3\u30d7(continue)\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u300creturn true;\u300d\u306b\u306a\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/16397002\/is-this-break-statement-valid-in-jquery-javascript\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/16397002\/is-this-break-statement-valid-in-jquery-javascript<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>jQuery\u3067\u30eb\u30fc\u30d7\u3092\u629c\u3051\u3088\u3046\u3068(break\u3057\u3088\u3046\u3068)\u3059\u308b\u3068\u300cUncaught  ... <\/p>\n","protected":false},"author":1,"featured_media":1071,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-6881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","category-javascript"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=6881"}],"version-history":[{"count":3,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6881\/revisions"}],"predecessor-version":[{"id":6884,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/6881\/revisions\/6884"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/1071"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=6881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=6881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=6881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}