<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Complete the following JavaScript function so that it reads the string parameter and prints all the uppercase letters.
function print_uppercase_letters(string) {
  
}<|im_end|>
<|im_start|>assistant
function print_uppercase_letters(string) {
  for (let i = 0; i < string.length; i++) {
    let char = string[i];
    if (char === char.toUpperCase()) {
      console.log(char);
    }
  }
}<|im_end|>
