随笔分类 -  Programming

摘要:JavaScript 1. splice let arr = [1, 2, 3, 5, 6, 4, 3, 2, 1, 1, 2, 3, 4, 5] for(let i = 0; i < arr.length - 1; ++i) { for(let j = i + 1; j < arr.length; 阅读全文
posted @ 2023-06-04 11:39 ascertain 阅读(3) 评论(0) 推荐(0) 编辑
摘要:JavaScript let arr = [8, 4, 3, 2, 6, 7, 1, 5, 9] function quickSort(arr) { console.log(arr) if(arr.length <= 1) return arr let midIndex = parseInt(arr 阅读全文
posted @ 2023-06-04 00:52 ascertain 阅读(2) 评论(0) 推荐(0) 编辑
摘要:while initialize test change operation change, test, operation's order will affect the first line number 阅读全文
posted @ 2023-05-30 22:22 ascertain 阅读(2) 评论(0) 推荐(0) 编辑
摘要:find out diagonal for(let b = 1; b <= 9; ++b) { let res = '' for(let p = 1; p <= 9; ++p) { if(b > p) res += ' ' else res += '*' } console.log(res) } f 阅读全文
posted @ 2023-05-28 21:40 ascertain 阅读(1) 评论(0) 推荐(0) 编辑
摘要:Java can't return value Python can only return None JavaScript can return any value 阅读全文
posted @ 2023-05-11 16:09 ascertain 阅读(9) 评论(0) 推荐(0) 编辑
摘要:Java arr本质是一个数组,可直接传数组,引用类型,可能为null JavaScript Function length rest parameter Go 阅读全文
posted @ 2023-04-17 22:52 ascertain 阅读(8) 评论(0) 推荐(0) 编辑
摘要:C Java == 基本数据类型时, two operands类型不同时, 必须可以进行自动类型转换, e.g. byte & char => int, 不能进行自动类型转换(boolean & char)则编译失败, == 不能比较基本类型和引用类型, 基本数据类型只有boolean不能与其他7个 阅读全文
posted @ 2023-04-17 20:51 ascertain 阅读(8) 评论(0) 推荐(0) 编辑
摘要:C goto Must be defined within a function Each label in one function must have a unique name. It cannot be a reserved C keyword C has a separate namesp 阅读全文
posted @ 2023-04-09 20:24 ascertain 阅读(10) 评论(0) 推荐(0) 编辑
摘要:In Java, C, $ is valid In Go, Python, $ is invalid 阅读全文
posted @ 2023-04-09 14:39 ascertain 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Go C Java https://introcs.cs.princeton.edu/java/11precedence/ Python 阅读全文
posted @ 2023-03-19 23:47 ascertain 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示