Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: test pr #94

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var number = 10
number = "Swift"

let a = 10
let b = 20

if a > b {
print("a is greater than b")
} else {
print("a is not greater than b")
}

let array = [1, 2, 3]
print(array[3])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 오류: number 변수에 초기로 정수가 할당되고, 이후 문자열이 할당되어 타입 불일치 발생할 수 있습니다.
  2. let array = [1, 2, 3]에서 array[3]를 참조할 때 index 초과로 인한 런타임 오류 발생 가능성 있음.
  3. 코드 가독성을 높이기 위해 들여쓰기 일관성 유지 권장.
  4. 변수와 상수의 역할 및 용도를 명확히 하여 관리하는 것이 바람직합니다.