{"id":5606,"date":"2023-01-06T09:57:08","date_gmt":"2023-01-06T01:57:08","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=5606"},"modified":"2023-01-06T09:57:08","modified_gmt":"2023-01-06T01:57:08","slug":"%e4%ba%86%e8%a7%a3react-js%e4%b8%adisuppercase%e5%87%bd%e6%95%b8%e7%9a%84%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/react-js\/%e4%ba%86%e8%a7%a3react-js%e4%b8%adisuppercase%e5%87%bd%e6%95%b8%e7%9a%84%e5%8a%9f%e8%83%bd\/","title":{"rendered":"\u4e86\u89e3React.JS\u4e2disUpperCase()\u51fd\u6578\u7684\u529f\u80fd"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"React.JS, isUpperCase\"><\/p>\n<h1>\u4f7f\u7528 React.JS \u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb<\/h1>\n<p>React.JS \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u754c\u9762\u7684 JavaScript \u5eab\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u66f4\u8f15\u9b06\u5730\u69cb\u5efa\u9ad8\u6027\u80fd\u7684\u7db2\u9801\u61c9\u7528\u7a0b\u5e8f\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528 React.JS \u4f86\u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002<\/p>\n<h2>\u4f7f\u7528 React.JS \u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb<\/h2>\n<p>React.JS \u63d0\u4f9b\u4e86\u4e00\u500b\u540d\u70ba <code>isUpperCase()<\/code> \u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u4f86\u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002\u5b83\u63a5\u53d7\u4e00\u500b\u5b57\u7b26\u4e32\u53c3\u6578\uff0c\u4e26\u8fd4\u56de\u4e00\u500b\u5e03\u723e\u503c\uff0c\u8868\u793a\u8a72\u5b57\u7b26\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002<\/p>\n<pre class=\"brush: javascript\">\n\/\/ \u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\nfunction isUpperCase(str) {\n  return str === str.toUpperCase();\n}\n<\/pre>\n<p>\u4e0a\u9762\u7684\u51fd\u6578\u4f7f\u7528 <code>toUpperCase()<\/code> \u65b9\u6cd5\u5c07\u5b57\u7b26\u4e32\u8f49\u63db\u70ba\u5168\u5927\u5beb\uff0c\u7136\u5f8c\u8207\u539f\u5b57\u7b26\u4e32\u9032\u884c\u6bd4\u8f03\uff0c\u5982\u679c\u5169\u8005\u76f8\u7b49\uff0c\u5247\u8fd4\u56de <code>true<\/code>\uff0c\u5426\u5247\u8fd4\u56de <code>false<\/code>\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u500b\u4f7f\u7528 <code>isUpperCase()<\/code> \u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<pre class=\"brush: javascript\">\n\/\/ \u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\nlet str = 'HELLO WORLD';\nlet result = isUpperCase(str);\n\nconsole.log(result); \/\/ true\n<\/pre>\n<p>\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u5011\u5b9a\u7fa9\u4e86\u4e00\u500b\u5b57\u7b26\u4e32 <code>str<\/code>\uff0c\u4e26\u5c07\u5176\u50b3\u905e\u7d66 <code>isUpperCase()<\/code> \u65b9\u6cd5\uff0c\u6700\u5f8c\u5f97\u5230\u7684\u7d50\u679c\u662f <code>true<\/code>\uff0c\u8868\u793a\u8a72\u5b57\u7b26\u4e32\u662f\u5168\u5927\u5beb\u7684\u3002<\/p>\n<h2>\u7e3d\u7d50<\/h2>\n<p>\u672c\u6587\u4ecb\u7d39\u4e86\u5982\u4f55\u4f7f\u7528 React.JS \u4f86\u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002React.JS \u63d0\u4f9b\u4e86\u4e00\u500b\u540d\u70ba <code>isUpperCase()<\/code> \u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u4f86\u5224\u65b7\u5b57\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002\u5b83\u63a5\u53d7\u4e00\u500b\u5b57\u7b26\u4e32\u53c3\u6578\uff0c\u4e26\u8fd4\u56de\u4e00\u500b\u5e03\u723e\u503c\uff0c\u8868\u793a\u8a72\u5b57\u7b26\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4f7f\u7528 <code>isUpperCase()<\/code> \u65b9\u6cd5\u53ef\u4ee5\u8f15\u9b06\u5730\u5224\u65b7\u5b57\u7b26\u4e32\u662f\u5426\u70ba\u5168\u5927\u5beb\uff0c\u800c\u4e0d\u9700\u8981\u81ea\u5df1\u5beb\u51fa\u5224\u65b7\u7684\u908f\u8f2f\u3002\u5b83\u53ef\u4ee5\u5927\u5927\u7c21\u5316\u958b\u767c\u8005\u7684\u5de5\u4f5c\uff0c\u8b93\u958b\u767c\u8005\u80fd\u5920\u66f4\u8f15\u9b06\u5730\u69cb\u5efa\u9ad8\u6027\u80fd\u7684\u7db2\u9801\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981(Description):\u4e86\u89e3React.JS\u4e2disUpperCase()\u51fd\u6578\u7684\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u6aa2\u67e5\u5b57\u4e32\u662f\u5426\u5168\u90e8\u70ba\u5927\u5beb\uff0c\u4e26\u8fd4\u56de\u4e00\u500b\u5e03\u6797\u503c\uff0c\u8b93\u958b\u767c\u8005\u53ef\u4ee5\u66f4\u8f15\u9b06\u5730\u6aa2\u67e5\u5b57\u4e32\u7684\u5927\u5c0f\u5beb\u72c0\u614b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[184,183],"tags":[182,181],"class_list":["post-5606","post","type-post","status-publish","format-standard","hentry","category-react","category-react-js","tag-react","tag-react-js"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/pcFK27-1sq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/comments?post=5606"}],"version-history":[{"count":1,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5606\/revisions"}],"predecessor-version":[{"id":5607,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5606\/revisions\/5607"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media?parent=5606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=5606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=5606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}