Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Write pseudocode to describe the following algorithm:

### Input:
Given an array of integers "arr", the algorithm should return the index of the first element in "arr" greater than or equal to the given target "num".

### Response:
function getIndex(arr, num) 
  idx := 0
  while (idx < arr.length && arr[idx] < num) 
    idx := idx + 1
  return idx