quantumech

Untitled

Apr 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Module.onRuntimeInitialized = function()
  2. {
  3.     // Get C++ vector
  4.     // Vector gets returned as an object with all the same attributes..
  5.     // ..as a C++ vector.
  6.     let vector = Module.returnVector();
  7.  
  8.     // Print all values of the vector (4, 5, 6)
  9.     for(let i = 0; i < vector.size(); i++)
  10.     {
  11.         console.log(vector.get(i));
  12.     }
  13. }
Add Comment
Please, Sign In to add comment