loop

차노·2023년 8월 16일
0

In programming, a 'loop' is a control structure that allows you to repeatedly execute a block of code as long as a specified condition is true.

프로그래밍에서, 루프는 특정 조건이 트루이면 코드의 블록을 반복적으로 실행하게 하는 제어 기반의 구조이다.

Loops are used to automate repetitive tasks and iterate through a collection or sequence of data, performing the same or similar operations on each item.

loop는 데이터의 콜렉션 또는 시퀀스를 반복적으로 수행하고 자동화하는 데 사용하며, 각각의 아이템에 비슷한 작업을 똑같이 수행한다.

  1. 'for' Loop: The 'for' loop is used to execute a block of code a specific number of times.

    'for' loop는 특정 수만큼 코드의 블록을 실행하는 데 사용된다.

  1. 'while' Loop: The while loop repeatedly executes a block of code as long as a specified condition is true.

    while 루프는 특정 조건에 만족하기만 하면, 코드의 블록을 반복적으로 실행한다.

  1. 'do-while' Loop: Similar to the while loop, the do-while loop executes the block of code at least once before checking the condition.

    while 구문과 비슷하게 'do-while' 루프는 조건을 체그하기 전에 적어도 한번은 코드의 블록을 실행한다.

  1. 'forEach' Loop: In javaScript, arrays have a built-in 'forEach' method iterates through each element of the array and executes a provided function.

    자바스크립트에서, 배열은 배열의 각 요소를 자동화하고 제공된 함수를 실행하는 내장형 forEach 메소드를 가지고 있다.

  1. 'for...of' Loop: introduced in newer versions of JavaScript, the 'for...of' loop is used to iterate over elemetns of iterable objects (like arrays, string, etc.).

    자바스크립트의 새로운 버전에서 소개된 'for...of' 루프는 배열, 스트링과 같은 자동화하는 객체의 요소를 자동화하는 데 사용된다.

I brought it back from chat Gpt by asking them.

0개의 댓글

관련 채용 정보