# js实例教程-js如何用for循环计算约数？

`       var n = parseInt(prompt("请输入一个正整数"));   for(i = n ; i >= 1 ; i--){    if(n % i == 0){               console.log(i);    }   }`

`       var n = parseInt(prompt("请输入一个正整数"));   for(i = n ; i >= 1 ; i--){    if(n % i == 0){               console.log(i);    }   }`
{"ft_lang_label":"__label__zh","ft_lang_prob":0.90735704,"math_prob":0.9994359,"size":768,"snap":"2019-35-2019-39","text_gpt3_token_len":627,"char_repetition_ratio":0.12041885,"word_repetition_ratio":0.6,"special_character_ratio":0.27604166,"punctuation_ratio":0.106796116,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9647813,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-20T08:10:00Z\",\"WARC-Record-ID\":\"<urn:uuid:d21bad39-cc51-440b-87c5-334b7f1d0105>\",\"Content-Length\":\"49187\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2c4a4acf-db7f-4c72-88e8-8a8098370f9d>\",\"WARC-Concurrent-To\":\"<urn:uuid:90658294-8d93-4514-a99d-4902072929c8>\",\"WARC-IP-Address\":\"114.116.139.4\",\"WARC-Target-URI\":\"http://www.js-code.com/js/js_1598.html\",\"WARC-Payload-Digest\":\"sha1:LOF4FOPZDP3P52MHD2BPPVLVTJMU3FBY\",\"WARC-Block-Digest\":\"sha1:45UXAPJOCRW4W4A722THOGMT5L6NIB6I\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514573908.70_warc_CC-MAIN-20190920071824-20190920093824-00035.warc.gz\"}"}