"js" -js code example

Example 1: javascript

JavaScript, often abbreviated as JS, is a programming language that conforms
to the ECMAScript specification.
JavaScript is high-level, often just-in-time compiled, and multi-paradigm.
It has curly-bracket syntax, dynamic typing, prototype-based object-orientation,
and first-class functions.

Example 2: javascript

import java.awt.event.*;
import javax.swing.*;
public class Clicker extends JFrame implements ActionListener {
int count;
JButton button;
Clicker() {
super("Click Me");
button = new JButton(String.valueOf(count));
add(button);
button.addActionListener(this);
setSize(200,100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
count++;
button.setText(String.valueOf(count));
}
public static void main(String[] args) { new Clicker(); }
}

Tags:

Php Example