Q:

for function js

<?php
function writeMsg() {
    echo "Hello world!";
}

writeMsg(); //call the function
?>
5
function range(start, end) {
	/* generate a range : [start, start+1, ..., end-1, end] */
	var len = end - start + 1;
	var a = new Array(len);
	for (let i = 0; i < len; i++) a[i] = start + i;
	return a;
}
2
/* Declare function */
function myFunc(param) {
  // Statements 
}
2
def function_name():
  pass
2
function idk() {
	alert('This is an alert!')
}
//call the function to make the function run by saying "Name of function + ()"
idk()
5
function MyApp() {
  return (
    <div>
      <ul>
        <li>Name </li>
        <li>Place </li>
        <li>Animal </li>
      </ul>
    </div>
  )
}

ReactDOM.render(
  <MyApp />,
  document.getElementById('root')
);
0
for (statement 1; statement 2; statement 3) {
  // code block to be executed
}
var i;
for (i = 0; i < cars.length; i++) {
  text += cars[i] + "<br>";
}
0

New to Communities?

Join the community